[mutter] common: Make UNKNOWN a flag, not a combination of all directions
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] common: Make UNKNOWN a flag, not a combination of all directions
- Date: Tue, 19 Aug 2014 19:11:47 +0000 (UTC)
commit 711f0c0c50d20f0b3fb02969fe0b1c3acde77459
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Aug 19 15:07:15 2014 -0400
common: Make UNKNOWN a flag, not a combination of all directions
This was the original intention, but it was thought to be easier
to mark this as a combination of all directions. It turned out to
instead cause subtle bugs since code that blindly checked & DIR_WEST or
similar turned out to get it wrong when it was UNKNOWN, so just make
it an explicit flag.
This fixes the cursor appearing in the wrong place when starting a
keyboard resize.
src/meta/common.h | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/meta/common.h b/src/meta/common.h
index 4dc7ea5..4ad0c08 100644
--- a/src/meta/common.h
+++ b/src/meta/common.h
@@ -126,25 +126,24 @@ typedef enum
*
* If the directions field is 0000, then the operation is a move,
* not a resize.
- * If the directions field is 1111, then it's an unknown direction.
*/
enum
{
META_GRAB_OP_WINDOW_FLAG_KEYBOARD = 0x0100,
+ META_GRAB_OP_WINDOW_FLAG_UNKNOWN = 0x0200,
META_GRAB_OP_WINDOW_DIR_WEST = 0x1000,
META_GRAB_OP_WINDOW_DIR_EAST = 0x2000,
META_GRAB_OP_WINDOW_DIR_SOUTH = 0x4000,
META_GRAB_OP_WINDOW_DIR_NORTH = 0x8000,
- META_GRAB_OP_WINDOW_DIR_UNKNOWN = 0xF000,
META_GRAB_OP_WINDOW_DIR_MASK = 0xF000,
/* WGO = "window grab op". shorthand for below */
_WGO_K = META_GRAB_OP_WINDOW_FLAG_KEYBOARD,
+ _WGO_U = META_GRAB_OP_WINDOW_FLAG_UNKNOWN,
_WGO_W = META_GRAB_OP_WINDOW_DIR_WEST,
_WGO_E = META_GRAB_OP_WINDOW_DIR_EAST,
_WGO_S = META_GRAB_OP_WINDOW_DIR_SOUTH,
_WGO_N = META_GRAB_OP_WINDOW_DIR_NORTH,
- _WGO_U = META_GRAB_OP_WINDOW_DIR_UNKNOWN,
};
#define GRAB_OP_GET_BASE_TYPE(op) (op & 0x00FF)
@@ -172,7 +171,7 @@ typedef enum
META_GRAB_OP_RESIZING_SE = META_GRAB_OP_WINDOW_BASE | _WGO_S | _WGO_E,
META_GRAB_OP_RESIZING_W = META_GRAB_OP_WINDOW_BASE | _WGO_W,
META_GRAB_OP_KEYBOARD_MOVING = META_GRAB_OP_WINDOW_BASE | _WGO_K,
- META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN = META_GRAB_OP_WINDOW_BASE | _WGO_U | _WGO_K,
+ META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN = META_GRAB_OP_WINDOW_BASE | _WGO_K | _WGO_U,
META_GRAB_OP_KEYBOARD_RESIZING_NW = META_GRAB_OP_WINDOW_BASE | _WGO_N | _WGO_W | _WGO_K,
META_GRAB_OP_KEYBOARD_RESIZING_N = META_GRAB_OP_WINDOW_BASE | _WGO_N | _WGO_K,
META_GRAB_OP_KEYBOARD_RESIZING_NE = META_GRAB_OP_WINDOW_BASE | _WGO_N | _WGO_E | _WGO_K,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]