clutter: Specify that input-only grabs are started inactive in API
Add the _inactive suffix, so that the state of these objects is clear.
(cherry-picked from commit 01444e803f
)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3874>
This commit is contained in:
parent
827c4fea4b
commit
7e0e428016
4 changed files with 15 additions and 15 deletions
|
@ -136,10 +136,10 @@ void clutter_stage_add_to_redraw_clip (ClutterStage *self,
|
||||||
ClutterPaintVolume *clip);
|
ClutterPaintVolume *clip);
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
ClutterGrab * clutter_stage_grab_input_only (ClutterStage *self,
|
ClutterGrab * clutter_stage_grab_input_only_inactive (ClutterStage *self,
|
||||||
ClutterEventHandler handler,
|
ClutterEventHandler handler,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GDestroyNotify user_data_destroy);
|
GDestroyNotify user_data_destroy);
|
||||||
|
|
||||||
void clutter_stage_invalidate_devices (ClutterStage *stage);
|
void clutter_stage_invalidate_devices (ClutterStage *stage);
|
||||||
|
|
||||||
|
|
|
@ -3931,10 +3931,10 @@ clutter_stage_grab_inactive (ClutterStage *stage,
|
||||||
}
|
}
|
||||||
|
|
||||||
ClutterGrab *
|
ClutterGrab *
|
||||||
clutter_stage_grab_input_only (ClutterStage *stage,
|
clutter_stage_grab_input_only_inactive (ClutterStage *stage,
|
||||||
ClutterEventHandler handler,
|
ClutterEventHandler handler,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GDestroyNotify user_data_destroy)
|
GDestroyNotify user_data_destroy)
|
||||||
{
|
{
|
||||||
ClutterInputOnlyActor *input_only_actor;
|
ClutterInputOnlyActor *input_only_actor;
|
||||||
ClutterActor *actor;
|
ClutterActor *actor;
|
||||||
|
|
|
@ -625,9 +625,9 @@ grab_input_only (void)
|
||||||
|
|
||||||
test_data_init (&data);
|
test_data_init (&data);
|
||||||
|
|
||||||
grab = clutter_stage_grab_input_only (CLUTTER_STAGE (data.stage),
|
grab = clutter_stage_grab_input_only_inactive (CLUTTER_STAGE (data.stage),
|
||||||
handle_input_only_event,
|
handle_input_only_event,
|
||||||
data.events, NULL);
|
data.events, NULL);
|
||||||
clutter_grab_activate (grab);
|
clutter_grab_activate (grab);
|
||||||
event_log_compare ((EventLog *) &grab1_log, data.events);
|
event_log_compare ((EventLog *) &grab1_log, data.events);
|
||||||
|
|
||||||
|
|
|
@ -299,10 +299,10 @@ meta_wayland_input_attach_event_handler (MetaWaylandInput *input,
|
||||||
MetaBackend *backend = meta_context_get_backend (context);
|
MetaBackend *backend = meta_context_get_backend (context);
|
||||||
ClutterStage *stage = CLUTTER_STAGE (meta_backend_get_stage (backend));
|
ClutterStage *stage = CLUTTER_STAGE (meta_backend_get_stage (backend));
|
||||||
|
|
||||||
input->grab = clutter_stage_grab_input_only (stage,
|
input->grab = clutter_stage_grab_input_only_inactive (stage,
|
||||||
grab_handle_event,
|
grab_handle_event,
|
||||||
input,
|
input,
|
||||||
NULL);
|
NULL);
|
||||||
clutter_grab_activate (input->grab);
|
clutter_grab_activate (input->grab);
|
||||||
|
|
||||||
g_signal_connect_swapped (input->grab, "notify::revoked",
|
g_signal_connect_swapped (input->grab, "notify::revoked",
|
||||||
|
|
Loading…
Reference in a new issue