core: Pass device/sequence on meta_window_begin_grab_op()

This is a public API change. Add device/sequence parameters to this
operation, so that window dragging and resizing can stick to one
set of pointing events of them all.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2683>
This commit is contained in:
Carlos Garnacho
2022-10-21 19:52:35 +02:00
committed by Marge Bot
parent 18535928e7
commit d687e5634d
11 changed files with 114 additions and 45 deletions

View File

@ -6084,13 +6084,24 @@ meta_window_is_ancestor_of_transient (MetaWindow *window,
return d.found;
}
/**
* meta_window_begin_grab_op:
* @window:
* @op:
* @device: (nullable):
* @sequence: (nullable):
* @timestamp:
**/
gboolean
meta_window_begin_grab_op (MetaWindow *window,
MetaGrabOp op,
guint32 timestamp)
meta_window_begin_grab_op (MetaWindow *window,
MetaGrabOp op,
ClutterInputDevice *device,
ClutterEventSequence *sequence,
guint32 timestamp)
{
return meta_compositor_drag_window (window->display->compositor,
window, op,
device, sequence,
timestamp);
}
@ -7703,6 +7714,8 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
op |= META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED;
meta_window_begin_grab_op (window,
op,
clutter_event_get_device (event),
clutter_event_get_event_sequence (event),
event->any.time);
}
}
@ -7722,6 +7735,8 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
meta_window_begin_grab_op (window,
META_GRAB_OP_MOVING |
META_GRAB_OP_WINDOW_FLAG_UNCONSTRAINED,
clutter_event_get_device (event),
clutter_event_get_event_sequence (event),
event->any.time);
}
}