[mutter/wip/carlosg/input-thread: 50/65] clutter: Update device for the current tool in backends
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/input-thread: 50/65] clutter: Update device for the current tool in backends
- Date: Tue, 3 Nov 2020 22:42:37 +0000 (UTC)
commit 2b916a86f28e12fe6fe7bf49d66313a465a66e3f
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Oct 23 23:51:42 2020 +0200
clutter: Update device for the current tool in backends
This should happen deeper in backends, not here in clutter-main.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403
clutter/clutter/clutter-main.c | 3 ---
src/backends/native/meta-seat-impl.c | 3 +++
src/backends/x11/meta-seat-x11.c | 3 +++
3 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c
index 090ec1e020..ca458db97b 100644
--- a/clutter/clutter/clutter-main.c
+++ b/clutter/clutter/clutter-main.c
@@ -1912,9 +1912,6 @@ _clutter_process_event_details (ClutterActor *stage,
case CLUTTER_PROXIMITY_IN:
case CLUTTER_PROXIMITY_OUT:
- clutter_input_device_update_from_tool (clutter_event_get_source_device (event),
- clutter_event_get_device_tool (event));
-
if (_clutter_event_process_filters (event))
break;
diff --git a/src/backends/native/meta-seat-impl.c b/src/backends/native/meta-seat-impl.c
index 46a5a88e39..2db1ace4b9 100644
--- a/src/backends/native/meta-seat-impl.c
+++ b/src/backends/native/meta-seat-impl.c
@@ -1662,6 +1662,9 @@ input_device_update_tool (ClutterInputDevice *input_device,
if (evdev_device->last_tool != tool)
{
+ if (tool)
+ clutter_input_device_update_from_tool (input_device, tool);
+
evdev_device->last_tool = tool;
g_signal_emit_by_name (seat->seat, "tool-changed", input_device, tool);
}
diff --git a/src/backends/x11/meta-seat-x11.c b/src/backends/x11/meta-seat-x11.c
index de9a76640a..f8dae09865 100644
--- a/src/backends/x11/meta-seat-x11.c
+++ b/src/backends/x11/meta-seat-x11.c
@@ -954,6 +954,9 @@ translate_property_event (MetaSeatX11 *seat_x11,
meta_input_device_x11_update_tool (device, tool);
g_signal_emit_by_name (seat_x11, "tool-changed", device, tool);
+
+ if (tool)
+ clutter_input_device_update_from_tool (device, tool);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]