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:
parent
14d6d63ad0
commit
c9e9412540
@ -8124,18 +8124,14 @@ update_move (MetaWindow *window,
|
|||||||
|
|
||||||
if (meta_window_can_tile_side_by_side (window))
|
if (meta_window_can_tile_side_by_side (window))
|
||||||
{
|
{
|
||||||
if (y >= monitor->rect.y &&
|
/* check if cursor is near an edge of the work area */
|
||||||
y < (monitor->rect.y + monitor->rect.height))
|
if (x >= monitor->rect.x && x < (work_area.x + shake_threshold))
|
||||||
{
|
window->tile_mode = META_TILE_LEFT;
|
||||||
/* check if cursor is near an edge of the work area */
|
else if (x >= work_area.x + work_area.width - shake_threshold &&
|
||||||
if (x >= monitor->rect.x && x < (work_area.x + shake_threshold))
|
x < (monitor->rect.x + monitor->rect.width))
|
||||||
window->tile_mode = META_TILE_LEFT;
|
window->tile_mode = META_TILE_RIGHT;
|
||||||
else if (x >= work_area.x + work_area.width - shake_threshold &&
|
else
|
||||||
x < (monitor->rect.x + monitor->rect.width))
|
window->tile_mode = META_TILE_NONE;
|
||||||
window->tile_mode = META_TILE_RIGHT;
|
|
||||||
else
|
|
||||||
window->tile_mode = META_TILE_NONE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
window->tile_mode = META_TILE_NONE;
|
window->tile_mode = META_TILE_NONE;
|
||||||
@ -8149,13 +8145,9 @@ update_move (MetaWindow *window,
|
|||||||
*/
|
*/
|
||||||
if (window->tile_mode == META_TILE_NONE && meta_window_can_tile_maximized (window))
|
if (window->tile_mode == META_TILE_NONE && meta_window_can_tile_maximized (window))
|
||||||
{
|
{
|
||||||
if (x >= monitor->rect.x &&
|
/* check if cursor is on the top edge of the monitor*/
|
||||||
x < (monitor->rect.x + monitor->rect.width))
|
if (y >= monitor->rect.y && y <= work_area.y)
|
||||||
{
|
window->tile_mode = META_TILE_MAXIMIZED;
|
||||||
/* 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user