devilhorns pushed a commit to branch master.

commit 5c2eadea98ff14c76d109da9da22ad92988d1748
Author: Chris Michael <[email protected]>
Date:   Wed Aug 21 08:31:11 2013 +0100

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

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
index 467030f..423d261 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
@@ -323,13 +323,10 @@ _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h)
         if (wdata->win)
           {
              Ecore_Wl_Window *win;
-             Evas_Engine_Info_Wayland_Shm *einfo;
 
              win = wdata->win;
 
-             if ((einfo = (Evas_Engine_Info_Wayland_Shm 
*)evas_engine_info_get(ee->evas)))
-               einfo->info.edges = win->edges;
-
+             _ecore_evas_wayland_shm_resize_edge_set(ee, win->edges);
              win->edges = 0;
 
              win->server_allocation = win->allocation;
@@ -548,7 +545,6 @@ _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location)
    if (wdata->win) 
      {
         int fw, fh;
-        Evas_Engine_Info_Wayland_Shm *einfo;
 
         wdata->win->resizing = EINA_TRUE;
         evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
@@ -558,8 +554,17 @@ _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int 
location)
         else
           ecore_wl_window_resize(wdata->win, ee->w + fw, ee->h + fh, location);
 
-        if ((einfo = (Evas_Engine_Info_Wayland_Shm 
*)evas_engine_info_get(ee->evas)))
-          einfo->info.edges = location;
+        _ecore_evas_wayland_shm_resize_edge_set(ee, location);
      }
 }
+
+void 
+_ecore_evas_wayland_shm_resize_edge_set(Ecore_Evas *ee, int edge)
+{
+   Evas_Engine_Info_Wayland_Shm *einfo;
+
+   if ((einfo = (Evas_Engine_Info_Wayland_Shm 
*)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