etrunko pushed a commit to branch ecore-1.7.

commit f092f6a9bc0779987ada35a2e05ba77cbf09b93a
Author: Eduardo Lima (Etrunko) <[email protected]>
Date:   Wed Jun 12 17:15:48 2013 -0300

    ecore_wl: Handle ECORE_WL_WINDOW_TYPE_NONE correctly
    
    Also changes the default window type to ECORE_WL_WINDOW_TYPE_TOPLEVEL as it 
is
    the most used case. If someone needs another type, set it manually.
    
    Signed-off-by: Eduardo Lima (Etrunko) <[email protected]>
---
 src/lib/ecore_wayland/ecore_wl_window.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/lib/ecore_wayland/ecore_wl_window.c 
b/src/lib/ecore_wayland/ecore_wl_window.c
index 22d0c22..4187f0f 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -117,8 +117,7 @@ ecore_wl_window_new(Ecore_Wl_Window *parent, int x, int y, 
int w, int h, int buf
    win->allocation.h = h;
    win->saved_allocation = win->allocation;
    win->transparent = EINA_FALSE;
-   /* win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; */
-   win->type = ECORE_WL_WINDOW_TYPE_NONE;
+   win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
    win->buffer_type = buffer_type;
    win->id = _win_id++;
 
@@ -368,10 +367,13 @@ ecore_wl_window_show(Ecore_Wl_Window *win)
    wl_surface_set_user_data(win->surface, win);
    /* wl_surface_add_listener(win->surface, &_ecore_wl_surface_listener, win); 
*/
 
-   win->shell_surface = 
-     wl_shell_get_shell_surface(_ecore_wl_disp->wl.shell, win->surface);
-   wl_shell_surface_add_listener(win->shell_surface, 
-                                 &_ecore_wl_shell_surface_listener, win);
+   if (win->type != ECORE_WL_WINDOW_TYPE_NONE)
+     {
+        win->shell_surface =
+           wl_shell_get_shell_surface(_ecore_wl_disp->wl.shell, win->surface);
+           wl_shell_surface_add_listener(win->shell_surface,
+                                         &_ecore_wl_shell_surface_listener, 
win);
+     }
 
    switch (win->type)
      {
@@ -395,9 +397,6 @@ ecore_wl_window_show(Ecore_Wl_Window *win)
                                    win->parent->surface, 
                                    win->allocation.x, win->allocation.y, 0);
         break;
-      case ECORE_WL_WINDOW_TYPE_NONE:
-        win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
-        /* fallthrough */
       case ECORE_WL_WINDOW_TYPE_TOPLEVEL:
         wl_shell_surface_set_toplevel(win->shell_surface);
         break;

-- 

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk

Reply via email to