use more accurate heuristics when calculating ConfigureRequest move coords:

1) invalidate moves resulting from stupid clients trying to re-set their current position (SUP WINE. YEAH, I'M TALKIN TO YOU, BUDDY. WHY YOU GOTTA BE MESSIN WITH MY WINDOW COORDS?)

2) clamp coords when screen limit policy is set to prevent clients from being outside the screen at all

3) all things are allowed, nothing is prohibited
This commit is contained in:
discomfitor 2013-09-26 19:11:33 +01:00
parent f5aa2779b1
commit 8b596394d6
1 changed files with 20 additions and 4 deletions

View File

@ -5196,13 +5196,29 @@ _e_border_cb_window_configure_request(void *data __UNUSED__,
e_zone_useful_geometry_get(bd->zone, &zx, &zy, &zw, &zh);
if (e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_X)
{
x = e->x;
if (x - bd->client_inset.l >= zx) x -= bd->client_inset.l;
/* ignore moves (usually from wine clients)
* which would cause the window to jump
* by the size of the frame
*/
if (bd->x + bd->client_inset.l == e->x)
x = bd->x;
else if (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN)
x = E_CLAMP(e->x, zx, zx + zw - bd->w);
else
x = e->x;
}
if (e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_Y)
{
y = e->y;
if (y - bd->client_inset.t >= zy) y -= bd->client_inset.t;
/* ignore moves (usually from wine clients)
* which would cause the window to jump
* by the size of the frame
*/
if (bd->y + bd->client_inset.t == e->y)
y = bd->y;
else if (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN)
y = E_CLAMP(e->y, zy, zy + zh - bd->h);
else
y = e->y;
}
if ((e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_W) ||
(e->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_H))