never apply window placement policy on ConfigureRequest

geometry_auto_move is an option which should only be applied to "new" clients. we were erroneously applying it during client move/resize requests, which likely was causing unintended behavior. if this becomes an issue, the correct solution is to create (groan) another option to enforce window placement policy either [at all times] or [for client geometry requests]
This commit is contained in:
discomfitor 2013-09-26 18:16:32 +01:00
parent 8404e3c180
commit 6b41a6dba9
1 changed files with 4 additions and 28 deletions

View File

@ -5163,26 +5163,6 @@ _e_border_cb_window_reparent(void *data __UNUSED__,
return ECORE_CALLBACK_PASS_ON;
}
static void
_e_border_xy_place_helper(E_Border *bd, int *x, int *y)
{
Eina_List *skiplist;
if ((e_config->window_placement_policy != E_WINDOW_PLACEMENT_SMART) &&
(e_config->window_placement_policy != E_WINDOW_PLACEMENT_ANTIGADGET))
return;
skiplist = eina_list_append(NULL, bd);
if (bd->desk)
e_place_desk_region_smart(bd->desk, skiplist,
bd->x, bd->y, bd->w, bd->h,
x, y);
else
e_place_zone_region_smart(bd->zone, skiplist,
bd->x, bd->y, bd->w, bd->h,
x, y);
eina_list_free(skiplist);
}
static Eina_Bool
_e_border_cb_window_configure_request(void *data __UNUSED__,
int ev_type __UNUSED__,
@ -5224,7 +5204,6 @@ _e_border_cb_window_configure_request(void *data __UNUSED__,
y = e->y;
if (y - bd->client_inset.t >= zy) y -= bd->client_inset.t;
}
_e_border_xy_place_helper(bd, &x, &y);
if ((e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_W) ||
(e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_H))
{
@ -5370,15 +5349,12 @@ _e_border_cb_window_configure_request(void *data __UNUSED__,
}
}
e_border_resize(bd, w, h);
if (e_config->geometry_auto_move == 1)
{
int new_x = bd->x, new_y = bd->y;
_e_border_xy_place_helper(bd, &new_x, &new_y);
e_border_move(bd, new_x, new_y);
}
}
}
/* note: we USED to forcibly apply a window placement policy here
* this is WRONG. the geometry_auto_move option is ONLY for
* new clients, in which case we will autocorrect the positioning anyway.
*/
}
}
if (!bd->lock_client_stacking)