mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
display: Replace the inline logic with a static inline
So we won't get it wrong in the future.
This commit is contained in:
parent
f2283ec634
commit
c3e87ee896
@ -1167,10 +1167,16 @@ meta_get_display (void)
|
||||
return the_display;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
grab_op_is_window (MetaGrabOp op)
|
||||
{
|
||||
return GRAB_OP_GET_BASE_TYPE (op) == META_GRAB_OP_WINDOW_BASE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_grab_op_is_mouse (MetaGrabOp op)
|
||||
{
|
||||
if (GRAB_OP_GET_BASE_TYPE (op) != META_GRAB_OP_WINDOW_BASE)
|
||||
if (grab_op_is_window (op))
|
||||
return FALSE;
|
||||
|
||||
return (op & META_GRAB_OP_WINDOW_FLAG_KEYBOARD) == 0;
|
||||
@ -1179,7 +1185,7 @@ meta_grab_op_is_mouse (MetaGrabOp op)
|
||||
gboolean
|
||||
meta_grab_op_is_keyboard (MetaGrabOp op)
|
||||
{
|
||||
if (GRAB_OP_GET_BASE_TYPE (op) != META_GRAB_OP_WINDOW_BASE)
|
||||
if (grab_op_is_window (op))
|
||||
return FALSE;
|
||||
|
||||
return (op & META_GRAB_OP_WINDOW_FLAG_KEYBOARD) != 0;
|
||||
@ -1188,7 +1194,7 @@ meta_grab_op_is_keyboard (MetaGrabOp op)
|
||||
gboolean
|
||||
meta_grab_op_is_resizing (MetaGrabOp op)
|
||||
{
|
||||
if (GRAB_OP_GET_BASE_TYPE (op) != META_GRAB_OP_WINDOW_BASE)
|
||||
if (grab_op_is_window (op))
|
||||
return FALSE;
|
||||
|
||||
return (op & META_GRAB_OP_WINDOW_DIR_MASK) != 0;
|
||||
@ -1197,7 +1203,7 @@ meta_grab_op_is_resizing (MetaGrabOp op)
|
||||
gboolean
|
||||
meta_grab_op_is_moving (MetaGrabOp op)
|
||||
{
|
||||
if (GRAB_OP_GET_BASE_TYPE (op) != META_GRAB_OP_WINDOW_BASE)
|
||||
if (grab_op_is_window (op))
|
||||
return FALSE;
|
||||
|
||||
return (op & META_GRAB_OP_WINDOW_DIR_MASK) == 0;
|
||||
|
Loading…
Reference in New Issue
Block a user