window: Clean up keyboard-resizing code path

This commit is contained in:
Jasper St. Pierre 2014-07-27 15:03:38 +02:00
parent 938fb8e6c8
commit 0e7221c361

View File

@ -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);