From d39c3131fe9fc7621bb27aefbbb6917a098d89ce Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Mon, 4 Jan 2010 02:53:51 +0000 Subject: [PATCH] Remove a printf. Do not set lock_client_location or lock_user_location during border assign hook. (These were responsible for elm_indicator window not being movable) Add a new function so that we can move indicator window to proper position if we are not in landscape mode. ( This resets indicator window to top position when mode changes to non-landscape) Thanks for the help Raster ;) SVN revision: 44871 --- src/modules/illume2/e_mod_layout.c | 3 --- src/modules/illume2/policies/illume/layout.c | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/modules/illume2/e_mod_layout.c b/src/modules/illume2/e_mod_layout.c index 54c23cfc2..17678d25f 100644 --- a/src/modules/illume2/e_mod_layout.c +++ b/src/modules/illume2/e_mod_layout.c @@ -48,7 +48,6 @@ e_mod_layout_init(void) free(file); continue; } - E_ILLUME_INF("Found Policy: %s", file); snprintf(dir, sizeof(dir), "%s/enlightenment/modules/illume2/policies/%s", e_prefix_lib_get(), file); @@ -318,13 +317,11 @@ _e_mod_layout_cb_hook_post_border_assign(void *data, void *data2) bd->remember = NULL; } bd->lock_border = 1; - bd->lock_client_location = 1; bd->lock_client_size = 1; bd->lock_client_desk = 1; bd->lock_client_sticky = 1; bd->lock_client_shade = 1; bd->lock_client_maximize = 1; - bd->lock_user_location = 1; bd->lock_user_size = 1; bd->lock_user_sticky = 1; } diff --git a/src/modules/illume2/policies/illume/layout.c b/src/modules/illume2/policies/illume/layout.c index d4bd08486..fde9ee7e2 100644 --- a/src/modules/illume2/policies/illume/layout.c +++ b/src/modules/illume2/policies/illume/layout.c @@ -3,6 +3,7 @@ /* local function prototypes */ static void _border_resize_fx(E_Border *bd, int bx, int by, int bw, int bh); +static void _border_resize_move(E_Border *bd, int bx, int by, int bw, int bh); static void _zone_layout_single(E_Border *bd); static void _zone_layout_dual(E_Border *bd); static void _zone_layout_dual_top(E_Border *bd); @@ -181,14 +182,14 @@ _layout_zone_layout(E_Zone *zone) { /* if we are not in dual mode, then set shelf to top */ if (!il_cfg->policy.mode.dual) - _border_resize_fx(bd, zone->x, zone->y, zone->w, shelfsize); + _border_resize_move(bd, zone->x, zone->y, zone->w, shelfsize); else { /* make sure we are in landscape mode */ if (il_cfg->policy.mode.side == 0) - _border_resize_fx(bd, zone->x, bd->y, zone->w, shelfsize); - else - _border_resize_fx(bd, zone->x, zone->y, zone->w, shelfsize); + _border_resize_move(bd, zone->x, bd->y, zone->w, shelfsize); + else + _border_resize_move(bd, zone->x, zone->y, zone->w, shelfsize); } } e_border_stick(bd); @@ -306,6 +307,15 @@ _border_resize_fx(E_Border *bd, int bx, int by, int bw, int bh) } } +static void +_border_resize_move(E_Border *bd, int bx, int by, int bw, int bh) +{ + if ((bd->w != bw) || (bd->h != bh)) + e_border_resize(bd, bw, bh); + if ((bd->x != bx) || (bd->y != by)) + e_border_move(bd, bx, by); +} + static void _zone_layout_single(E_Border *bd) {