devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bbf196ad79402c7e37961b51f866ec15932310be

commit bbf196ad79402c7e37961b51f866ec15932310be
Author: Chris Michael <[email protected]>
Date:   Tue Sep 2 09:14:36 2014 -0400

    ecore-wayland: Cleanup shell surface creation
    
    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 <[email protected]>
---
 src/lib/ecore_wayland/ecore_wl_window.c | 46 +++++++--------------------------
 1 file 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 75fcd7d..23f0b9d 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 */

-- 


Reply via email to