summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-09-02 09:14:36 -0400
committerChris Michael <cp.michael@samsung.com>2014-09-04 16:08:51 -0400
commit665a7f6e1f13531cd935a255fe86967f1975d445 (patch)
tree17d958c786f85f833502a950dbbcc2294ea9fe9e
parentc1b659936f887ede963b47f628c2a10aac2664b8 (diff)
downloadefl-devs/devilhorns/xdg_shell.tar.gz
ecore-wayland: Cleanup shell surface creationdevs/devilhorns/xdg_shell
Summary: We had some duplication happening here when the IVI shell code got added. This cleans up the surface creation code (parts of it were being duplicated) @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_wayland/ecore_wl_window.c46
1 files changed, 10 insertions, 36 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index bc4b204a75..ee8b274ca3 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -304,17 +304,16 @@ ecore_wl_window_show(Ecore_Wl_Window *win)
if (!win->ivi_surface)
{
#endif
- if ((!win->shell_surface) && (_ecore_wl_disp->wl.shell))
- if ((!win->xdg_surface) && (_ecore_wl_disp->wl.xdg_shell))
- {
- win->xdg_surface =
- xdg_shell_get_xdg_surface(_ecore_wl_disp->wl.xdg_shell,
- win->surface);
- if (!win->xdg_surface) return;
- xdg_surface_set_user_data(win->xdg_surface, win);
- xdg_surface_add_listener(win->xdg_surface,
- &_ecore_xdg_surface_listener, win);
- }
+ if ((!win->xdg_surface) && (_ecore_wl_disp->wl.xdg_shell))
+ {
+ win->xdg_surface =
+ xdg_shell_get_xdg_surface(_ecore_wl_disp->wl.xdg_shell,
+ win->surface);
+ if (!win->xdg_surface) return;
+ xdg_surface_set_user_data(win->xdg_surface, win);
+ xdg_surface_add_listener(win->xdg_surface,
+ &_ecore_xdg_surface_listener, win);
+ }
else if ((!win->shell_surface) && (_ecore_wl_disp->wl.shell))
{
win->shell_surface =
@@ -335,31 +334,6 @@ ecore_wl_window_show(Ecore_Wl_Window *win)
#ifdef USE_IVI_SHELL
}
#endif
- win->xdg_surface =
- xdg_shell_get_xdg_surface(_ecore_wl_disp->wl.xdg_shell,
- win->surface);
- if (!win->xdg_surface) return;
- xdg_surface_set_user_data(win->xdg_surface, win);
- xdg_surface_add_listener(win->xdg_surface,
- &_ecore_xdg_surface_listener, win);
- }
- else if ((!win->shell_surface) && (_ecore_wl_disp->wl.shell))
- {
- win->shell_surface =
- wl_shell_get_shell_surface(_ecore_wl_disp->wl.shell,
- win->surface);
- if (!win->shell_surface) return;
-
- wl_shell_surface_add_listener(win->shell_surface,
- &_ecore_wl_shell_surface_listener,
- win);
-
- if (win->title)
- wl_shell_surface_set_title(win->shell_surface, win->title);
-
- if (win->class_name)
- wl_shell_surface_set_class(win->shell_surface, win->class_name);
- }
}
/* trap for valid shell surface */