window: Remove unnecessary checks

For tiling, we check whether the pointer is near the edges of
the monitor where the pointer is located, so checking that the
pointer is within the bounds of the monitor is unnecessary and
confusing.
This commit is contained in:
Florian Müllner 2011-03-21 21:43:46 +01:00
parent 14d6d63ad0
commit c9e9412540

View File

@ -8123,9 +8123,6 @@ update_move (MetaWindow *window,
&work_area);
if (meta_window_can_tile_side_by_side (window))
{
if (y >= monitor->rect.y &&
y < (monitor->rect.y + monitor->rect.height))
{
/* check if cursor is near an edge of the work area */
if (x >= monitor->rect.x && x < (work_area.x + shake_threshold))
@ -8136,7 +8133,6 @@ update_move (MetaWindow *window,
else
window->tile_mode = META_TILE_NONE;
}
}
else
window->tile_mode = META_TILE_NONE;
@ -8148,16 +8144,12 @@ update_move (MetaWindow *window,
* near the top of their screens.
*/
if (window->tile_mode == META_TILE_NONE && meta_window_can_tile_maximized (window))
{
if (x >= monitor->rect.x &&
x < (monitor->rect.x + monitor->rect.width))
{
/* check if cursor is on the top edge of the monitor*/
if (y >= monitor->rect.y && y <= work_area.y)
window->tile_mode = META_TILE_MAXIMIZED;
}
}
}
/* shake loose (unmaximize) maximized or tiled window if dragged beyond
* the threshold in the Y direction. Tiled windows can also be pulled