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 (window->display->grab_op == META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN)
|
||||||
{
|
{
|
||||||
if ((dx > 0) && (dy > 0))
|
if ((dx > 0) && (dy > 0))
|
||||||
{
|
|
||||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_SE;
|
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_SE;
|
||||||
meta_window_update_keyboard_resize (window, TRUE);
|
|
||||||
}
|
|
||||||
else if ((dx < 0) && (dy > 0))
|
else if ((dx < 0) && (dy > 0))
|
||||||
{
|
|
||||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_SW;
|
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_SW;
|
||||||
meta_window_update_keyboard_resize (window, TRUE);
|
|
||||||
}
|
|
||||||
else if ((dx > 0) && (dy < 0))
|
else if ((dx > 0) && (dy < 0))
|
||||||
{
|
|
||||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_NE;
|
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_NE;
|
||||||
meta_window_update_keyboard_resize (window, TRUE);
|
|
||||||
}
|
|
||||||
else if ((dx < 0) && (dy < 0))
|
else if ((dx < 0) && (dy < 0))
|
||||||
{
|
|
||||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_NW;
|
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_NW;
|
||||||
meta_window_update_keyboard_resize (window, TRUE);
|
|
||||||
}
|
|
||||||
else if (dx < 0)
|
else if (dx < 0)
|
||||||
{
|
|
||||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_W;
|
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_W;
|
||||||
meta_window_update_keyboard_resize (window, TRUE);
|
|
||||||
}
|
|
||||||
else if (dx > 0)
|
else if (dx > 0)
|
||||||
{
|
|
||||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_E;
|
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_E;
|
||||||
meta_window_update_keyboard_resize (window, TRUE);
|
|
||||||
}
|
|
||||||
else if (dy > 0)
|
else if (dy > 0)
|
||||||
{
|
|
||||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_S;
|
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_S;
|
||||||
meta_window_update_keyboard_resize (window, TRUE);
|
|
||||||
}
|
|
||||||
else if (dy < 0)
|
else if (dy < 0)
|
||||||
{
|
|
||||||
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_N;
|
window->display->grab_op = META_GRAB_OP_KEYBOARD_RESIZING_N;
|
||||||
|
|
||||||
meta_window_update_keyboard_resize (window, TRUE);
|
meta_window_update_keyboard_resize (window, TRUE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
new_unmaximize = check_resize_unmaximize (window, dx, dy);
|
new_unmaximize = check_resize_unmaximize (window, dx, dy);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user