devilhorns pushed a commit to branch master.

commit 6f5f9d075d88f6fc3589dc07fef8a7e65829e09e
Author: Chris Michael <[email protected]>
Date:   Wed Aug 21 08:31:29 2013 +0100

    Reduce duplicated code for setting resize edges.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 .../engines/wayland/ecore_evas_wayland_egl.c          | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
index 1d5ac49..6b27de8 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
@@ -329,13 +329,10 @@ _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h)
         if (wdata->win)
           {
              Ecore_Wl_Window *win;
-             Evas_Engine_Info_Wayland_Egl *einfo;
 
              win = wdata->win;
 
-             if ((einfo = (Evas_Engine_Info_Wayland_Egl 
*)evas_engine_info_get(ee->evas)))
-               einfo->info.edges = win->edges;
-
+             _ecore_evas_wayland_egl_resize_edge_set(ee, win->edges);
              win->edges = 0;
 
              win->server_allocation = win->allocation;
@@ -550,7 +547,6 @@ _ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location)
    wdata = ee->engine.data;
    if (wdata->win) 
      {
-        Evas_Engine_Info_Wayland_Egl *einfo;
         int fw, fh;
 
         wdata->win->resizing = EINA_TRUE;
@@ -561,8 +557,17 @@ _ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int 
location)
         else
           ecore_wl_window_resize(wdata->win, ee->w + fh, ee->h + fw, location);
 
-        if ((einfo = (Evas_Engine_Info_Wayland_Egl 
*)evas_engine_info_get(ee->evas)))
-          einfo->info.edges = location;
+        _ecore_evas_wayland_egl_resize_edge_set(ee, location);
      }
 }
+
+void 
+_ecore_evas_wayland_egl_resize_edge_set(Ecore_Evas *ee, int edge)
+{
+   Evas_Engine_Info_Wayland_Egl *einfo;
+
+   if ((einfo = (Evas_Engine_Info_Wayland_Egl 
*)evas_engine_info_get(ee->evas)))
+     einfo->info.edges = edge;
+}
+
 #endif

-- 

------------------------------------------------------------------------------
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