[mutter] window: Replace manual switch statement for a resizing grab op
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Replace manual switch statement for a resizing grab op
- Date: Tue, 29 Apr 2014 21:59:00 +0000 (UTC)
commit e382a4b5601acb933c8d8e24367c8b2861cdfbf1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Apr 29 15:33:09 2014 -0400
window: Replace manual switch statement for a resizing grab op
src/core/window.c | 28 +---------------------------
1 files changed, 1 insertions(+), 27 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 715f984..abe38e6 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7334,38 +7334,12 @@ meta_window_is_client_decorated (MetaWindow *window)
void
meta_window_refresh_resize_popup (MetaWindow *window)
{
- if (window->display->grab_op == META_GRAB_OP_NONE)
+ if (!meta_grab_op_is_resizing (window->display->grab_op))
return;
if (window->display->grab_window != window)
return;
- switch (window->display->grab_op)
- {
- case META_GRAB_OP_RESIZING_SE:
- case META_GRAB_OP_RESIZING_S:
- case META_GRAB_OP_RESIZING_SW:
- case META_GRAB_OP_RESIZING_N:
- case META_GRAB_OP_RESIZING_NE:
- case META_GRAB_OP_RESIZING_NW:
- case META_GRAB_OP_RESIZING_W:
- case META_GRAB_OP_RESIZING_E:
- case META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN:
- case META_GRAB_OP_KEYBOARD_RESIZING_S:
- case META_GRAB_OP_KEYBOARD_RESIZING_N:
- case META_GRAB_OP_KEYBOARD_RESIZING_W:
- case META_GRAB_OP_KEYBOARD_RESIZING_E:
- case META_GRAB_OP_KEYBOARD_RESIZING_SE:
- case META_GRAB_OP_KEYBOARD_RESIZING_NE:
- case META_GRAB_OP_KEYBOARD_RESIZING_SW:
- case META_GRAB_OP_KEYBOARD_RESIZING_NW:
- break;
-
- default:
- /* Not resizing */
- return;
- }
-
if (window->display->grab_resize_popup == NULL)
{
if (window->size_hints.width_inc > 1 ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]