discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=a08a1434c103b73f2cd51965596dd24fffd5caef

commit a08a1434c103b73f2cd51965596dd24fffd5caef
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Wed Aug 12 19:26:19 2015 -0400

    move x11 ee resize callback to comp_canvas, simplify x11 randr event handler
    
    this should ensure that all compositors accurately perform resize-related
    canvas operations
---
 src/bin/e_comp_canvas.c |  7 +++++++
 src/bin/e_comp_x.c      | 33 +--------------------------------
 2 files changed, 8 insertions(+), 32 deletions(-)

diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c
index a380a7d..87fc003 100644
--- a/src/bin/e_comp_canvas.c
+++ b/src/bin/e_comp_canvas.c
@@ -204,6 +204,12 @@ _e_comp_canvas_cb_zone_sort(const void *data1, const void 
*data2)
    return z1->num - z2->num;
 }
 
+static void
+_e_comp_canvas_resize(Ecore_Evas *ee EINA_UNUSED)
+{
+   e_randr2_screens_setup(e_comp->w, e_comp->h);
+   e_comp_canvas_update();
+}
 
 E_API Eina_Bool
 e_comp_canvas_init(int w, int h)
@@ -260,6 +266,7 @@ e_comp_canvas_init(int w, int h)
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_ON, 
_e_comp_cb_screensaver_on, NULL);
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_OFF, 
_e_comp_cb_screensaver_off, NULL);
 
+   ecore_evas_callback_resize_set(e_comp->ee, _e_comp_canvas_resize);
    ecore_evas_resize(e_comp->ee, w, h);
 
    return EINA_TRUE;
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index fa2d80e..9c6e8d9 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -4741,45 +4741,15 @@ _e_comp_x_cb_frame_extents_request(void *data 
EINA_UNUSED, int ev_type EINA_UNUS
 static Eina_Bool
 _e_comp_x_randr_change(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
-   if ((e_comp->w != e_randr2->w) ||
-       (e_comp->h != e_randr2->h))
-     {
-        if (e_comp->comp_type == E_PIXMAP_TYPE_X)
-          e_comp_canvas_resize(e_randr2->w, e_randr2->h);
-     }
-   else
-     {
-        E_Client *ec;
-
-        ecore_x_netwm_desk_size_set(e_comp->root, e_comp->w, e_comp->h);
-        if (e_comp->comp_type == E_PIXMAP_TYPE_X)
-          e_randr2_screens_setup(e_comp->w, e_comp->h);
-
-        if (e_comp->comp_type == E_PIXMAP_TYPE_X)
-          e_comp_canvas_update();
-        E_CLIENT_FOREACH(ec)
-          {
-             if (!e_client_util_ignored_get(ec))
-               _e_comp_x_client_zone_geometry_set(ec);
-          }
-     }
-   return ECORE_CALLBACK_RENEW;
-}
-
-static void
-_e_comp_x_ee_resize(Ecore_Evas *ee EINA_UNUSED)
-{
    E_Client *ec;
 
    ecore_x_netwm_desk_size_set(e_comp->root, e_comp->w, e_comp->h);
-   e_randr2_screens_setup(e_comp->w, e_comp->h);
-
-   e_comp_canvas_update();
    E_CLIENT_FOREACH(ec)
      {
         if (!e_client_util_ignored_get(ec))
           _e_comp_x_client_zone_geometry_set(ec);
      }
+   return ECORE_CALLBACK_RENEW;
 }
 
 static void
@@ -5132,7 +5102,6 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
                            ECORE_EVENT_MODIFIER_CTRL |
                            ECORE_EVENT_MODIFIER_ALT, 0);
 
-   ecore_evas_callback_resize_set(e_comp->ee, _e_comp_x_ee_resize);
    ecore_evas_data_set(e_comp->ee, "comp", e_comp);
    e_comp->bindings_grab_cb = _e_comp_x_bindings_grab_cb;
    e_comp->bindings_ungrab_cb = _e_comp_x_bindings_ungrab_cb;

-- 


Reply via email to