[mutter/wip/carlosg/there-can-be-only-one: 21/23] backends: Add private call to update MetaBackend from a device
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/there-can-be-only-one: 21/23] backends: Add private call to update MetaBackend from a device
- Date: Mon, 7 Feb 2022 17:19:43 +0000 (UTC)
commit 3c1aae0e17748530877031d10634e2737891d649
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Feb 5 13:11:06 2022 +0100
backends: Add private call to update MetaBackend from a device
We update some details like the last used device and pointer visibility
from events, but this is done inconsistently on X11 since the
ClutterEvents are created and pushed from an additional place.
Make these updates happen on a private call, that will be called from
these places in X11.
src/backends/meta-backend-private.h | 3 +++
src/backends/meta-backend.c | 11 +++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/meta-backend-private.h b/src/backends/meta-backend-private.h
index 00ec8ba6a9..e9e94e044d 100644
--- a/src/backends/meta-backend-private.h
+++ b/src/backends/meta-backend-private.h
@@ -202,4 +202,7 @@ void meta_backend_remove_hw_cursor_inhibitor (MetaBackend *backend,
gboolean meta_backend_is_hw_cursors_inhibited (MetaBackend *backend);
+void meta_backend_update_from_event (MetaBackend *backend,
+ ClutterEvent *event);
+
#endif /* META_BACKEND_PRIVATE_H */
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
index d7c7d9246c..574b191f45 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -1065,8 +1065,7 @@ clutter_source_dispatch (GSource *source,
event->any.stage =
CLUTTER_STAGE (meta_backend_get_stage (backend_source->backend));
clutter_do_event (event);
- update_last_device_from_event (backend_source->backend, event);
- update_pointer_visibility_from_event (backend_source->backend, event);
+ meta_backend_update_from_event (backend_source->backend, event);
clutter_event_free (event);
}
@@ -1680,3 +1679,11 @@ meta_backend_is_hw_cursors_inhibited (MetaBackend *backend)
return FALSE;
}
+
+void
+meta_backend_update_from_event (MetaBackend *backend,
+ ClutterEvent *event)
+{
+ update_last_device_from_event (backend, event);
+ update_pointer_visibility_from_event (backend, event);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]