devilhorns pushed a commit to branch master.

commit 2c9a19503f975dd407454e782638b6b66fe35c53
Author: Chris Michael <[email protected]>
Date:   Wed Aug 21 08:28:48 2013 +0100

    Add function for setting/resetting window resize edges to remove
    duplicated code.
    Resize the frame object before we update the window saved size.
    Remove (again) call to _ecore_evas_wayland_resize and set the resize
    edge of the window.
    
    NB: The call to _ecore_evas_wayland_resize ends up sending duplicate
    configure events here, hence whey it is removed.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 .../engines/wayland/ecore_evas_wayland_common.c    | 29 ++++++++++++++++++----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 1a94b83..746fa0a 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -36,6 +36,7 @@ EVAS_SMART_SUBCLASS_NEW(_smart_frame_type, 
_ecore_evas_wl_frame,
 static int _ecore_evas_wl_init_count = 0;
 static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[5];
 
+static void _ecore_evas_wayland_resize_edge_set(Ecore_Evas *ee, int edge);
 static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
 
 /* local function prototypes */
@@ -264,20 +265,20 @@ _ecore_evas_wl_common_cb_window_configure(void *data 
EINA_UNUSED, int type EINA_
              evas_output_viewport_set(ee->evas, 0, 0, ev->w, ev->h);
           }
 
+        if (wdata->frame)
+          evas_object_resize(wdata->frame, ev->w, ev->h);
+
         if (wdata->win)
           {
              Ecore_Wl_Window *win;
 
              win = wdata->win;
 
+             _ecore_evas_wayland_resize_edge_set(ee, win->edges);
+
              win->server_allocation = win->allocation;
              ecore_wl_window_update_size(wdata->win, ev->w, ev->h);
-
-             _ecore_evas_wayland_resize(ee, win->edges);
           }
-
-        if (wdata->frame)
-          evas_object_resize(wdata->frame, ev->w, ev->h);
      }
 
    return ECORE_CALLBACK_PASS_ON;
@@ -1267,6 +1268,24 @@ _ecore_evas_wl_common_screen_dpi_get(const Ecore_Evas 
*ee EINA_UNUSED, int *xdpi
    if (ydpi) *ydpi = dpi;
 }
 
+static void 
+_ecore_evas_wayland_resize_edge_set(Ecore_Evas *ee, int edge)
+{
+   if (!ee) return;
+   if (!strcmp(ee->driver, "wayland_shm"))
+     {
+#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM
+        _ecore_evas_wayland_shm_resize_edge_set(ee, edge);
+#endif
+     }
+   else if (!strcmp(ee->driver, "wayland_egl"))
+     {
+#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
+        _ecore_evas_wayland_egl_resize_edge_set(ee, edge);
+#endif
+     }
+}
+
 static void
 _ecore_evas_wayland_resize(Ecore_Evas *ee, int location)
 {

-- 

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk

Reply via email to