display: Use a named mask constant inside is_moving / is_resizing

This helps clear up what's going on a bit.
This commit is contained in:
Jasper St. Pierre 2014-08-15 17:40:52 -04:00
parent e24863d175
commit d06e4beb7f
2 changed files with 3 additions and 2 deletions

View File

@ -1191,7 +1191,7 @@ meta_grab_op_is_resizing (MetaGrabOp op)
if (GRAB_OP_GET_BASE_TYPE (op) != META_GRAB_OP_WINDOW_BASE)
return FALSE;
return (op & 0xF000) != 0;
return (op & META_GRAB_OP_WINDOW_DIR_MASK) != 0;
}
gboolean
@ -1200,7 +1200,7 @@ meta_grab_op_is_moving (MetaGrabOp op)
if (GRAB_OP_GET_BASE_TYPE (op) != META_GRAB_OP_WINDOW_BASE)
return FALSE;
return (op & 0xF000) == 0;
return (op & META_GRAB_OP_WINDOW_DIR_MASK) == 0;
}
/**

View File

@ -136,6 +136,7 @@ enum
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,