From 8610b9eaa930826789d2c6a788d2b598eb26ae70 Mon Sep 17 00:00:00 2001 From: Andreas Volz Date: Sat, 12 Jun 2010 12:54:18 +0000 Subject: [PATCH] Based on an IRC discussion I changed the smart placing mechanism to hit also if icccm.request_pos is true. Many Gnome based application try to start with coordinates below the shelfes and E allows it. This smoothly moves this windows away is smart placement is active. It's not as aggressive as Metacity, but now usable with vertical shelfes. If you don't like this change hit me and discuss it again on the list. SVN revision: 49654 --- src/bin/e_border.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/bin/e_border.c b/src/bin/e_border.c index b41a26d84..9036f6aea 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -6466,6 +6466,24 @@ _e_border_eval(E_Border *bd) bd->x = att->x; bd->y = att->y; } + + /* + * This code ensures that even if app windows like to open + * in stupid places (e.g. below shelfes) it moves them smart away + */ + { + Eina_List *skiplist = NULL; + int new_x, new_y; + + skiplist = eina_list_append(skiplist, bd); + e_place_zone_region_smart(bd->zone, skiplist, + bd->x, bd->y, bd->w, bd->h, + &new_x, &new_y); + eina_list_free(skiplist); + bd->x += new_x; + bd->y += new_y; + } + if (e_container_zone_at_point_get(bd->zone->container, bd->x, bd->y)) { bd->changes.pos = 1;