fix to prevent lost windows if resizing a window to offscreen coordinates

SVN revision: 50133
This commit is contained in:
Andreas Volz 2010-07-08 21:05:34 +00:00
parent 6e18235fb2
commit c0a5d4e794
1 changed files with 4 additions and 1 deletions

View File

@ -4298,7 +4298,6 @@ _e_border_cb_window_configure_request(__UNUSED__ void *data, __UNUSED__ int ev_t
* This is really useful for size jumping file dialogs.
*/
if (bd->zone)
e_zone_useful_geometry_get(bd->zone, &zx, &zy, &zw, &zh);
@ -4318,10 +4317,14 @@ _e_border_cb_window_configure_request(__UNUSED__ void *data, __UNUSED__ int ev_t
// move window horizontal if resize to not useful geometry
if (bd->x + bd->w > zx + zw)
rx = zx + zw - bd->w;
else if (bd->x < zx)
rx = zx;
// move window vertical if resize to not useful geometry
if (bd->y + bd->h > zy + zh)
ry = zy + zh - bd->h;
else if (bd->y < zy)
ry = zy;
e_border_move(bd, rx, ry);
}