mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
window: Clean up keyboard-resizing code path
This commit is contained in:
parent
938fb8e6c8
commit
0e7221c361
@ -5858,46 +5858,24 @@ update_resize (MetaWindow *window,
|
||||
if (window->display->grab_op == META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN)
|
||||
{
|
||||
if ((dx > 0) && (dy > 0))
|
||||
{
|
||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_SE;
|
||||
meta_window_update_keyboard_resize (window, TRUE);
|
||||
}
|
||||
else if ((dx < 0) && (dy > 0))
|
||||
{
|
||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_SW;
|
||||
meta_window_update_keyboard_resize (window, TRUE);
|
||||
}
|
||||
else if ((dx > 0) && (dy < 0))
|
||||
{
|
||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_NE;
|
||||
meta_window_update_keyboard_resize (window, TRUE);
|
||||
}
|
||||
else if ((dx < 0) && (dy < 0))
|
||||
{
|
||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_NW;
|
||||
meta_window_update_keyboard_resize (window, TRUE);
|
||||
}
|
||||
else if (dx < 0)
|
||||
{
|
||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_W;
|
||||
meta_window_update_keyboard_resize (window, TRUE);
|
||||
}
|
||||
else if (dx > 0)
|
||||
{
|
||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_E;
|
||||
meta_window_update_keyboard_resize (window, TRUE);
|
||||
}
|
||||
else if (dy > 0)
|
||||
{
|
||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_S;
|
||||
meta_window_update_keyboard_resize (window, TRUE);
|
||||
}
|
||||
else if (dy < 0)
|
||||
{
|
||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_N;
|
||||
|
||||
meta_window_update_keyboard_resize (window, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
new_unmaximize = check_resize_unmaximize (window, dx, dy);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user