Add some additional trapping around window_show for cases where a

wl_shell has not been bound yet

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-07-16 11:16:08 +01:00
parent 59ea842b22
commit dd939bf587
1 changed files with 7 additions and 3 deletions

View File

@ -282,17 +282,21 @@ ecore_wl_window_show(Ecore_Wl_Window *win)
if ((win->type != ECORE_WL_WINDOW_TYPE_DND) && if ((win->type != ECORE_WL_WINDOW_TYPE_DND) &&
(win->type != ECORE_WL_WINDOW_TYPE_NONE)) (win->type != ECORE_WL_WINDOW_TYPE_NONE))
{ {
if (!win->shell_surface) if ((!win->shell_surface) && (_ecore_wl_disp->wl.shell))
{ {
win->shell_surface = win->shell_surface =
wl_shell_get_shell_surface(_ecore_wl_disp->wl.shell, wl_shell_get_shell_surface(_ecore_wl_disp->wl.shell,
win->surface); win->surface);
} }
wl_shell_surface_add_listener(win->shell_surface, if (win->shell_surface)
&_ecore_wl_shell_surface_listener, win); wl_shell_surface_add_listener(win->shell_surface,
&_ecore_wl_shell_surface_listener, win);
} }
/* trap for valid shell surface */
if (!win->shell_surface) return;
switch (win->type) switch (win->type)
{ {
case ECORE_WL_WINDOW_TYPE_FULLSCREEN: case ECORE_WL_WINDOW_TYPE_FULLSCREEN: