forked from enlightenment/efl
ecore_evas - ecore_evas's should start withdrawn then normal on show
this fixes initial state of an ee where you couldn't detect when the window had been accepted by the wm (goes to normal state from withdrawn). @fix
This commit is contained in:
parent
251389fefd
commit
5954289c6c
|
@ -107,6 +107,8 @@ _ecore_evas_show(Ecore_Evas *ee)
|
|||
if (bdata->image) return;
|
||||
if (ee->prop.focused) return;
|
||||
ee->prop.focused = EINA_TRUE;
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
evas_focus_in(ee->evas);
|
||||
if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
|
||||
}
|
||||
|
@ -430,6 +432,8 @@ _ecore_evas_buffer_cb_show(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
|
|||
Ecore_Evas *ee;
|
||||
|
||||
ee = data;
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
ee->visible = 1;
|
||||
if (ee->func.fn_show) ee->func.fn_show(ee);
|
||||
}
|
||||
|
@ -440,6 +444,8 @@ _ecore_evas_buffer_cb_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
|
|||
Ecore_Evas *ee;
|
||||
|
||||
ee = data;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
ee->visible = 0;
|
||||
if (ee->func.fn_hide) ee->func.fn_hide(ee);
|
||||
}
|
||||
|
@ -790,7 +796,7 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target)
|
|||
ee->prop.override = EINA_TRUE;
|
||||
ee->prop.maximized = EINA_FALSE;
|
||||
ee->prop.fullscreen = EINA_FALSE;
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
ee->prop.sticky = EINA_FALSE;
|
||||
|
||||
/* init evas here */
|
||||
|
|
|
@ -536,6 +536,7 @@ ecore_evas_cocoa_new_internal(Ecore_Cocoa_Window *parent EINA_UNUSED, int x, int
|
|||
ee->prop.request_pos = EINA_FALSE;
|
||||
ee->prop.sticky = EINA_FALSE;
|
||||
ee->prop.window = 0;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
|
||||
printf("Create New Evas\n");
|
||||
|
||||
|
|
|
@ -212,6 +212,7 @@ ecore_evas_drm_new_internal(const char *device, unsigned int parent EINA_UNUSED,
|
|||
ee->prop.layer = 4;
|
||||
ee->prop.request_pos = 0;
|
||||
ee->prop.sticky = 0;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
ee->alpha = EINA_FALSE;
|
||||
|
||||
ee->can_async_render = 1;
|
||||
|
@ -357,6 +358,7 @@ ecore_evas_gl_drm_new_internal(const char *device, unsigned int parent EINA_UNUS
|
|||
ee->prop.layer = 4;
|
||||
ee->prop.request_pos = 0;
|
||||
ee->prop.sticky = 0;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
ee->alpha = EINA_FALSE;
|
||||
|
||||
ee->can_async_render = 1;
|
||||
|
@ -665,6 +667,8 @@ _ecore_evas_drm_show(Ecore_Evas *ee)
|
|||
{
|
||||
if ((!ee) || (ee->visible)) return;
|
||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
ee->visible = 1;
|
||||
if (ee->func.fn_show) ee->func.fn_show(ee);
|
||||
}
|
||||
|
@ -674,6 +678,8 @@ _ecore_evas_drm_hide(Ecore_Evas *ee)
|
|||
{
|
||||
if ((!ee) || (!ee->visible)) return;
|
||||
evas_sync(ee->evas);
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
ee->visible = 0;
|
||||
ee->should_be_visible = 0;
|
||||
if (ee->func.fn_hide) ee->func.fn_hide(ee);
|
||||
|
|
|
@ -1164,7 +1164,7 @@ ecore_evas_extn_plug_new_internal(Ecore_Evas *ee_target)
|
|||
ee->prop.override = EINA_TRUE;
|
||||
ee->prop.maximized = EINA_FALSE;
|
||||
ee->prop.fullscreen = EINA_FALSE;
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
ee->prop.sticky = EINA_FALSE;
|
||||
|
||||
bdata->image = o;
|
||||
|
@ -1591,6 +1591,8 @@ _ipc_client_data(void *data, int type EINA_UNUSED, void *event)
|
|||
case OP_SHOW:
|
||||
if (!ee->visible)
|
||||
{
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
ee->visible = 1;
|
||||
if (ee->func.fn_show) ee->func.fn_show(ee);
|
||||
}
|
||||
|
@ -1598,6 +1600,8 @@ _ipc_client_data(void *data, int type EINA_UNUSED, void *event)
|
|||
case OP_HIDE:
|
||||
if (ee->visible)
|
||||
{
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
ee->visible = 0;
|
||||
if (ee->func.fn_hide) ee->func.fn_hide(ee);
|
||||
}
|
||||
|
|
|
@ -395,6 +395,8 @@ static void
|
|||
_ecore_evas_show(Ecore_Evas *ee)
|
||||
{
|
||||
if (ee->prop.focused) return;
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
ee->prop.focused = EINA_TRUE;
|
||||
evas_focus_in(ee->evas);
|
||||
if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
|
||||
|
@ -403,6 +405,8 @@ _ecore_evas_show(Ecore_Evas *ee)
|
|||
static void
|
||||
_ecore_evas_hide(Ecore_Evas *ee)
|
||||
{
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
if (ee->prop.focused)
|
||||
{
|
||||
ee->prop.focused = EINA_FALSE;
|
||||
|
@ -659,7 +663,7 @@ ecore_evas_fb_new_internal(const char *disp_name, int rotation, int w, int h)
|
|||
ee->prop.override = EINA_TRUE;
|
||||
ee->prop.maximized = EINA_TRUE;
|
||||
ee->prop.fullscreen = EINA_FALSE;
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
ee->prop.sticky = EINA_FALSE;
|
||||
|
||||
/* init evas here */
|
||||
|
|
|
@ -289,6 +289,8 @@ _ecore_evas_move_resize(Ecore_Evas *ee, int x EINA_UNUSED, int y EINA_UNUSED, in
|
|||
static void
|
||||
_ecore_evas_show(Ecore_Evas *ee)
|
||||
{
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
if (ee->prop.focused) return;
|
||||
ee->prop.focused = EINA_TRUE;
|
||||
evas_focus_in(ee->evas);
|
||||
|
@ -465,7 +467,7 @@ ecore_evas_psl1ght_new_internal(const char *name, int w, int h)
|
|||
ee->prop.override = EINA_TRUE;
|
||||
ee->prop.maximized = EINA_TRUE;
|
||||
ee->prop.fullscreen = EINA_FALSE;
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
ee->prop.sticky = EINA_FALSE;
|
||||
ee->prop.window = 0;
|
||||
|
||||
|
|
|
@ -387,6 +387,8 @@ _ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h)
|
|||
static void
|
||||
_ecore_evas_show(Ecore_Evas *ee)
|
||||
{
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
if (ee->prop.focused) return;
|
||||
ee->prop.focused = EINA_TRUE;
|
||||
evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
|
||||
|
@ -568,7 +570,7 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu
|
|||
ee->prop.override = EINA_TRUE;
|
||||
ee->prop.maximized = EINA_TRUE;
|
||||
ee->prop.fullscreen = fullscreen;
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
ee->prop.sticky = EINA_FALSE;
|
||||
ee->prop.window = 0;
|
||||
ee->alpha = alpha;
|
||||
|
|
|
@ -163,6 +163,7 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent,
|
|||
ee->prop.request_pos = EINA_FALSE;
|
||||
ee->prop.sticky = EINA_FALSE;
|
||||
ee->prop.draw_frame = frame;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
ee->alpha = EINA_FALSE;
|
||||
|
||||
/* NB: Disabled for right now as it causes textgrid (terminology)
|
||||
|
@ -330,6 +331,8 @@ _ecore_evas_wl_show(Ecore_Evas *ee)
|
|||
evas_object_resize(wdata->frame, ee->w + fw, ee->h + fh);
|
||||
}
|
||||
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
ee->visible = 1;
|
||||
if (ee->func.fn_show) ee->func.fn_show(ee);
|
||||
}
|
||||
|
@ -357,6 +360,8 @@ _ecore_evas_wl_hide(Ecore_Evas *ee)
|
|||
if (wdata->win)
|
||||
ecore_wl_window_hide(wdata->win);
|
||||
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
ee->visible = 0;
|
||||
ee->should_be_visible = 0;
|
||||
_ecore_evas_wl_common_frame_callback_clean(ee);
|
||||
|
|
|
@ -160,6 +160,7 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent,
|
|||
ee->prop.request_pos = EINA_FALSE;
|
||||
ee->prop.sticky = EINA_FALSE;
|
||||
ee->prop.draw_frame = frame;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
ee->alpha = EINA_FALSE;
|
||||
|
||||
if (getenv("ECORE_EVAS_FORCE_SYNC_RENDER"))
|
||||
|
@ -322,6 +323,8 @@ _ecore_evas_wl_show(Ecore_Evas *ee)
|
|||
evas_object_resize(wdata->frame, ee->w + fw, ee->h + fh);
|
||||
}
|
||||
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
ee->visible = 1;
|
||||
if (ee->func.fn_show) ee->func.fn_show(ee);
|
||||
}
|
||||
|
@ -349,6 +352,8 @@ _ecore_evas_wl_hide(Ecore_Evas *ee)
|
|||
if (wdata->win)
|
||||
ecore_wl_window_hide(wdata->win);
|
||||
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
ee->visible = 0;
|
||||
ee->should_be_visible = 0;
|
||||
_ecore_evas_wl_common_frame_callback_clean(ee);
|
||||
|
|
|
@ -318,6 +318,8 @@ _ecore_evas_win32_event_window_show(void *data EINA_UNUSED, int type EINA_UNUSED
|
|||
ee = ecore_event_window_match((Ecore_Window)e->window);
|
||||
if (!ee) return 1; /* pass on event */
|
||||
if ((Ecore_Window)e->window != ee->prop.window) return 1;
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
if (ee->visible) return 0; /* dont pass it on */
|
||||
ee->visible = 1;
|
||||
if (ee->func.fn_show) ee->func.fn_show(ee);
|
||||
|
@ -337,6 +339,8 @@ _ecore_evas_win32_event_window_hide(void *data EINA_UNUSED, int type EINA_UNUSED
|
|||
ee = ecore_event_window_match((Ecore_Window)e->window);
|
||||
if (!ee) return 1; /* pass on event */
|
||||
if ((Ecore_Window)e->window != ee->prop.window) return 1;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
if (!ee->visible) return 0; /* dont pass it on */
|
||||
ee->visible = 0;
|
||||
if (ee->func.fn_hide) ee->func.fn_hide(ee);
|
||||
|
@ -1307,6 +1311,7 @@ _ecore_evas_win32_new_internal(int (*_ecore_evas_engine_backend_init)(Ecore_Evas
|
|||
ee->prop.sticky = EINA_FALSE;
|
||||
/* FIXME: sticky to add */
|
||||
ee->prop.window = 0;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
|
||||
/* init evas here */
|
||||
ee->evas = evas_new();
|
||||
|
|
|
@ -1642,6 +1642,11 @@ _ecore_evas_x_event_window_show(void *data EINA_UNUSED, int type EINA_UNUSED, vo
|
|||
}
|
||||
if ((first_map_bug) && (!strcmp(ee->driver, "opengl_x11")))
|
||||
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
|
||||
if (ee->prop.override)
|
||||
{
|
||||
ee->prop.withdrawn = EINA_FALSE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
}
|
||||
if (ee->visible) return ECORE_CALLBACK_PASS_ON;
|
||||
// if (ee->visible) return ECORE_CALLBACK_DONE;
|
||||
// printf("SHOW EVENT %p\n", ee);
|
||||
|
@ -1668,6 +1673,11 @@ _ecore_evas_x_event_window_hide(void *data EINA_UNUSED, int type EINA_UNUSED, vo
|
|||
if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object);
|
||||
ee->in = EINA_FALSE;
|
||||
}
|
||||
if (ee->prop.override)
|
||||
{
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
|
||||
}
|
||||
if (!ee->visible) return ECORE_CALLBACK_PASS_ON;
|
||||
// if (!ee->visible) return ECORE_CALLBACK_DONE;
|
||||
// printf("HIDE EVENT %p\n", ee);
|
||||
|
@ -3837,6 +3847,7 @@ ecore_evas_software_x11_new_internal(const char *disp_name, Ecore_X_Window paren
|
|||
ee->prop.layer = 4;
|
||||
ee->prop.request_pos = EINA_FALSE;
|
||||
ee->prop.sticky = 0;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
edata->state.sticky = 0;
|
||||
|
||||
if (getenv("ECORE_EVAS_FORCE_SYNC_RENDER"))
|
||||
|
@ -4372,6 +4383,7 @@ ecore_evas_gl_x11_options_new_internal(const char *disp_name, Ecore_X_Window par
|
|||
ee->prop.layer = 4;
|
||||
ee->prop.request_pos = EINA_FALSE;
|
||||
ee->prop.sticky = 0;
|
||||
ee->prop.withdrawn = EINA_TRUE;
|
||||
edata->state.sticky = 0;
|
||||
|
||||
/* init evas here */
|
||||
|
|
Loading…
Reference in New Issue