display: Rename meta_grab_op_is_mouse to is_moving_or_resizing
is_mouse actually checks for all combinations of moving/resizing grab ops, which is quite confusing. Just rename it.
This commit is contained in:
parent
beca90a689
commit
d09116ebce
@ -439,7 +439,7 @@ int meta_resize_gravity_from_grab_op (MetaGrabOp op);
|
|||||||
|
|
||||||
gboolean meta_grab_op_is_moving (MetaGrabOp op);
|
gboolean meta_grab_op_is_moving (MetaGrabOp op);
|
||||||
gboolean meta_grab_op_is_resizing (MetaGrabOp op);
|
gboolean meta_grab_op_is_resizing (MetaGrabOp op);
|
||||||
gboolean meta_grab_op_is_mouse (MetaGrabOp op);
|
gboolean meta_grab_op_is_moving_or_resizing (MetaGrabOp op);
|
||||||
gboolean meta_grab_op_is_mouse_only (MetaGrabOp op);
|
gboolean meta_grab_op_is_mouse_only (MetaGrabOp op);
|
||||||
gboolean meta_grab_op_is_clicking (MetaGrabOp op);
|
gboolean meta_grab_op_is_clicking (MetaGrabOp op);
|
||||||
gboolean meta_grab_op_is_keyboard (MetaGrabOp op);
|
gboolean meta_grab_op_is_keyboard (MetaGrabOp op);
|
||||||
|
@ -1169,37 +1169,6 @@ meta_grab_op_is_mouse_only (MetaGrabOp op)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
meta_grab_op_is_mouse (MetaGrabOp op)
|
|
||||||
{
|
|
||||||
switch (op)
|
|
||||||
{
|
|
||||||
case META_GRAB_OP_MOVING:
|
|
||||||
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:
|
|
||||||
case META_GRAB_OP_KEYBOARD_MOVING:
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_grab_op_is_keyboard (MetaGrabOp op)
|
meta_grab_op_is_keyboard (MetaGrabOp op)
|
||||||
{
|
{
|
||||||
@ -1265,6 +1234,13 @@ meta_grab_op_is_moving (MetaGrabOp op)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_grab_op_is_moving_or_resizing (MetaGrabOp op)
|
||||||
|
{
|
||||||
|
return (meta_grab_op_is_moving (op) ||
|
||||||
|
meta_grab_op_is_resizing (op));
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_grab_op_is_clicking (MetaGrabOp grab_op)
|
meta_grab_op_is_clicking (MetaGrabOp grab_op)
|
||||||
{
|
{
|
||||||
|
@ -2122,7 +2122,7 @@ meta_display_handle_event (MetaDisplay *display,
|
|||||||
display->overlay_key_only_pressed = FALSE;
|
display->overlay_key_only_pressed = FALSE;
|
||||||
|
|
||||||
if (display->grab_window == window &&
|
if (display->grab_window == window &&
|
||||||
meta_grab_op_is_mouse (display->grab_op))
|
meta_grab_op_is_moving_or_resizing (display->grab_op))
|
||||||
{
|
{
|
||||||
meta_window_handle_mouse_grab_op_event (window, event);
|
meta_window_handle_mouse_grab_op_event (window, event);
|
||||||
bypass_clutter = TRUE;
|
bypass_clutter = TRUE;
|
||||||
@ -2134,7 +2134,7 @@ meta_display_handle_event (MetaDisplay *display,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (display->grab_window == window &&
|
if (display->grab_window == window &&
|
||||||
meta_grab_op_is_mouse (display->grab_op))
|
meta_grab_op_is_moving_or_resizing (display->grab_op))
|
||||||
{
|
{
|
||||||
meta_window_handle_mouse_grab_op_event (window, event);
|
meta_window_handle_mouse_grab_op_event (window, event);
|
||||||
bypass_clutter = TRUE;
|
bypass_clutter = TRUE;
|
||||||
|
@ -358,8 +358,8 @@ sync_focus_surface (MetaWaylandPointer *pointer)
|
|||||||
MetaDisplay *display = meta_get_display ();
|
MetaDisplay *display = meta_get_display ();
|
||||||
MetaWaylandSurface *focus_surface;
|
MetaWaylandSurface *focus_surface;
|
||||||
|
|
||||||
/* Don't update the focus surface while we have a special grab. */
|
/* Don't update the focus surface while we have a move/resize grab. */
|
||||||
if (meta_grab_op_is_mouse (display->grab_op))
|
if (meta_grab_op_is_moving_or_resizing (display->grab_op))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (meta_grab_op_should_block_wayland (display->grab_op))
|
if (meta_grab_op_should_block_wayland (display->grab_op))
|
||||||
|
Loading…
Reference in New Issue
Block a user