win - first map - fix energyxt unmap bug by wiping ignore unmap

For some reason I have yet to divine we don't get an initial unmap
event due to the reparent of the energyxt dialog windows and the
"ignore that first unmap" flag does not get cleared because it doesn't
happen. later when the dialog is withdrawn {9unmapped) this is ignored
then when you close the dialog... thus keeping it around as far as e
is concerned.

so to fix this - add a small timeout to clean this flag after a
show/map.

@fix
This commit is contained in:
Carsten Haitzler 2022-07-05 09:25:35 +01:00
parent 671789b5a8
commit 374ed74049
3 changed files with 19 additions and 0 deletions

View File

@ -586,6 +586,8 @@ _e_client_free(E_Client *ec)
if (ec->stack.prev) ec->stack.prev->stack.next = ec->stack.next; if (ec->stack.prev) ec->stack.prev->stack.next = ec->stack.next;
if (ec->stack.next) ec->stack.next->stack.prev = ec->stack.prev; if (ec->stack.next) ec->stack.next->stack.prev = ec->stack.prev;
E_FREE_FUNC(ec->ignore_first_unmap_clear_timer, ecore_timer_del);
ec->e.state.profile.wait_desk = NULL; ec->e.state.profile.wait_desk = NULL;
evas_object_del(ec->frame); evas_object_del(ec->frame);
E_OBJECT(ec)->references--; E_OBJECT(ec)->references--;

View File

@ -302,6 +302,7 @@ struct E_Client
unsigned char ignore_first_unmap; unsigned char ignore_first_unmap;
E_Pointer_Mode resize_mode; E_Pointer_Mode resize_mode;
Ecore_Timer *ignore_first_unmap_clear_timer;
struct struct
{ {

View File

@ -3524,6 +3524,16 @@ _e_comp_x_frame_extents_adjust(E_Client *ec, int exl, int exr, int ext, int exb)
} }
} }
static Eina_Bool
_cb_e_comp_x_ignore_first_unmap_clear_timer(void *data)
{
E_Client *ec = data;
ec->ignore_first_unmap_clear_timer = NULL;
if (ec->ignore_first_unmap > 0) ec->ignore_first_unmap--;
return EINA_FALSE;
}
static void static void
_e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec) _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec)
{ {
@ -3576,6 +3586,9 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec)
if (!ec->internal) if (!ec->internal)
ecore_x_window_save_set_add(win); ecore_x_window_save_set_add(win);
ec->ignore_first_unmap++; ec->ignore_first_unmap++;
E_FREE_FUNC(ec->ignore_first_unmap_clear_timer, ecore_timer_del);
ec->ignore_first_unmap_clear_timer = ecore_timer_add
(0.2, _cb_e_comp_x_ignore_first_unmap_clear_timer, ec);
ecore_x_window_reparent(win, pwin, 0, 0); ecore_x_window_reparent(win, pwin, 0, 0);
e_pixmap_alias(ep, E_PIXMAP_TYPE_X, pwin); e_pixmap_alias(ep, E_PIXMAP_TYPE_X, pwin);
@ -5807,6 +5820,9 @@ _e_comp_x_manage_windows(void)
evas_object_geometry_set(ec->frame, ec->client.x, ec->client.y, ec->client.w, ec->client.h); evas_object_geometry_set(ec->frame, ec->client.x, ec->client.y, ec->client.w, ec->client.h);
} }
ec->ignore_first_unmap = 1; ec->ignore_first_unmap = 1;
E_FREE_FUNC(ec->ignore_first_unmap_clear_timer, ecore_timer_del);
ec->ignore_first_unmap_clear_timer = ecore_timer_add
(0.2, _cb_e_comp_x_ignore_first_unmap_clear_timer, ec);
if (ec->override || (!ec->icccm.fetch.hints)) if (ec->override || (!ec->icccm.fetch.hints))
evas_object_show(ec->frame); evas_object_show(ec->frame);
_e_comp_x_client_stack(ec); _e_comp_x_client_stack(ec);