etrunko pushed a commit to branch master.

commit 734e52d011ffd95e8af21ac22aa602647770ff29
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 | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/lib/ecore_wayland/ecore_wl_window.c 
b/src/lib/ecore_wayland/ecore_wl_window.c
index 6dc6ae2..9dca8b8 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -75,8 +75,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++;
 
@@ -281,7 +280,8 @@ ecore_wl_window_show(Ecore_Wl_Window *win)
 
    ecore_wl_window_surface_create(win);
 
-   if (win->type != ECORE_WL_WINDOW_TYPE_DND)
+   if (win->type != ECORE_WL_WINDOW_TYPE_DND &&
+       win->type != ECORE_WL_WINDOW_TYPE_NONE)
      {
         if (!win->shell_surface)
           {
@@ -316,9 +316,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;

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to