ecore/wayland: Don't use edge info for resizing in some cases.
authorRafael Antognolli <antognolli@gmail.com>
Fri, 8 Feb 2013 11:50:09 +0000 (11:50 +0000)
committerRafael Antognolli <antognolli@gmail.com>
Fri, 8 Feb 2013 11:50:09 +0000 (11:50 +0000)
Maximized/fullscreen will handle the repositioning of the window by
themselves, and restore the window to its original position when coming
back from that state. So there's no need to use the edge information and
manually adjust the window offsets.

SVN revision: 83779

src/lib/ecore_wayland/ecore_wl_window.c

index b01438b..f870ac9 100644 (file)
@@ -380,6 +380,7 @@ ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized)
         _ecore_wl_window_configure_send(win, win->saved_allocation.w, 
                                         win->saved_allocation.h);
      }
+   win->edges = 0;
    _ecore_wl_window_state_changed(win);
 }
 
@@ -407,6 +408,7 @@ ecore_wl_window_fullscreen_set(Ecore_Wl_Window *win, Eina_Bool fullscreen)
         _ecore_wl_window_configure_send(win, win->saved_allocation.w, 
                                         win->saved_allocation.h);
      }
+   win->edges = 0;
    _ecore_wl_window_state_changed(win);
 }
 
@@ -579,7 +581,8 @@ _ecore_wl_window_cb_configure(void *data, struct wl_shell_surface *shell_surface
 
    if ((win->allocation.w != w) || (win->allocation.h != h))
      {
-        win->edges = edges;
+        if (win->type == ECORE_WL_WINDOW_TYPE_TOPLEVEL)
+          win->edges = edges;
         if (win->region.input) wl_region_destroy(win->region.input);
         win->region.input = NULL;
         if (win->region.opaque) wl_region_destroy(win->region.opaque);