discomfitor pushed a commit to branch master.

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

commit 32aa8127012b2403bf8585cdf0d99d9a7ca7a194
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Sep 22 12:42:39 2015 -0400

    redo client maximization when a non-overlap shelf changes geometry
    
    this fixes the annoying case of needing to remaximize all windows when
    a shelf resizes in order to account for new geometry
---
 src/bin/e_shelf.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c
index d138778..d88360e 100644
--- a/src/bin/e_shelf.c
+++ b/src/bin/e_shelf.c
@@ -86,6 +86,24 @@ static Ecore_Event_Handler *_e_shelf_gadcon_populate_handler 
= NULL;
 static Ecore_Event_Handler *_e_shelf_module_init_end_handler = NULL;
 static Ecore_Event_Handler *_e_shelf_zone_moveresize_handler = NULL;
 
+static void
+_e_shelf_remaximize(E_Shelf *es)
+{
+   E_Client *ec;
+
+   if (es->cfg->overlap) return;
+   E_CLIENT_FOREACH(ec)
+     {
+        E_Maximize max = ec->maximized;
+
+        if (!ec->maximized) continue;
+        if ((!ec->sticky) && (!e_shelf_desk_visible(es, ec->desk ?: 
e_desk_current_get(es->zone))))
+          continue;
+        e_client_unmaximize(ec, ec->maximized);
+        e_client_maximize(ec, max);
+     }
+}
+
 /* externally accessible functions */
 EINTERN int
 e_shelf_init(void)
@@ -472,9 +490,11 @@ e_shelf_move(E_Shelf *es, int x, int y)
 {
    E_OBJECT_CHECK(es);
    E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
+   if ((es->x == x) && (es->y == y)) return;
    es->x = x;
    es->y = y;
    evas_object_move(es->comp_object, es->zone->x + es->x, es->zone->y + es->y);
+   _e_shelf_remaximize(es);
 }
 
 E_API void
@@ -482,9 +502,11 @@ e_shelf_resize(E_Shelf *es, int w, int h)
 {
    E_OBJECT_CHECK(es);
    E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
+   if ((es->w == w) && (es->h == h)) return;
    es->w = w;
    es->h = h;
    evas_object_resize(es->comp_object, es->w, es->h);
+   _e_shelf_remaximize(es);
 }
 
 E_API void
@@ -492,12 +514,14 @@ e_shelf_move_resize(E_Shelf *es, int x, int y, int w, int 
h)
 {
    E_OBJECT_CHECK(es);
    E_OBJECT_TYPE_CHECK(es, E_SHELF_TYPE);
+   if ((es->x == x) && (es->y == y) && (es->w == w) && (es->h == h)) return;
    es->x = x;
    es->y = y;
    es->w = w;
    es->h = h;
    evas_object_move(es->comp_object, es->zone->x + es->x, es->zone->y + es->y);
    evas_object_resize(es->comp_object, es->w, es->h);
+   _e_shelf_remaximize(es);
 }
 
 E_API void

-- 


Reply via email to