From: Mike Blumenkrantz Date: Tue, 22 Sep 2015 16:42:39 +0000 (-0400) Subject: redo client maximization when a non-overlap shelf changes geometry X-Git-Tag: upstream/0.20.0~259 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32aa8127012b2403bf8585cdf0d99d9a7ca7a194;p=platform%2Fupstream%2Fenlightenment.git 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 --- 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