ecore-evas-wayland: Fix issue of apps not starting up in fullscreen mode

Calls to make a window fullscreen do require the window to already
have a shell surface with which to fullscreen. If an app sets the
window fullscreen property when the window is not shown yet, then the
app would never startup fullscreen. This patch fixes that issue by
adding a 'defer_fullscreen' flag to Ecore_Evas (wayland) so that when
the window does finally get shown, we can show it in fullscreen.
Addresses part of the T5044 ticket...

ref T5044

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-03-01 11:30:15 -05:00
parent b09dcc1e0e
commit dfb1877500
2 changed files with 22 additions and 0 deletions

View File

@ -1400,6 +1400,14 @@ _ecore_evas_wl_common_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
if (ee->prop.fullscreen == on) return;
wdata = ee->engine.data;
ee->prop.fullscreen = on;
if ((!wdata->sync_done) || (!ee->visible))
{
wdata->defer_fullscreen = EINA_TRUE;
return;
}
ecore_wl2_window_fullscreen_set(wdata->win, on);
}
@ -1781,6 +1789,13 @@ _ecore_evas_wl_common_show(Ecore_Evas *ee)
ecore_wl2_window_show(wdata->win);
ecore_wl2_window_alpha_set(wdata->win, ee->alpha);
ecore_wl2_window_transparent_set(wdata->win, ee->transparent);
if (wdata->defer_fullscreen)
{
wdata->defer_fullscreen = EINA_FALSE;
ecore_wl2_window_fullscreen_set(wdata->win, ee->prop.fullscreen);
}
einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
if (einfo)
@ -2015,6 +2030,12 @@ _ee_cb_sync_done(void *data, int type EINA_UNUSED, void *event EINA_UNUSED)
ecore_wl2_window_alpha_set(wdata->win, ee->alpha);
ecore_wl2_window_transparent_set(wdata->win, ee->transparent);
if (wdata->defer_fullscreen)
{
wdata->defer_fullscreen = EINA_FALSE;
ecore_wl2_window_fullscreen_set(wdata->win, ee->prop.fullscreen);
}
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
if (wdata->win)

View File

@ -51,6 +51,7 @@ struct _Ecore_Evas_Engine_Wl_Data
Eina_Bool sync_done : 1;
Eina_Bool defer_show : 1;
Eina_Bool reset_pending : 1;
Eina_Bool defer_fullscreen : 1;
};
Ecore_Evas_Interface_Wayland *_ecore_evas_wl_interface_new(void);