From d8a3826d4a1834c3505bfa09c538be73654f6856 Mon Sep 17 00:00:00 2001 From: Florian Müllner Date: May 06 2022 18:51:15 +0000 Subject: Update to 42.1 --- diff --git a/0001-clutter-Pass-target-actor-of-events-to-event-filter-.patch b/0001-clutter-Pass-target-actor-of-events-to-event-filter-.patch deleted file mode 100644 index 2fbe4c2..0000000 --- a/0001-clutter-Pass-target-actor-of-events-to-event-filter-.patch +++ /dev/null @@ -1,169 +0,0 @@ -From 2aad56b949b86b4f1d0eab6d3d3b0d5491e8515b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= -Date: Sat, 5 Mar 2022 23:43:29 +0100 -Subject: [PATCH 1/2] clutter: Pass target actor of events to event filter - functions - -We'll need the additional context of which actor the event will be -emitted to in mutters event filter (see next commit), so pass that -target actor to the event filters that are installed. - -Part-of: ---- - clutter/clutter/clutter-event-private.h | 3 ++- - clutter/clutter/clutter-event.c | 5 +++-- - clutter/clutter/clutter-event.h | 2 ++ - clutter/clutter/clutter-main.c | 12 +++++++++++- - clutter/clutter/clutter-stage.c | 6 +++--- - src/core/events.c | 6 ++++-- - 6 files changed, 25 insertions(+), 9 deletions(-) - -diff --git a/clutter/clutter/clutter-event-private.h b/clutter/clutter/clutter-event-private.h -index 011241ce18..69fdf24ed6 100644 ---- a/clutter/clutter/clutter-event-private.h -+++ b/clutter/clutter/clutter-event-private.h -@@ -14,7 +14,8 @@ CLUTTER_EXPORT - void _clutter_process_event (ClutterEvent *event); - - CLUTTER_EXPORT --gboolean _clutter_event_process_filters (ClutterEvent *event); -+gboolean _clutter_event_process_filters (ClutterEvent *event, -+ ClutterActor *event_actor); - - /* clears the event queue inside the main context */ - void _clutter_clear_events_queue (void); -diff --git a/clutter/clutter/clutter-event.c b/clutter/clutter/clutter-event.c -index b1a5b6252f..0433a1ec98 100644 ---- a/clutter/clutter/clutter-event.c -+++ b/clutter/clutter/clutter-event.c -@@ -1772,7 +1772,8 @@ clutter_event_is_pointer_emulated (const ClutterEvent *event) - } - - gboolean --_clutter_event_process_filters (ClutterEvent *event) -+_clutter_event_process_filters (ClutterEvent *event, -+ ClutterActor *event_actor) - { - ClutterMainContext *context = _clutter_context_get_default (); - GList *l, *next; -@@ -1789,7 +1790,7 @@ _clutter_event_process_filters (ClutterEvent *event) - if (event_filter->stage && event_filter->stage != event->any.stage) - continue; - -- if (event_filter->func (event, event_filter->user_data) == CLUTTER_EVENT_STOP) -+ if (event_filter->func (event, event_actor, event_filter->user_data) == CLUTTER_EVENT_STOP) - return CLUTTER_EVENT_STOP; - } - -diff --git a/clutter/clutter/clutter-event.h b/clutter/clutter/clutter-event.h -index 5a8e3c116a..94595542cd 100644 ---- a/clutter/clutter/clutter-event.h -+++ b/clutter/clutter/clutter-event.h -@@ -615,6 +615,7 @@ union _ClutterEvent - /** - * ClutterEventFilterFunc: - * @event: the event that is going to be emitted -+ * @event_actor: the current device actor of the events device - * @user_data: the data pointer passed to clutter_event_add_filter() - * - * A function pointer type used by event filters that are added with -@@ -628,6 +629,7 @@ union _ClutterEvent - * Since: 1.18 - */ - typedef gboolean (* ClutterEventFilterFunc) (const ClutterEvent *event, -+ ClutterActor *event_actor, - gpointer user_data); - - CLUTTER_EXPORT -diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c -index 402ca65547..e066e5aebe 100644 ---- a/clutter/clutter/clutter-main.c -+++ b/clutter/clutter/clutter-main.c -@@ -741,6 +741,8 @@ update_device_for_event (ClutterStage *stage, - void - clutter_do_event (ClutterEvent *event) - { -+ ClutterActor *event_actor = NULL; -+ - /* we need the stage for the event */ - if (event->any.stage == NULL) - { -@@ -765,7 +767,15 @@ clutter_do_event (ClutterEvent *event) - break; - } - -- if (_clutter_event_process_filters (event)) -+ if (event->any.type != CLUTTER_DEVICE_ADDED && -+ event->any.type != CLUTTER_DEVICE_REMOVED && -+ event->any.type != CLUTTER_NOTHING && -+ event->any.type != CLUTTER_EVENT_LAST) -+ { -+ event_actor = clutter_stage_get_event_actor (event->any.stage, event); -+ } -+ -+ if (_clutter_event_process_filters (event, event_actor)) - return; - - /* Instead of processing events when received, we queue them up to -diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c -index f34a424797..5cd09a2c44 100644 ---- a/clutter/clutter/clutter-stage.c -+++ b/clutter/clutter/clutter-stage.c -@@ -3478,7 +3478,7 @@ clutter_stage_update_device (ClutterStage *stage, - CLUTTER_EVENT_NONE, - old_actor, new_actor, - point, time_ms); -- if (!_clutter_event_process_filters (event)) -+ if (!_clutter_event_process_filters (event, old_actor)) - _clutter_actor_handle_event (old_actor, root, event); - - clutter_event_free (event); -@@ -3492,7 +3492,7 @@ clutter_stage_update_device (ClutterStage *stage, - CLUTTER_EVENT_NONE, - new_actor, old_actor, - point, time_ms); -- if (!_clutter_event_process_filters (event)) -+ if (!_clutter_event_process_filters (event, new_actor)) - _clutter_actor_handle_event (new_actor, root, event); - - clutter_event_free (event); -@@ -3676,7 +3676,7 @@ clutter_stage_notify_grab_on_pointer_entry (ClutterStage *stage, - grab_actor : old_grab_actor, - entry->coords, - CLUTTER_CURRENT_TIME); -- if (!_clutter_event_process_filters (event)) -+ if (!_clutter_event_process_filters (event, entry->current_actor)) - _clutter_actor_handle_event (deepmost, topmost, event); - clutter_event_free (event); - } -diff --git a/src/core/events.c b/src/core/events.c -index 8363d9a3d3..7dfd974563 100644 ---- a/src/core/events.c -+++ b/src/core/events.c -@@ -213,7 +213,8 @@ maybe_unfreeze_pointer_events (MetaBackend *backend, - - static gboolean - meta_display_handle_event (MetaDisplay *display, -- const ClutterEvent *event) -+ const ClutterEvent *event, -+ ClutterActor *event_actor) - { - MetaBackend *backend = meta_get_backend (); - MetaWindow *window = NULL; -@@ -540,11 +541,12 @@ meta_display_handle_event (MetaDisplay *display, - - static gboolean - event_callback (const ClutterEvent *event, -+ ClutterActor *event_actor, - gpointer data) - { - MetaDisplay *display = data; - -- return meta_display_handle_event (display, event); -+ return meta_display_handle_event (display, event, event_actor); - } - - void --- -2.35.1 - diff --git a/0001-clutter-Refactor-code-marking-actors-dirty-for-paint.patch b/0001-clutter-Refactor-code-marking-actors-dirty-for-paint.patch deleted file mode 100644 index 0b8eff2..0000000 --- a/0001-clutter-Refactor-code-marking-actors-dirty-for-paint.patch +++ /dev/null @@ -1,65 +0,0 @@ -From ce7f606d48f1a422465fd597c33047727993988a Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Wed, 30 Mar 2022 20:59:37 +0200 -Subject: [PATCH 1/2] clutter: Refactor code marking actors dirty for paint() - -Simplify the function arguments (the origin is just the actor that -the function is originally called from), and make it also handle -marking as dirty the actor that got the redraw queued up explicitly. - -This makes it a single place where priv->is_dirty is being enabled. - -Part-of: ---- - clutter/clutter/clutter-actor.c | 16 +++++++--------- - 1 file changed, 7 insertions(+), 9 deletions(-) - -diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c -index 59345a7252..2e4b30effc 100644 ---- a/clutter/clutter/clutter-actor.c -+++ b/clutter/clutter/clutter-actor.c -@@ -2646,9 +2646,10 @@ _clutter_actor_queue_redraw_on_clones (ClutterActor *self) - } - - static void --_clutter_actor_propagate_queue_redraw (ClutterActor *self, -- ClutterActor *origin) -+_clutter_actor_propagate_queue_redraw (ClutterActor *self) - { -+ ClutterActor *origin = self; -+ - while (self) - { - /* no point in queuing a redraw on a destroyed actor */ -@@ -2657,13 +2658,12 @@ _clutter_actor_propagate_queue_redraw (ClutterActor *self, - - _clutter_actor_queue_redraw_on_clones (self); - -+ self->priv->is_dirty = TRUE; -+ - /* If the queue redraw is coming from a child then the actor has - become dirty and any queued effect is no longer valid */ - if (self != origin) -- { -- self->priv->is_dirty = TRUE; -- self->priv->effect_to_redraw = NULL; -- } -+ self->priv->effect_to_redraw = NULL; - - /* If the actor isn't visible, we still had to emit the signal - * to allow for a ClutterClone, but the appearance of the parent -@@ -8105,10 +8105,8 @@ _clutter_actor_queue_redraw_full (ClutterActor *self, - priv->effect_to_redraw = NULL; - } - -- priv->is_dirty = TRUE; -- - if (!priv->propagated_one_redraw) -- _clutter_actor_propagate_queue_redraw (self, self); -+ _clutter_actor_propagate_queue_redraw (self); - } - - /** --- -2.35.1 - diff --git a/0001-kms-impl-device-Add-addfb2_modifiers-to-MetaKmsDevic.patch b/0001-kms-impl-device-Add-addfb2_modifiers-to-MetaKmsDevic.patch deleted file mode 100644 index 2699a2f..0000000 --- a/0001-kms-impl-device-Add-addfb2_modifiers-to-MetaKmsDevic.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 11e6100226006b5371de30310357582db64c9309 Mon Sep 17 00:00:00 2001 -From: Daniel van Vugt -Date: Tue, 5 Apr 2022 17:05:17 +0800 -Subject: [PATCH 1/2] kms/impl-device: Add addfb2_modifiers to - MetaKmsDeviceCaps - -Part-of: ---- - src/backends/native/meta-kms-impl-device.c | 6 ++++++ - src/backends/native/meta-kms-impl-device.h | 1 + - 2 files changed, 7 insertions(+) - -diff --git a/src/backends/native/meta-kms-impl-device.c b/src/backends/native/meta-kms-impl-device.c -index b05bf5fdab..ec1a0e5a45 100644 ---- a/src/backends/native/meta-kms-impl-device.c -+++ b/src/backends/native/meta-kms-impl-device.c -@@ -303,6 +303,7 @@ init_caps (MetaKmsImplDevice *impl_device) - uint64_t cursor_width, cursor_height; - uint64_t prefer_shadow; - uint64_t uses_monotonic_clock; -+ uint64_t addfb2_modifiers; - - fd = meta_device_file_get_fd (priv->device_file); - if (drmGetCap (fd, DRM_CAP_CURSOR_WIDTH, &cursor_width) == 0 && -@@ -325,6 +326,11 @@ init_caps (MetaKmsImplDevice *impl_device) - { - priv->caps.uses_monotonic_clock = uses_monotonic_clock; - } -+ -+ if (drmGetCap (fd, DRM_CAP_ADDFB2_MODIFIERS, &addfb2_modifiers) == 0) -+ { -+ priv->caps.addfb2_modifiers = (addfb2_modifiers != 0); -+ } - } - - static void -diff --git a/src/backends/native/meta-kms-impl-device.h b/src/backends/native/meta-kms-impl-device.h -index e81f00e39c..286c2700a6 100644 ---- a/src/backends/native/meta-kms-impl-device.h -+++ b/src/backends/native/meta-kms-impl-device.h -@@ -40,6 +40,7 @@ typedef struct _MetaKmsDeviceCaps - - gboolean prefers_shadow_buffer; - gboolean uses_monotonic_clock; -+ gboolean addfb2_modifiers; - } MetaKmsDeviceCaps; - - typedef struct _MetaKmsProp MetaKmsProp; --- -2.36.0 - diff --git a/0002-clutter-Keep-actors-dirty-if-a-redraw-was-queued-up-.patch b/0002-clutter-Keep-actors-dirty-if-a-redraw-was-queued-up-.patch deleted file mode 100644 index 0f7d711..0000000 --- a/0002-clutter-Keep-actors-dirty-if-a-redraw-was-queued-up-.patch +++ /dev/null @@ -1,59 +0,0 @@ -From f820bb35067f1e6b54d56f7652ee333ac8c8c35b Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Wed, 30 Mar 2022 21:02:18 +0200 -Subject: [PATCH 2/2] clutter: Keep actors dirty if a redraw was queued up - during paint() - -In the right combination of circumstances, and given 2 actors (parent -actor P with an offscreen effect and child actor C), we may have the -following situation happening: - -- A redraw is queued on the actor C, actors C and P are marked as - priv->is_dirty and priv->propagated_one_redraw. -- During paint() handling we paint actor P, priv->propagated_one_redraw - is turned off. -- We recurse into child actor C, priv->propagated_one_redraw is turned - off. -- A new redraw is queued on actor C, actors C and P are marked as - priv->is_dirty and priv->propagated_one_redraw. -- The paint() method recurses back, actors C and P get priv->is_dirty - disabled, priv->propagated_one_redraw remains set. -- At this point queueing up more redraws on actor C will not propagate - up, because actor C has priv->propagated_one_redraw set, but the - parent actor P has priv->is_dirty unset, so the offscreen effect will - not get CLUTTER_EFFECT_PAINT_ACTOR_DIRTY and will avoid repainting - actor C. - -The end result is that actor C does not redraw again, despite requesting -redraws. This situation eventually resolves itself through e.g. relayouts -on actor P, but may take some time to happen. - -In order to fix this, consider actors that did get a further redraw -request still dirty after paint(). - -Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2188 -Part-of: ---- - clutter/clutter/clutter-actor.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c -index 2e4b30effc..23ef03dc1f 100644 ---- a/clutter/clutter/clutter-actor.c -+++ b/clutter/clutter/clutter-actor.c -@@ -3840,8 +3840,10 @@ clutter_actor_paint (ClutterActor *self, - clutter_paint_node_paint (root_node, paint_context); - - /* If we make it here then the actor has run through a complete -- paint run including all the effects so it's no longer dirty */ -- priv->is_dirty = FALSE; -+ * paint run including all the effects so it's no longer dirty, -+ * unless a new redraw was queued up. -+ */ -+ priv->is_dirty = priv->propagated_one_redraw; - } - - /** --- -2.35.1 - diff --git a/0002-events-Use-the-event-target-actor-to-determine-windo.patch b/0002-events-Use-the-event-target-actor-to-determine-windo.patch deleted file mode 100644 index c7af844..0000000 --- a/0002-events-Use-the-event-target-actor-to-determine-windo.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 0280b0aaa563db65bf79a3643f6a9e8e76bfe458 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= -Date: Sat, 5 Mar 2022 23:46:24 +0100 -Subject: [PATCH 2/2] events: Use the event target actor to determine window - for event - -We use get_window_for_event() to check whether an event happened on top -of a window or on top of shell UI to decide whether to bypass delivering -the event to Clutter. In case of crossing events though, we can't just -use the device actor to determine whether to forward the event to -Clutter or not: We do want to forward CLUTTER_LEAVE events which -happened on top of shell UI. In that case the device actor is already a -window actor (the pointer already is on top of a window), but the shell -still needs to get the LEAVE crossing event. - -Since the event source actor got removed from the detail of -ClutterEvent, the context we're looking for (which actor did the pointer -leave) is now the target actor that the event gets emitted to. Since the -last commit, we also made event filters aware of this context by passing -the target actor to them, so use this context now to determine whether -we're on top of a window or not. - -Part-of: ---- - src/core/events.c | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - -diff --git a/src/core/events.c b/src/core/events.c -index 7dfd974563..0dc3a73222 100644 ---- a/src/core/events.c -+++ b/src/core/events.c -@@ -81,23 +81,20 @@ stage_has_grab (MetaDisplay *display) - - static MetaWindow * - get_window_for_event (MetaDisplay *display, -- const ClutterEvent *event) -+ const ClutterEvent *event, -+ ClutterActor *event_actor) - { - switch (display->event_route) - { - case META_EVENT_ROUTE_NORMAL: - { -- ClutterActor *target; - MetaWindowActor *window_actor; - - /* Always use the key focused window for key events. */ - if (IS_KEY_EVENT (event)) - return stage_has_key_focus () ? display->focus_window : NULL; - -- target = clutter_stage_get_device_actor (clutter_event_get_stage (event), -- clutter_event_get_device (event), -- clutter_event_get_event_sequence (event)); -- window_actor = meta_window_actor_from_actor (target); -+ window_actor = meta_window_actor_from_actor (event_actor); - if (window_actor) - return meta_window_actor_get_meta_window (window_actor); - else -@@ -339,7 +336,7 @@ meta_display_handle_event (MetaDisplay *display, - } - #endif - -- window = get_window_for_event (display, event); -+ window = get_window_for_event (display, event, event_actor); - - display->current_time = event->any.time; - --- -2.35.1 - diff --git a/0002-kms-device-Disable-modifiers-when-DRM_CAP_ADDFB2_MOD.patch b/0002-kms-device-Disable-modifiers-when-DRM_CAP_ADDFB2_MOD.patch deleted file mode 100644 index 2b06d3d..0000000 --- a/0002-kms-device-Disable-modifiers-when-DRM_CAP_ADDFB2_MOD.patch +++ /dev/null @@ -1,29 +0,0 @@ -From dd94c448e94b1033b90749d77c5dc587c3b8f9f4 Mon Sep 17 00:00:00 2001 -From: Daniel van Vugt -Date: Tue, 5 Apr 2022 17:06:21 +0800 -Subject: [PATCH 2/2] kms/device: Disable modifiers when - !DRM_CAP_ADDFB2_MODIFIERS - -Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2210 -Part-of: ---- - src/backends/native/meta-kms-device.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/backends/native/meta-kms-device.c b/src/backends/native/meta-kms-device.c -index bef1e20657..7c84f14f51 100644 ---- a/src/backends/native/meta-kms-device.c -+++ b/src/backends/native/meta-kms-device.c -@@ -490,6 +490,9 @@ meta_kms_device_new (MetaKms *kms, - free (device->path); - device->path = data.out_path; - -+ if (!device->caps.addfb2_modifiers) -+ device->flags |= META_KMS_DEVICE_FLAG_DISABLE_MODIFIERS; -+ - return device; - } - --- -2.36.0 - diff --git a/2299.patch b/2299.patch deleted file mode 100644 index 2176938..0000000 --- a/2299.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 53de072634527c5f433911553d8f921a6e119ac1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= -Date: Wed, 16 Feb 2022 22:34:12 +0100 -Subject: [PATCH] clutter: Bail out and warn on reentry into mapping/unmapping - cycle - -There's a bunch of crashes right now where the assertions in -clutter_actor_set_mapped() after calling the map/unmap() vfuncs are -failing. The only way this can happen is by re-entering -clutter_actor_set_mapped() during the map/unmap recursion. - -The reason for those crashes is that the shell hides/shows some actors -in response to crossing events and key-focus changes. These in turn get -triggered by the newly introduced ungrabbing of ClutterGrabs when an -actor gets unmapped, which triggers GRAB_NOTIFY crossing events and -key-focus changes. - -Since these situations are hardly avoidable (it's a valid use-case to -hide/show something in response to a crossing/key-focus event), catch -the set_mapped() call early while we reenter the mapping machinery and -log a warning instead of crashing. - -Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3165 ---- - clutter/clutter/clutter-actor.c | 6 ++++++ - clutter/clutter/clutter-private.h | 3 +++ - 2 files changed, 9 insertions(+) - -diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c -index 59345a7252..bae11088dd 100644 ---- a/clutter/clutter/clutter-actor.c -+++ b/clutter/clutter/clutter-actor.c -@@ -1264,6 +1264,10 @@ clutter_actor_set_mapped (ClutterActor *self, - if (CLUTTER_ACTOR_IS_MAPPED (self) == mapped) - return; - -+ g_return_if_fail (!CLUTTER_ACTOR_IN_MAP_UNMAP (self)); -+ -+ CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_IN_MAP_UNMAP); -+ - if (mapped) - { - CLUTTER_ACTOR_GET_CLASS (self)->map (self); -@@ -1274,6 +1278,8 @@ clutter_actor_set_mapped (ClutterActor *self, - CLUTTER_ACTOR_GET_CLASS (self)->unmap (self); - g_assert (!CLUTTER_ACTOR_IS_MAPPED (self)); - } -+ -+ CLUTTER_UNSET_PRIVATE_FLAGS (self, CLUTTER_IN_MAP_UNMAP); - } - - /* this function updates the mapped and realized states according to -diff --git a/clutter/clutter/clutter-private.h b/clutter/clutter/clutter-private.h -index 377b318798..117902a35f 100644 ---- a/clutter/clutter/clutter-private.h -+++ b/clutter/clutter/clutter-private.h -@@ -69,6 +69,7 @@ typedef struct _ClutterMainContext ClutterMainContext; - #define CLUTTER_ACTOR_IN_PREF_WIDTH(a) ((CLUTTER_PRIVATE_FLAGS (a) & CLUTTER_IN_PREF_WIDTH) != FALSE) - #define CLUTTER_ACTOR_IN_PREF_HEIGHT(a) ((CLUTTER_PRIVATE_FLAGS (a) & CLUTTER_IN_PREF_HEIGHT) != FALSE) - #define CLUTTER_ACTOR_IN_PREF_SIZE(a) ((CLUTTER_PRIVATE_FLAGS (a) & (CLUTTER_IN_PREF_HEIGHT|CLUTTER_IN_PREF_WIDTH)) != FALSE) -+#define CLUTTER_ACTOR_IN_MAP_UNMAP(a) ((CLUTTER_PRIVATE_FLAGS (a) & CLUTTER_IN_MAP_UNMAP) != FALSE) - - #define CLUTTER_PARAM_READABLE (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS) - #define CLUTTER_PARAM_WRITABLE (G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS) -@@ -105,6 +106,8 @@ typedef enum - - /* Used to avoid recursion */ - CLUTTER_IN_RELAYOUT = 1 << 7, -+ -+ CLUTTER_IN_MAP_UNMAP = 1 << 8, - } ClutterPrivateFlags; - - /* --- -GitLab - diff --git a/2331.patch b/2331.patch deleted file mode 100644 index 6fef2af..0000000 --- a/2331.patch +++ /dev/null @@ -1,1438 +0,0 @@ -From 6141cc6684d158b6ef55903be0e99c68f9afc953 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Tue, 8 Mar 2022 16:58:41 +0100 -Subject: [PATCH 1/9] backends/native: Make function to determine - ClutterInputDeviceType private - -We do not need to open code the ClutterInputDeviceType fetching from a -libinput_device, since we already created a native ClutterInputDevice that -has the right type. ---- - .../native/meta-input-device-native.c | 46 +++++++++---------- - src/backends/native/meta-seat-impl.c | 2 +- - 2 files changed, 24 insertions(+), 24 deletions(-) - -diff --git a/src/backends/native/meta-input-device-native.c b/src/backends/native/meta-input-device-native.c -index 6ee6f4961f..fbd067b29a 100644 ---- a/src/backends/native/meta-input-device-native.c -+++ b/src/backends/native/meta-input-device-native.c -@@ -1328,6 +1328,28 @@ update_pad_features (MetaInputDeviceNative *device_native) - } - } - -+static ClutterInputDeviceType -+determine_device_type (struct libinput_device *ldev) -+{ -+ /* This setting is specific to touchpads and alike, only in these -+ * devices there is this additional layer of touch event interpretation. -+ */ -+ if (libinput_device_config_tap_get_finger_count (ldev) > 0) -+ return CLUTTER_TOUCHPAD_DEVICE; -+ else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TABLET_TOOL)) -+ return CLUTTER_TABLET_DEVICE; -+ else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TABLET_PAD)) -+ return CLUTTER_PAD_DEVICE; -+ else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_POINTER)) -+ return CLUTTER_POINTER_DEVICE; -+ else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TOUCH)) -+ return CLUTTER_TOUCHSCREEN_DEVICE; -+ else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_KEYBOARD)) -+ return CLUTTER_KEYBOARD_DEVICE; -+ else -+ return CLUTTER_EXTENSION_DEVICE; -+} -+ - /* - * meta_input_device_native_new: - * @manager: the device manager -@@ -1348,7 +1370,7 @@ meta_input_device_native_new_in_impl (MetaSeatImpl *seat_impl, - char *node_path; - double width, height; - -- type = meta_input_device_native_determine_type_in_impl (libinput_device); -+ type = determine_device_type (libinput_device); - vendor = g_strdup_printf ("%.4x", libinput_device_get_id_vendor (libinput_device)); - product = g_strdup_printf ("%.4x", libinput_device_get_id_product (libinput_device)); - node_path = g_strdup_printf ("/dev/input/%s", libinput_device_get_sysname (libinput_device)); -@@ -1456,28 +1478,6 @@ meta_input_device_native_update_leds_in_impl (MetaInputDeviceNative *device, - libinput_device_led_update (device->libinput_device, leds); - } - --ClutterInputDeviceType --meta_input_device_native_determine_type_in_impl (struct libinput_device *ldev) --{ -- /* This setting is specific to touchpads and alike, only in these -- * devices there is this additional layer of touch event interpretation. -- */ -- if (libinput_device_config_tap_get_finger_count (ldev) > 0) -- return CLUTTER_TOUCHPAD_DEVICE; -- else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TABLET_TOOL)) -- return CLUTTER_TABLET_DEVICE; -- else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TABLET_PAD)) -- return CLUTTER_PAD_DEVICE; -- else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_POINTER)) -- return CLUTTER_POINTER_DEVICE; -- else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TOUCH)) -- return CLUTTER_TOUCHSCREEN_DEVICE; -- else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_KEYBOARD)) -- return CLUTTER_KEYBOARD_DEVICE; -- else -- return CLUTTER_EXTENSION_DEVICE; --} -- - /** - * meta_input_device_native_get_libinput_device: - * @device: a #ClutterInputDevice -diff --git a/src/backends/native/meta-seat-impl.c b/src/backends/native/meta-seat-impl.c -index 8b3115265b..624b2fe6f1 100644 ---- a/src/backends/native/meta-seat-impl.c -+++ b/src/backends/native/meta-seat-impl.c -@@ -1658,7 +1658,7 @@ evdev_add_device (MetaSeatImpl *seat_impl, - - /* Clutter assumes that device types are exclusive in the - * ClutterInputDevice API */ -- type = meta_input_device_native_determine_type_in_impl (libinput_device); -+ type = clutter_input_device_get_device_type (device); - - is_touchscreen = type == CLUTTER_TOUCHSCREEN_DEVICE; - is_tablet_switch = --- -GitLab - - -From ac0dd8b7a10f4ba87a47d6d1fe7a82733e5b971b Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Tue, 8 Mar 2022 17:03:31 +0100 -Subject: [PATCH 2/9] clutter: Add ClutterInputCapabilities flagset - -This will be a truer representation of input devices in the native -backend, since a single device can have multiple capabilities. ---- - clutter/clutter/clutter-enums.h | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -diff --git a/clutter/clutter/clutter-enums.h b/clutter/clutter/clutter-enums.h -index 9ee55fb5c4..99debc1c11 100644 ---- a/clutter/clutter/clutter-enums.h -+++ b/clutter/clutter/clutter-enums.h -@@ -935,6 +935,29 @@ typedef enum /*< prefix=CLUTTER_FLOW >*/ - CLUTTER_FLOW_VERTICAL - } ClutterFlowOrientation; - -+/** -+ * ClutterInputDeviceCapabilities: -+ * @CLUTTER_INPUT_CAPABILITY_NONE: No capabilities -+ * @CLUTTER_INPUT_CAPABILITY_POINTER: Pointer capability -+ * @CLUTTER_INPUT_CAPABILITY_KEYBOARD: Keyboard capability -+ * @CLUTTER_INPUT_CAPABILITY_TOUCHPAD: Touchpad gesture and scroll capability -+ * @CLUTTER_INPUT_CAPABILITY_TOUCH: Touch capability -+ * @CLUTTER_INPUT_CAPABILITY_TABLET_TOOL: Tablet tool capability -+ * @CLUTTER_INPUT_CAPABILITY_TABLET_PAD: Tablet pad capability -+ * -+ * Describes the capabilities of an input device. -+ **/ -+typedef enum /*< prefix=CLUTTER_INPUT_CAPABILITY >*/ -+{ -+ CLUTTER_INPUT_CAPABILITY_NONE = 0, -+ CLUTTER_INPUT_CAPABILITY_POINTER = 1 << 0, -+ CLUTTER_INPUT_CAPABILITY_KEYBOARD = 1 << 1, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD = 1 << 2, -+ CLUTTER_INPUT_CAPABILITY_TOUCH = 1 << 3, -+ CLUTTER_INPUT_CAPABILITY_TABLET_TOOL = 1 << 4, -+ CLUTTER_INPUT_CAPABILITY_TABLET_PAD = 1 << 5, -+} ClutterInputCapabilities; -+ - /** - * ClutterInputDeviceType: - * @CLUTTER_POINTER_DEVICE: A pointer device --- -GitLab - - -From 65aa4bbfd09bfbdfe5759d4bc3fe46c42ca21e14 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Tue, 8 Mar 2022 17:04:40 +0100 -Subject: [PATCH 3/9] clutter: Add ClutterInputDevice::capabilities property - -This is construct-only, and assigned by the backend. ---- - clutter/clutter/clutter-input-device.c | 42 ++++++++++++++++++++++++++ - clutter/clutter/clutter-input-device.h | 3 ++ - 2 files changed, 45 insertions(+) - -diff --git a/clutter/clutter/clutter-input-device.c b/clutter/clutter/clutter-input-device.c -index a37886e46a..c3fed10fbd 100644 ---- a/clutter/clutter/clutter-input-device.c -+++ b/clutter/clutter/clutter-input-device.c -@@ -56,6 +56,7 @@ enum - PROP_NAME, - - PROP_DEVICE_TYPE, -+ PROP_CAPABILITIES, - PROP_SEAT, - PROP_DEVICE_MODE, - -@@ -80,6 +81,7 @@ typedef struct _ClutterInputDevicePrivate ClutterInputDevicePrivate; - struct _ClutterInputDevicePrivate - { - ClutterInputDeviceType device_type; -+ ClutterInputCapabilities capabilities; - ClutterInputMode device_mode; - - char *device_name; -@@ -136,6 +138,10 @@ clutter_input_device_set_property (GObject *gobject, - priv->device_type = g_value_get_enum (value); - break; - -+ case PROP_CAPABILITIES: -+ priv->capabilities = g_value_get_flags (value); -+ break; -+ - case PROP_SEAT: - priv->seat = g_value_get_object (value); - break; -@@ -206,6 +212,10 @@ clutter_input_device_get_property (GObject *gobject, - g_value_set_enum (value, priv->device_type); - break; - -+ case PROP_CAPABILITIES: -+ g_value_set_flags (value, priv->capabilities); -+ break; -+ - case PROP_SEAT: - g_value_set_object (value, priv->seat); - break; -@@ -296,6 +306,19 @@ clutter_input_device_class_init (ClutterInputDeviceClass *klass) - CLUTTER_PARAM_READWRITE | - G_PARAM_CONSTRUCT_ONLY); - -+ /** -+ * ClutterInputDevice:capabilities: -+ * -+ * The capabilities of the device -+ */ -+ obj_props[PROP_CAPABILITIES] = -+ g_param_spec_flags ("capabilities", -+ P_("Capabilities"), -+ P_("The capabilities of the device"), -+ CLUTTER_TYPE_INPUT_CAPABILITIES, 0, -+ CLUTTER_PARAM_READWRITE | -+ G_PARAM_CONSTRUCT_ONLY); -+ - /** - * ClutterInputDevice:seat: - * -@@ -451,6 +474,25 @@ clutter_input_device_get_device_type (ClutterInputDevice *device) - return priv->device_type; - } - -+/** -+ * clutter_input_device_get_capabilities: -+ * @device: a #ClutterInputDevice -+ * -+ * Retrieves the capabilities of @device -+ * -+ * Return value: the capabilities of the device -+ */ -+ClutterInputCapabilities -+clutter_input_device_get_capabilities (ClutterInputDevice *device) -+{ -+ ClutterInputDevicePrivate *priv = -+ clutter_input_device_get_instance_private (device); -+ -+ g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), 0); -+ -+ return priv->capabilities; -+} -+ - /** - * clutter_input_device_get_device_name: - * @device: a #ClutterInputDevice -diff --git a/clutter/clutter/clutter-input-device.h b/clutter/clutter/clutter-input-device.h -index 1a82ac9af6..d6fd62a038 100644 ---- a/clutter/clutter/clutter-input-device.h -+++ b/clutter/clutter/clutter-input-device.h -@@ -121,6 +121,9 @@ int clutter_input_device_get_pad_feature_group (ClutterInputDevice *de - ClutterInputDevicePadFeature feature, - int n_feature); - -+CLUTTER_EXPORT -+ClutterInputCapabilities clutter_input_device_get_capabilities (ClutterInputDevice *device); -+ - G_END_DECLS - - #endif /* __CLUTTER_INPUT_DEVICE_H__ */ --- -GitLab - - -From 849004edb8373174c3f04d79c6be7ed6e191d934 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Tue, 8 Mar 2022 17:05:44 +0100 -Subject: [PATCH 4/9] backends/native: Assign capabilities to input devices - -These are extracted from the individual libinput_devices. ---- - .../native/meta-input-device-native.c | 27 +++++++++++++++++++ - 1 file changed, 27 insertions(+) - -diff --git a/src/backends/native/meta-input-device-native.c b/src/backends/native/meta-input-device-native.c -index fbd067b29a..380dda4f56 100644 ---- a/src/backends/native/meta-input-device-native.c -+++ b/src/backends/native/meta-input-device-native.c -@@ -1350,6 +1350,30 @@ determine_device_type (struct libinput_device *ldev) - return CLUTTER_EXTENSION_DEVICE; - } - -+static ClutterInputCapabilities -+translate_device_capabilities (struct libinput_device *ldev) -+{ -+ ClutterInputCapabilities caps = 0; -+ -+ /* This setting is specific to touchpads and alike, only in these -+ * devices there is this additional layer of touch event interpretation. -+ */ -+ if (libinput_device_config_tap_get_finger_count (ldev) > 0) -+ caps |= CLUTTER_INPUT_CAPABILITY_TOUCHPAD; -+ if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TABLET_TOOL)) -+ caps |= CLUTTER_INPUT_CAPABILITY_TABLET_TOOL; -+ if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TABLET_PAD)) -+ caps |= CLUTTER_INPUT_CAPABILITY_TABLET_PAD; -+ if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_POINTER)) -+ caps |= CLUTTER_INPUT_CAPABILITY_POINTER; -+ if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TOUCH)) -+ caps |= CLUTTER_INPUT_CAPABILITY_TOUCH; -+ if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_KEYBOARD)) -+ caps |= CLUTTER_INPUT_CAPABILITY_KEYBOARD; -+ -+ return caps; -+} -+ - /* - * meta_input_device_native_new: - * @manager: the device manager -@@ -1365,11 +1389,13 @@ meta_input_device_native_new_in_impl (MetaSeatImpl *seat_impl, - { - MetaInputDeviceNative *device; - ClutterInputDeviceType type; -+ ClutterInputCapabilities capabilities; - char *vendor, *product; - int n_rings = 0, n_strips = 0, n_groups = 1, n_buttons = 0; - char *node_path; - double width, height; - -+ capabilities = translate_device_capabilities (libinput_device); - type = determine_device_type (libinput_device); - vendor = g_strdup_printf ("%.4x", libinput_device_get_id_vendor (libinput_device)); - product = g_strdup_printf ("%.4x", libinput_device_get_id_product (libinput_device)); -@@ -1387,6 +1413,7 @@ meta_input_device_native_new_in_impl (MetaSeatImpl *seat_impl, - device = g_object_new (META_TYPE_INPUT_DEVICE_NATIVE, - "name", libinput_device_get_name (libinput_device), - "device-type", type, -+ "capabilities", capabilities, - "device-mode", CLUTTER_INPUT_MODE_PHYSICAL, - "vendor-id", vendor, - "product-id", product, --- -GitLab - - -From 73f2d0696119dc8fbc5d33fbaaba8cb7cef0d819 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Tue, 8 Mar 2022 17:12:42 +0100 -Subject: [PATCH 5/9] clutter: Add compatibility code to get input capabilities - from device type - -We not just have X11 devices, but also virtual devices on both backends. -In the mean time, keep these working on top of a ClutterInputDeviceType, -but transform that into capabilities on device construction so users can -rely on the new flagset. ---- - clutter/clutter/clutter-input-device.c | 48 ++++++++++++++++++++++++++ - 1 file changed, 48 insertions(+) - -diff --git a/clutter/clutter/clutter-input-device.c b/clutter/clutter/clutter-input-device.c -index c3fed10fbd..8b99846ec0 100644 ---- a/clutter/clutter/clutter-input-device.c -+++ b/clutter/clutter/clutter-input-device.c -@@ -104,6 +104,53 @@ struct _ClutterInputDevicePrivate - - G_DEFINE_TYPE_WITH_PRIVATE (ClutterInputDevice, clutter_input_device, G_TYPE_OBJECT); - -+static void -+clutter_input_device_constructed (GObject *gobject) -+{ -+ ClutterInputDevice *device = CLUTTER_INPUT_DEVICE (gobject); -+ ClutterInputDevicePrivate *priv = -+ clutter_input_device_get_instance_private (device); -+ -+ if (priv->capabilities == 0) -+ { -+ ClutterInputCapabilities capabilities = 0; -+ -+ switch (priv->device_type) -+ { -+ case CLUTTER_POINTER_DEVICE: -+ capabilities = CLUTTER_INPUT_CAPABILITY_POINTER; -+ break; -+ case CLUTTER_KEYBOARD_DEVICE: -+ capabilities = CLUTTER_INPUT_CAPABILITY_KEYBOARD; -+ break; -+ case CLUTTER_TOUCHPAD_DEVICE: -+ capabilities = CLUTTER_INPUT_CAPABILITY_POINTER | -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD; -+ break; -+ case CLUTTER_TOUCHSCREEN_DEVICE: -+ capabilities = CLUTTER_INPUT_CAPABILITY_TOUCH; -+ break; -+ case CLUTTER_TABLET_DEVICE: -+ case CLUTTER_PEN_DEVICE: -+ case CLUTTER_ERASER_DEVICE: -+ case CLUTTER_CURSOR_DEVICE: -+ capabilities = CLUTTER_INPUT_CAPABILITY_TABLET_TOOL; -+ break; -+ case CLUTTER_PAD_DEVICE: -+ capabilities = CLUTTER_INPUT_CAPABILITY_TABLET_PAD; -+ break; -+ case CLUTTER_EXTENSION_DEVICE: -+ case CLUTTER_JOYSTICK_DEVICE: -+ break; -+ case CLUTTER_N_DEVICE_TYPES: -+ g_assert_not_reached (); -+ break; -+ } -+ -+ priv->capabilities = capabilities; -+ } -+} -+ - static void - clutter_input_device_dispose (GObject *gobject) - { -@@ -437,6 +484,7 @@ clutter_input_device_class_init (ClutterInputDeviceClass *klass) - NULL, - CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); - -+ gobject_class->constructed = clutter_input_device_constructed; - gobject_class->dispose = clutter_input_device_dispose; - gobject_class->set_property = clutter_input_device_set_property; - gobject_class->get_property = clutter_input_device_get_property; --- -GitLab - - -From 8210aaa960b7d72818e7d2683f18f6343c7d463c Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Tue, 8 Mar 2022 17:26:43 +0100 -Subject: [PATCH 6/9] wayland: Set wayland seat capabilities based on input - device capabilities - -Instead of looking at device types, which might be incomplete. - -Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2154 ---- - src/wayland/meta-wayland-seat.c | 58 +++++++++++---------------------- - 1 file changed, 19 insertions(+), 39 deletions(-) - -diff --git a/src/wayland/meta-wayland-seat.c b/src/wayland/meta-wayland-seat.c -index 63c6b34abd..f7a2aeddc1 100644 ---- a/src/wayland/meta-wayland-seat.c -+++ b/src/wayland/meta-wayland-seat.c -@@ -114,7 +114,7 @@ lookup_device_capabilities (ClutterSeat *seat) - - for (l = devices; l; l = l->next) - { -- ClutterInputDeviceType device_type; -+ ClutterInputCapabilities device_capabilities; - - /* Only look for physical devices, logical devices have rather generic - * keyboard/pointer device types, which is not truly representative of -@@ -123,26 +123,14 @@ lookup_device_capabilities (ClutterSeat *seat) - if (clutter_input_device_get_device_mode (l->data) == CLUTTER_INPUT_MODE_LOGICAL) - continue; - -- device_type = clutter_input_device_get_device_type (l->data); -+ device_capabilities = clutter_input_device_get_capabilities (l->data); - -- switch (device_type) -- { -- case CLUTTER_TOUCHPAD_DEVICE: -- case CLUTTER_POINTER_DEVICE: -- capabilities |= WL_SEAT_CAPABILITY_POINTER; -- break; -- case CLUTTER_KEYBOARD_DEVICE: -- capabilities |= WL_SEAT_CAPABILITY_KEYBOARD; -- break; -- case CLUTTER_TOUCHSCREEN_DEVICE: -- capabilities |= WL_SEAT_CAPABILITY_TOUCH; -- break; -- default: -- g_debug ("Ignoring device '%s' with unhandled type %d", -- clutter_input_device_get_device_name (l->data), -- device_type); -- break; -- } -+ if (device_capabilities & CLUTTER_INPUT_CAPABILITY_POINTER) -+ capabilities |= WL_SEAT_CAPABILITY_POINTER; -+ if (device_capabilities & CLUTTER_INPUT_CAPABILITY_KEYBOARD) -+ capabilities |= WL_SEAT_CAPABILITY_KEYBOARD; -+ if (device_capabilities & CLUTTER_INPUT_CAPABILITY_TOUCH) -+ capabilities |= WL_SEAT_CAPABILITY_TOUCH; - } - - g_list_free (devices); -@@ -297,11 +285,11 @@ static gboolean - event_from_supported_hardware_device (MetaWaylandSeat *seat, - const ClutterEvent *event) - { -- ClutterInputDevice *input_device; -- ClutterInputMode input_mode; -- ClutterInputDeviceType device_type; -- gboolean hardware_device = FALSE; -- gboolean supported_device = FALSE; -+ ClutterInputDevice *input_device; -+ ClutterInputMode input_mode; -+ ClutterInputCapabilities capabilities; -+ gboolean hardware_device = FALSE; -+ gboolean supported_device = FALSE; - - input_device = clutter_event_get_source_device (event); - -@@ -315,21 +303,13 @@ event_from_supported_hardware_device (MetaWaylandSeat *seat, - - hardware_device = TRUE; - -- device_type = clutter_input_device_get_device_type (input_device); -- -- switch (device_type) -- { -- case CLUTTER_TOUCHPAD_DEVICE: -- case CLUTTER_POINTER_DEVICE: -- case CLUTTER_KEYBOARD_DEVICE: -- case CLUTTER_TOUCHSCREEN_DEVICE: -- supported_device = TRUE; -- break; -+ capabilities = clutter_input_device_get_capabilities (input_device); - -- default: -- supported_device = FALSE; -- break; -- } -+ if ((capabilities & -+ (CLUTTER_INPUT_CAPABILITY_POINTER | -+ CLUTTER_INPUT_CAPABILITY_KEYBOARD | -+ CLUTTER_INPUT_CAPABILITY_TOUCH)) != 0) -+ supported_device = TRUE; - - out: - return hardware_device && supported_device; --- -GitLab - - -From b18cf1de5cae178f8760dd13b0df0946fb964824 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Tue, 8 Mar 2022 17:31:20 +0100 -Subject: [PATCH 7/9] wayland: Check input device capabilities in tablet seats - -Instead of looking for tablets and pads based on input device type, -check capabilities. ---- - src/wayland/meta-wayland-tablet-manager.c | 12 ++++------ - src/wayland/meta-wayland-tablet-seat.c | 28 +++++++++++------------ - 2 files changed, 19 insertions(+), 21 deletions(-) - -diff --git a/src/wayland/meta-wayland-tablet-manager.c b/src/wayland/meta-wayland-tablet-manager.c -index a729c7b894..7ee1c9fe7b 100644 ---- a/src/wayland/meta-wayland-tablet-manager.c -+++ b/src/wayland/meta-wayland-tablet-manager.c -@@ -43,18 +43,16 @@ unbind_resource (struct wl_resource *resource) - static gboolean - is_tablet_device (ClutterInputDevice *device) - { -- ClutterInputDeviceType device_type; -+ ClutterInputCapabilities capabilities; - - if (clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_LOGICAL) - return FALSE; - -- device_type = clutter_input_device_get_device_type (device); -+ capabilities = clutter_input_device_get_capabilities (device); - -- return (device_type == CLUTTER_TABLET_DEVICE || -- device_type == CLUTTER_PEN_DEVICE || -- device_type == CLUTTER_ERASER_DEVICE || -- device_type == CLUTTER_CURSOR_DEVICE || -- device_type == CLUTTER_PAD_DEVICE); -+ return (capabilities & -+ (CLUTTER_INPUT_CAPABILITY_TABLET_TOOL | -+ CLUTTER_INPUT_CAPABILITY_TABLET_PAD)) != 0; - } - - static void -diff --git a/src/wayland/meta-wayland-tablet-seat.c b/src/wayland/meta-wayland-tablet-seat.c -index f9b95a6568..a5d3443c67 100644 ---- a/src/wayland/meta-wayland-tablet-seat.c -+++ b/src/wayland/meta-wayland-tablet-seat.c -@@ -167,30 +167,27 @@ notify_pads (MetaWaylandTabletSeat *tablet_seat, - static gboolean - is_tablet_device (ClutterInputDevice *device) - { -- ClutterInputDeviceType device_type; -+ ClutterInputCapabilities capabilities; - - if (clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_LOGICAL) - return FALSE; - -- device_type = clutter_input_device_get_device_type (device); -+ capabilities = clutter_input_device_get_capabilities (device); - -- return (device_type == CLUTTER_TABLET_DEVICE || -- device_type == CLUTTER_PEN_DEVICE || -- device_type == CLUTTER_ERASER_DEVICE || -- device_type == CLUTTER_CURSOR_DEVICE); -+ return (capabilities & CLUTTER_INPUT_CAPABILITY_TABLET_TOOL) != 0; - } - - static gboolean - is_pad_device (ClutterInputDevice *device) - { -- ClutterInputDeviceType device_type; -+ ClutterInputCapabilities capabilities; - - if (clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_LOGICAL) - return FALSE; - -- device_type = clutter_input_device_get_device_type (device); -+ capabilities = clutter_input_device_get_capabilities (device); - -- return device_type == CLUTTER_PAD_DEVICE; -+ return (capabilities & CLUTTER_INPUT_CAPABILITY_TABLET_PAD) != 0; - } - - static void -@@ -471,8 +468,8 @@ meta_wayland_tablet_seat_notify_tool (MetaWaylandTabletSeat *tablet_seat, - } - - static GList * --lookup_grouped_devices (ClutterInputDevice *device, -- ClutterInputDeviceType type) -+lookup_grouped_devices (ClutterInputDevice *device, -+ ClutterInputCapabilities capabilities) - { - ClutterSeat *clutter_seat; - GList *devices, *l; -@@ -485,7 +482,8 @@ lookup_grouped_devices (ClutterInputDevice *device, - { - if (l->data == device) - continue; -- if (clutter_input_device_get_device_type (l->data) != type) -+ if ((clutter_input_device_get_capabilities (l->data) & capabilities) == -+ capabilities) - continue; - - if (!clutter_input_device_is_grouped (device, l->data)) -@@ -506,7 +504,8 @@ meta_wayland_tablet_seat_lookup_paired_tablet (MetaWaylandTabletSeat *tablet_sea - MetaWaylandTablet *tablet; - GList *devices; - -- devices = lookup_grouped_devices (pad->device, CLUTTER_TABLET_DEVICE); -+ devices = lookup_grouped_devices (pad->device, -+ CLUTTER_INPUT_CAPABILITY_TABLET_TOOL); - - if (!devices) - return NULL; -@@ -528,7 +527,8 @@ meta_wayland_tablet_seat_lookup_paired_pads (MetaWaylandTabletSeat *tablet_seat, - GList *l, *devices, *pads = NULL; - MetaWaylandTabletPad *pad; - -- devices = lookup_grouped_devices (tablet->device, CLUTTER_PAD_DEVICE); -+ devices = lookup_grouped_devices (tablet->device, -+ CLUTTER_INPUT_CAPABILITY_TABLET_PAD); - - for (l = devices; l; l = l->next) - { --- -GitLab - - -From 7f46fe60b73e3bf644e77dead18786e138dab4fe Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Tue, 8 Mar 2022 17:51:40 +0100 -Subject: [PATCH 8/9] backends: Update MetaInputSettings to apply settings - based on capabilities - -Since devices may be multiple things now, check all capabilities in order -to ensure all aspects of the device are correctly configured. - -This change does the following observations: -- Devices that have TOUCHPAD | POINTER capabilities prefer the 'touchpad' - settings path. The regular pointer settings path is left for all - non-touchpads. -- Devices that are both a tablet and a touchscreen prefer the tablet - relocatable schema. This works for both aspects as the touchscreen - schema is a subset of the tablet one. - -Other than that it's a rather boring, even if verbose search and replace. ---- - src/backends/meta-input-settings.c | 329 +++++++++++++++++++---------- - 1 file changed, 213 insertions(+), 116 deletions(-) - -diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c -index 16618608bb..7d03d7182c 100644 ---- a/src/backends/meta-input-settings.c -+++ b/src/backends/meta-input-settings.c -@@ -109,9 +109,27 @@ enum - - static guint signals[N_SIGNALS] = { 0 }; - -+static gboolean -+device_matches_capabilities (ClutterInputDevice *device, -+ ClutterInputCapabilities require_capabilities, -+ ClutterInputCapabilities reject_capabilities) -+{ -+ ClutterInputCapabilities capabilities; -+ -+ capabilities = clutter_input_device_get_capabilities (device); -+ -+ if ((capabilities & require_capabilities) != require_capabilities) -+ return FALSE; -+ if ((capabilities & reject_capabilities) != 0) -+ return FALSE; -+ -+ return TRUE; -+} -+ - static GSList * --meta_input_settings_get_devices (MetaInputSettings *settings, -- ClutterInputDeviceType type) -+meta_input_settings_get_devices (MetaInputSettings *settings, -+ ClutterInputCapabilities require_capabilities, -+ ClutterInputCapabilities reject_capabilities) - { - MetaInputSettingsPrivate *priv; - GList *l; -@@ -123,9 +141,15 @@ meta_input_settings_get_devices (MetaInputSettings *settings, - { - ClutterInputDevice *device = l->data; - -- if (clutter_input_device_get_device_type (device) == type && -- clutter_input_device_get_device_mode (device) != CLUTTER_INPUT_MODE_LOGICAL) -- list = g_slist_prepend (list, device); -+ if (clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_LOGICAL) -+ continue; -+ -+ if (!device_matches_capabilities (device, -+ require_capabilities, -+ reject_capabilities)) -+ continue; -+ -+ list = g_slist_prepend (list, device); - } - - return list; -@@ -160,15 +184,18 @@ settings_device_set_bool_setting (MetaInputSettings *input_settings, - } - - static void --settings_set_bool_setting (MetaInputSettings *input_settings, -- ClutterInputDeviceType type, -- ConfigBoolMappingFunc mapping_func, -- ConfigBoolFunc func, -- gboolean enabled) -+settings_set_bool_setting (MetaInputSettings *input_settings, -+ ClutterInputCapabilities capabilities, -+ ClutterInputCapabilities unset_capabilities, -+ ConfigBoolMappingFunc mapping_func, -+ ConfigBoolFunc func, -+ gboolean enabled) - { - GSList *devices, *l; - -- devices = meta_input_settings_get_devices (input_settings, type); -+ devices = meta_input_settings_get_devices (input_settings, -+ capabilities, -+ unset_capabilities); - - for (l = devices; l; l = l->next) - { -@@ -192,14 +219,17 @@ settings_device_set_double_setting (MetaInputSettings *input_settings, - } - - static void --settings_set_double_setting (MetaInputSettings *input_settings, -- ClutterInputDeviceType type, -- ConfigDoubleFunc func, -- gdouble value) -+settings_set_double_setting (MetaInputSettings *input_settings, -+ ClutterInputCapabilities capabilities, -+ ClutterInputCapabilities unset_capabilities, -+ ConfigDoubleFunc func, -+ gdouble value) - { - GSList *devices, *d; - -- devices = meta_input_settings_get_devices (input_settings, type); -+ devices = meta_input_settings_get_devices (input_settings, -+ capabilities, -+ unset_capabilities); - - for (d = devices; d; d = d->next) - settings_device_set_double_setting (input_settings, d->data, func, value); -@@ -217,14 +247,17 @@ settings_device_set_uint_setting (MetaInputSettings *input_settings, - } - - static void --settings_set_uint_setting (MetaInputSettings *input_settings, -- ClutterInputDeviceType type, -- ConfigUintFunc func, -- guint value) -+settings_set_uint_setting (MetaInputSettings *input_settings, -+ ClutterInputCapabilities capabilities, -+ ClutterInputCapabilities unset_capabilities, -+ ConfigUintFunc func, -+ guint value) - { - GSList *devices, *d; - -- devices = meta_input_settings_get_devices (input_settings, type); -+ devices = meta_input_settings_get_devices (input_settings, -+ capabilities, -+ unset_capabilities); - - for (d = devices; d; d = d->next) - settings_device_set_uint_setting (input_settings, d->data, func, value); -@@ -242,7 +275,9 @@ update_touchpad_left_handed (MetaInputSettings *input_settings, - gboolean enabled = FALSE; - - if (device && -- clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE) -+ !device_matches_capabilities (device, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE)) - return; - - priv = meta_input_settings_get_instance_private (input_settings); -@@ -272,7 +307,10 @@ update_touchpad_left_handed (MetaInputSettings *input_settings, - } - else - { -- settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, NULL, -+ settings_set_bool_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE, -+ NULL, - input_settings_class->set_left_handed, - enabled); - } -@@ -287,7 +325,9 @@ update_mouse_left_handed (MetaInputSettings *input_settings, - gboolean enabled; - - if (device && -- clutter_input_device_get_device_type (device) != CLUTTER_POINTER_DEVICE) -+ !device_matches_capabilities (device, -+ CLUTTER_INPUT_CAPABILITY_POINTER, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD)) - return; - - priv = meta_input_settings_get_instance_private (input_settings); -@@ -304,7 +344,10 @@ update_mouse_left_handed (MetaInputSettings *input_settings, - { - GDesktopTouchpadHandedness touchpad_handedness; - -- settings_set_bool_setting (input_settings, CLUTTER_POINTER_DEVICE, NULL, -+ settings_set_bool_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_POINTER, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ NULL, - input_settings_class->set_left_handed, - enabled); - -@@ -373,20 +416,19 @@ update_pointer_accel_profile (MetaInputSettings *input_settings, - } - - static GSettings * --get_settings_for_device_type (MetaInputSettings *input_settings, -- ClutterInputDeviceType type) -+get_settings_for_capabilities (MetaInputSettings *input_settings, -+ ClutterInputCapabilities capabilities) - { - MetaInputSettingsPrivate *priv; -+ - priv = meta_input_settings_get_instance_private (input_settings); -- switch (type) -- { -- case CLUTTER_POINTER_DEVICE: -- return priv->mouse_settings; -- case CLUTTER_TOUCHPAD_DEVICE: -- return priv->touchpad_settings; -- default: -- return NULL; -- } -+ -+ if (capabilities & CLUTTER_INPUT_CAPABILITY_TOUCHPAD) -+ return priv->touchpad_settings; -+ if (capabilities & CLUTTER_INPUT_CAPABILITY_POINTER) -+ return priv->mouse_settings; -+ -+ return NULL; - } - - static void -@@ -417,7 +459,9 @@ update_middle_click_emulation (MetaInputSettings *input_settings, - } - else - { -- settings_set_bool_setting (input_settings, CLUTTER_POINTER_DEVICE, -+ settings_set_bool_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_POINTER, -+ CLUTTER_INPUT_CAPABILITY_NONE, - NULL, func, - g_settings_get_boolean (settings, key)); - } -@@ -435,8 +479,8 @@ update_device_speed (MetaInputSettings *input_settings, - - if (device) - { -- settings = get_settings_for_device_type (input_settings, -- clutter_input_device_get_device_type (device)); -+ settings = get_settings_for_capabilities (input_settings, -+ clutter_input_device_get_capabilities (device)); - if (!settings) - return; - -@@ -445,11 +489,20 @@ update_device_speed (MetaInputSettings *input_settings, - } - else - { -- settings = get_settings_for_device_type (input_settings, CLUTTER_POINTER_DEVICE); -- settings_set_double_setting (input_settings, CLUTTER_POINTER_DEVICE, func, -+ settings = get_settings_for_capabilities (input_settings, -+ CLUTTER_INPUT_CAPABILITY_POINTER); -+ settings_set_double_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_POINTER, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ func, - g_settings_get_double (settings, key)); -- settings = get_settings_for_device_type (input_settings, CLUTTER_TOUCHPAD_DEVICE); -- settings_set_double_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, func, -+ -+ settings = get_settings_for_capabilities (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD); -+ settings_set_double_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE, -+ func, - g_settings_get_double (settings, key)); - } - } -@@ -466,8 +519,8 @@ update_device_natural_scroll (MetaInputSettings *input_settings, - - if (device) - { -- settings = get_settings_for_device_type (input_settings, -- clutter_input_device_get_device_type (device)); -+ settings = get_settings_for_capabilities (input_settings, -+ clutter_input_device_get_capabilities (device)); - if (!settings) - return; - -@@ -476,12 +529,19 @@ update_device_natural_scroll (MetaInputSettings *input_settings, - } - else - { -- settings = get_settings_for_device_type (input_settings, CLUTTER_POINTER_DEVICE); -- settings_set_bool_setting (input_settings, CLUTTER_POINTER_DEVICE, -+ settings = get_settings_for_capabilities (input_settings, -+ CLUTTER_INPUT_CAPABILITY_POINTER); -+ settings_set_bool_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_POINTER, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, - NULL, func, - g_settings_get_boolean (settings, key)); -- settings = get_settings_for_device_type (input_settings, CLUTTER_TOUCHPAD_DEVICE); -- settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, -+ -+ settings = get_settings_for_capabilities (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD); -+ settings_set_bool_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE, - NULL, func, - g_settings_get_boolean (settings, key)); - } -@@ -498,7 +558,9 @@ update_touchpad_disable_while_typing (MetaInputSettings *input_settings, - const gchar *key = "disable-while-typing"; - - if (device && -- clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE) -+ !device_matches_capabilities (device, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE)) - return; - - priv = meta_input_settings_get_instance_private (input_settings); -@@ -507,8 +569,8 @@ update_touchpad_disable_while_typing (MetaInputSettings *input_settings, - - if (device) - { -- settings = get_settings_for_device_type (input_settings, -- clutter_input_device_get_device_type (device)); -+ settings = get_settings_for_capabilities (input_settings, -+ clutter_input_device_get_capabilities (device)); - - if (!settings) - return; -@@ -519,7 +581,10 @@ update_touchpad_disable_while_typing (MetaInputSettings *input_settings, - } - else - { -- settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, NULL, -+ settings_set_bool_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE, -+ NULL, - input_settings_class->set_disable_while_typing, - enabled); - } -@@ -533,7 +598,10 @@ device_is_tablet_touchpad (MetaInputSettings *input_settings, - WacomIntegrationFlags flags = 0; - WacomDevice *wacom_device; - -- if (clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE) -+ if (device && -+ !device_matches_capabilities (device, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE)) - return FALSE; - - wacom_device = meta_input_device_get_wacom_device (META_INPUT_DEVICE (device)); -@@ -568,7 +636,9 @@ update_touchpad_tap_enabled (MetaInputSettings *input_settings, - gboolean enabled; - - if (device && -- clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE) -+ !device_matches_capabilities (device, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE)) - return; - - priv = meta_input_settings_get_instance_private (input_settings); -@@ -584,7 +654,9 @@ update_touchpad_tap_enabled (MetaInputSettings *input_settings, - } - else - { -- settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, -+ settings_set_bool_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE, - force_enable_on_tablet, - input_settings_class->set_tap_enabled, - enabled); -@@ -600,7 +672,9 @@ update_touchpad_tap_button_map (MetaInputSettings *input_settings, - MetaInputSettingsPrivate *priv; - - if (device && -- clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE) -+ !device_matches_capabilities (device, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE)) - return; - - priv = meta_input_settings_get_instance_private (input_settings); -@@ -615,7 +689,9 @@ update_touchpad_tap_button_map (MetaInputSettings *input_settings, - } - else - { -- settings_set_uint_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, -+ settings_set_uint_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE, - (ConfigUintFunc) input_settings_class->set_tap_button_map, - method); - } -@@ -630,7 +706,9 @@ update_touchpad_tap_and_drag_enabled (MetaInputSettings *input_settings, - gboolean enabled; - - if (device && -- clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE) -+ !device_matches_capabilities (device, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE)) - return; - - priv = meta_input_settings_get_instance_private (input_settings); -@@ -646,7 +724,9 @@ update_touchpad_tap_and_drag_enabled (MetaInputSettings *input_settings, - } - else - { -- settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, -+ settings_set_bool_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE, - force_enable_on_tablet, - input_settings_class->set_tap_and_drag_enabled, - enabled); -@@ -662,7 +742,9 @@ update_touchpad_tap_and_drag_lock_enabled (MetaInputSettings *input_settings, - gboolean enabled; - - if (device && -- clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE) -+ !device_matches_capabilities (device, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE)) - return; - - priv = meta_input_settings_get_instance_private (input_settings); -@@ -677,7 +759,9 @@ update_touchpad_tap_and_drag_lock_enabled (MetaInputSettings *input_settings, - } - else - { -- settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, -+ settings_set_bool_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE, - NULL, - input_settings_class->set_tap_and_drag_lock_enabled, - enabled); -@@ -695,7 +779,9 @@ update_touchpad_edge_scroll (MetaInputSettings *input_settings, - MetaInputSettingsPrivate *priv; - - if (device && -- clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE) -+ !device_matches_capabilities (device, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE)) - return; - - priv = meta_input_settings_get_instance_private (input_settings); -@@ -716,7 +802,10 @@ update_touchpad_edge_scroll (MetaInputSettings *input_settings, - } - else - { -- settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, NULL, -+ settings_set_bool_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE, -+ NULL, - (ConfigBoolFunc) input_settings_class->set_edge_scroll, - edge_scroll_enabled); - } -@@ -731,7 +820,9 @@ update_touchpad_two_finger_scroll (MetaInputSettings *input_settings, - MetaInputSettingsPrivate *priv; - - if (device && -- clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE) -+ !device_matches_capabilities (device, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE)) - return; - - priv = meta_input_settings_get_instance_private (input_settings); -@@ -750,7 +841,10 @@ update_touchpad_two_finger_scroll (MetaInputSettings *input_settings, - } - else - { -- settings_set_bool_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, NULL, -+ settings_set_bool_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE, -+ NULL, - (ConfigBoolFunc) input_settings_class->set_two_finger_scroll, - two_finger_scroll_enabled); - } -@@ -769,7 +863,9 @@ update_touchpad_click_method (MetaInputSettings *input_settings, - MetaInputSettingsPrivate *priv; - - if (device && -- clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE) -+ !device_matches_capabilities (device, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE)) - return; - - priv = meta_input_settings_get_instance_private (input_settings); -@@ -784,7 +880,9 @@ update_touchpad_click_method (MetaInputSettings *input_settings, - } - else - { -- settings_set_uint_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, -+ settings_set_uint_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE, - (ConfigUintFunc) input_settings_class->set_click_method, - method); - } -@@ -799,7 +897,9 @@ update_touchpad_send_events (MetaInputSettings *input_settings, - GDesktopDeviceSendEvents mode; - - if (device && -- clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE) -+ !device_matches_capabilities (device, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE)) - return; - - priv = meta_input_settings_get_instance_private (input_settings); -@@ -814,7 +914,9 @@ update_touchpad_send_events (MetaInputSettings *input_settings, - } - else - { -- settings_set_uint_setting (input_settings, CLUTTER_TOUCHPAD_DEVICE, -+ settings_set_uint_setting (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE, - input_settings_class->set_send_events, - mode); - } -@@ -890,9 +992,8 @@ update_tablet_keep_aspect (MetaInputSettings *input_settings, - gboolean keep_aspect; - double aspect_ratio; - -- if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_PEN_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_ERASER_DEVICE) -+ if ((clutter_input_device_get_capabilities (device) & -+ CLUTTER_INPUT_CAPABILITY_TABLET_TOOL) == 0) - return; - - priv = meta_input_settings_get_instance_private (input_settings); -@@ -933,9 +1034,8 @@ update_tablet_mapping (MetaInputSettings *input_settings, - MetaInputSettingsClass *input_settings_class; - GDesktopTabletMapping mapping; - -- if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_PEN_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_ERASER_DEVICE) -+ if ((clutter_input_device_get_capabilities (device) & -+ CLUTTER_INPUT_CAPABILITY_TABLET_TOOL) == 0) - return; - - #ifdef HAVE_LIBWACOM -@@ -969,9 +1069,8 @@ update_tablet_area (MetaInputSettings *input_settings, - const gdouble *area; - gsize n_elems; - -- if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_PEN_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_ERASER_DEVICE) -+ if ((clutter_input_device_get_capabilities (device) & -+ CLUTTER_INPUT_CAPABILITY_TABLET_TOOL) == 0) - return; - - #ifdef HAVE_LIBWACOM -@@ -1010,10 +1109,9 @@ update_tablet_left_handed (MetaInputSettings *input_settings, - MetaInputSettingsClass *input_settings_class; - gboolean enabled; - -- if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_PEN_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_ERASER_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_PAD_DEVICE) -+ if ((clutter_input_device_get_capabilities (device) & -+ (CLUTTER_INPUT_CAPABILITY_TABLET_TOOL | -+ CLUTTER_INPUT_CAPABILITY_TABLET_PAD)) == 0) - return; - - #ifdef HAVE_LIBWACOM -@@ -1125,14 +1223,13 @@ static void - apply_mappable_device_settings (MetaInputSettings *input_settings, - DeviceMappingInfo *info) - { -- ClutterInputDeviceType device_type; -+ ClutterInputCapabilities capabilities; - -- device_type = clutter_input_device_get_device_type (info->device); -+ capabilities = clutter_input_device_get_capabilities (info->device); - -- if (device_type == CLUTTER_TABLET_DEVICE || -- device_type == CLUTTER_PEN_DEVICE || -- device_type == CLUTTER_ERASER_DEVICE || -- device_type == CLUTTER_PAD_DEVICE) -+ if (capabilities & -+ (CLUTTER_INPUT_CAPABILITY_TABLET_TOOL | -+ CLUTTER_INPUT_CAPABILITY_TABLET_PAD)) - { - update_tablet_mapping (input_settings, info->settings, info->device); - update_tablet_area (input_settings, info->settings, info->device); -@@ -1223,28 +1320,28 @@ static GSettings * - lookup_device_settings (ClutterInputDevice *device) - { - const gchar *group, *schema, *vendor, *product; -- ClutterInputDeviceType type; -+ ClutterInputCapabilities capabilities; - GSettings *settings; - gchar *path; - -- type = clutter_input_device_get_device_type (device); -+ capabilities = clutter_input_device_get_capabilities (device); - -- if (type == CLUTTER_TOUCHSCREEN_DEVICE) -+ if ((capabilities & -+ (CLUTTER_INPUT_CAPABILITY_TABLET_TOOL | -+ CLUTTER_INPUT_CAPABILITY_TABLET_PAD)) != 0) -+ { -+ group = "tablets"; -+ schema = "org.gnome.desktop.peripherals.tablet"; -+ } -+ else if ((capabilities & CLUTTER_INPUT_CAPABILITY_TOUCH) != 0) - { - group = "touchscreens"; - schema = "org.gnome.desktop.peripherals.touchscreen"; - } -- else if (type == CLUTTER_TABLET_DEVICE || -- type == CLUTTER_PEN_DEVICE || -- type == CLUTTER_ERASER_DEVICE || -- type == CLUTTER_CURSOR_DEVICE || -- type == CLUTTER_PAD_DEVICE) -+ else - { -- group = "tablets"; -- schema = "org.gnome.desktop.peripherals.tablet"; -+ return NULL; - } -- else -- return NULL; - - vendor = clutter_input_device_get_vendor_id (device); - product = clutter_input_device_get_product_id (device); -@@ -1310,15 +1407,14 @@ check_add_mappable_device (MetaInputSettings *input_settings, - { - MetaInputSettingsPrivate *priv; - DeviceMappingInfo *info; -- ClutterInputDeviceType device_type; -+ ClutterInputCapabilities capabilities; - GSettings *settings; - -- device_type = clutter_input_device_get_device_type (device); -+ capabilities = clutter_input_device_get_capabilities (device); - -- if ((device_type == CLUTTER_TABLET_DEVICE || -- device_type == CLUTTER_PEN_DEVICE || -- device_type == CLUTTER_ERASER_DEVICE || -- device_type == CLUTTER_PAD_DEVICE) && -+ if ((capabilities & -+ (CLUTTER_INPUT_CAPABILITY_TABLET_TOOL | -+ CLUTTER_INPUT_CAPABILITY_TABLET_PAD)) != 0 && - g_getenv ("MUTTER_DISABLE_WACOM_CONFIGURATION") != NULL) - return FALSE; - -@@ -1334,7 +1430,7 @@ check_add_mappable_device (MetaInputSettings *input_settings, - info->device = device; - info->settings = settings; - -- if (device_type == CLUTTER_PAD_DEVICE) -+ if ((capabilities & CLUTTER_INPUT_CAPABILITY_TABLET_PAD) != 0) - { - info->group_modes = - g_new0 (guint, clutter_input_device_get_n_mode_groups (device)); -@@ -1398,9 +1494,8 @@ update_stylus_pressure (MetaInputSettings *input_settings, - GVariant *variant; - gsize n_elems; - -- if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_PEN_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_ERASER_DEVICE) -+ if ((clutter_input_device_get_capabilities (device) & -+ CLUTTER_INPUT_CAPABILITY_TABLET_TOOL) == 0) - return; - - if (!tool) -@@ -1431,9 +1526,8 @@ update_stylus_buttonmap (MetaInputSettings *input_settings, - GDesktopStylusButtonAction primary, secondary, tertiary; - GSettings *tool_settings; - -- if (clutter_input_device_get_device_type (device) != CLUTTER_TABLET_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_PEN_DEVICE && -- clutter_input_device_get_device_type (device) != CLUTTER_ERASER_DEVICE) -+ if ((clutter_input_device_get_capabilities (device) & -+ CLUTTER_INPUT_CAPABILITY_TABLET_TOOL) == 0) - return; - - if (!tool) -@@ -1466,7 +1560,8 @@ evaluate_two_finger_scrolling (MetaInputSettings *input_settings, - MetaInputSettingsClass *klass; - MetaInputSettingsPrivate *priv; - -- if (clutter_input_device_get_device_type (device) != CLUTTER_TOUCHPAD_DEVICE) -+ if ((clutter_input_device_get_capabilities (device) & -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD) == 0) - return; - - klass = META_INPUT_SETTINGS_GET_CLASS (input_settings); -@@ -1594,7 +1689,9 @@ meta_input_settings_constructed (GObject *object) - MetaInputSettings *input_settings = META_INPUT_SETTINGS (object); - GSList *devices, *d; - -- devices = meta_input_settings_get_devices (input_settings, CLUTTER_TOUCHPAD_DEVICE); -+ devices = meta_input_settings_get_devices (input_settings, -+ CLUTTER_INPUT_CAPABILITY_TOUCHPAD, -+ CLUTTER_INPUT_CAPABILITY_NONE); - for (d = devices; d; d = d->next) - evaluate_two_finger_scrolling (input_settings, d->data); - --- -GitLab - - -From 21d242f45c1f64a5c0ff07c4a003f2334eb70459 Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Tue, 8 Mar 2022 18:17:56 +0100 -Subject: [PATCH 9/9] core: Port to input device capabilities in pad mapper - -Check for tablets and pad devices using capabilities. ---- - src/core/meta-pad-action-mapper.c | 16 +++++++++------- - 1 file changed, 9 insertions(+), 7 deletions(-) - -diff --git a/src/core/meta-pad-action-mapper.c b/src/core/meta-pad-action-mapper.c -index d80878304e..dc43924b55 100644 ---- a/src/core/meta-pad-action-mapper.c -+++ b/src/core/meta-pad-action-mapper.c -@@ -141,7 +141,8 @@ device_added (ClutterSeat *seat, - { - PadMappingInfo *info; - -- if (clutter_input_device_get_device_type (device) == CLUTTER_PAD_DEVICE) -+ if ((clutter_input_device_get_capabilities (device) & -+ CLUTTER_INPUT_CAPABILITY_TABLET_PAD) != 0) - { - info = pad_mapping_info_new (device); - g_hash_table_insert (mapper->pads, device, info); -@@ -384,8 +385,9 @@ meta_pad_action_mapper_cycle_tablet_output (MetaPadActionMapper *mapper, - - g_return_if_fail (META_IS_PAD_ACTION_MAPPER (mapper)); - g_return_if_fail (CLUTTER_IS_INPUT_DEVICE (device)); -- g_return_if_fail (clutter_input_device_get_device_type (device) == CLUTTER_TABLET_DEVICE || -- clutter_input_device_get_device_type (device) == CLUTTER_PAD_DEVICE); -+ g_return_if_fail ((clutter_input_device_get_capabilities (device) & -+ (CLUTTER_INPUT_CAPABILITY_TABLET_TOOL | -+ CLUTTER_INPUT_CAPABILITY_TABLET_PAD)) != 0); - - info = g_hash_table_lookup (mapper->pads, device); - g_return_if_fail (info != NULL); -@@ -439,8 +441,8 @@ meta_pad_action_mapper_is_button_grabbed (MetaPadActionMapper *mapper, - { - g_return_val_if_fail (META_IS_PAD_ACTION_MAPPER (mapper), FALSE); - g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (pad), FALSE); -- g_return_val_if_fail (clutter_input_device_get_device_type (pad) == -- CLUTTER_PAD_DEVICE, FALSE); -+ g_return_val_if_fail ((clutter_input_device_get_capabilities (pad) & -+ CLUTTER_INPUT_CAPABILITY_TABLET_PAD) != 0, FALSE); - - return (meta_pad_action_mapper_get_button_action (mapper, pad, button) != - G_DESKTOP_PAD_BUTTON_ACTION_NONE); -@@ -827,8 +829,8 @@ meta_pad_action_mapper_get_button_label (MetaPadActionMapper *mapper, - - g_return_val_if_fail (META_IS_PAD_ACTION_MAPPER (mapper), NULL); - g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (pad), NULL); -- g_return_val_if_fail (clutter_input_device_get_device_type (pad) == -- CLUTTER_PAD_DEVICE, NULL); -+ g_return_val_if_fail ((clutter_input_device_get_capabilities (pad) & -+ CLUTTER_INPUT_CAPABILITY_TABLET_PAD) != 0, NULL); - - group = clutter_input_device_get_mode_switch_button_group (pad, button); - --- -GitLab - diff --git a/2333.patch b/2333.patch deleted file mode 100644 index 4536efb..0000000 --- a/2333.patch +++ /dev/null @@ -1,223 +0,0 @@ -From 8b0607cc4dd919bdf2e6c2bc1104032fc115c338 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= -Date: Wed, 9 Mar 2022 15:53:11 +0100 -Subject: [PATCH] clutter/stage: Repick when pointer actor goes unmapped - -I've overseen quite an important case in commit -98a5cb37d9159737f8f1af4196420db90bfcf879: Repicking only when actors get -destroyed is not enough, we actually need to repick when actors go -hidden/unmapped. - -While we could also listen to notify::mapped just like we listen to -notify::reactive, it seems better to avoid using property notifications -here due to the usage of g_object_freeze/thaw_notify() in ClutterActor. -It can lead to the stage receiving a notify::mapped with mapped = true -for a pointer actor, which really shouldn't happen (just like -notify::reactive with reactive = true shouldn't happen). - -Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5124 ---- - clutter/clutter/clutter-actor.c | 18 ++++ - clutter/clutter/clutter-stage-private.h | 3 + - clutter/clutter/clutter-stage.c | 105 +++++++++++------------- - 3 files changed, 69 insertions(+), 57 deletions(-) - -diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c -index 23ef03dc1f..4c1624e738 100644 ---- a/clutter/clutter/clutter-actor.c -+++ b/clutter/clutter/clutter-actor.c -@@ -1695,6 +1695,13 @@ clutter_actor_real_unmap (ClutterActor *self) - */ - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_MAPPED]); - -+ if (priv->has_pointer) -+ { -+ ClutterActor *stage = _clutter_actor_get_stage_internal (self); -+ -+ clutter_stage_invalidate_focus (CLUTTER_STAGE (stage), self); -+ } -+ - /* relinquish keyboard focus if we were unmapped while owning it */ - if (!CLUTTER_ACTOR_IS_TOPLEVEL (self)) - maybe_unset_key_focus (self); -@@ -12434,8 +12441,12 @@ void - clutter_actor_set_reactive (ClutterActor *actor, - gboolean reactive) - { -+ ClutterActorPrivate *priv; -+ - g_return_if_fail (CLUTTER_IS_ACTOR (actor)); - -+ priv = actor->priv; -+ - if (reactive == CLUTTER_ACTOR_IS_REACTIVE (actor)) - return; - -@@ -12445,6 +12456,13 @@ clutter_actor_set_reactive (ClutterActor *actor, - CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REACTIVE); - - g_object_notify_by_pspec (G_OBJECT (actor), obj_props[PROP_REACTIVE]); -+ -+ if (!CLUTTER_ACTOR_IS_REACTIVE (actor) && priv->has_pointer) -+ { -+ ClutterActor *stage = _clutter_actor_get_stage_internal (actor); -+ -+ clutter_stage_invalidate_focus (CLUTTER_STAGE (stage), actor); -+ } - } - - /** -diff --git a/clutter/clutter/clutter-stage-private.h b/clutter/clutter/clutter-stage-private.h -index efa341cc19..e9ba5707ed 100644 ---- a/clutter/clutter/clutter-stage-private.h -+++ b/clutter/clutter/clutter-stage-private.h -@@ -154,6 +154,9 @@ ClutterActor * clutter_stage_pick_and_update_device (ClutterStage *s - void clutter_stage_unlink_grab (ClutterStage *self, - ClutterGrab *grab); - -+void clutter_stage_invalidate_focus (ClutterStage *self, -+ ClutterActor *actor); -+ - G_END_DECLS - - #endif /* __CLUTTER_STAGE_PRIVATE_H__ */ -diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c -index 5cd09a2c44..705bd92a8f 100644 ---- a/clutter/clutter/clutter-stage.c -+++ b/clutter/clutter/clutter-stage.c -@@ -3150,53 +3150,62 @@ clutter_stage_set_actor_needs_immediate_relayout (ClutterStage *stage) - priv->actor_needs_immediate_relayout = TRUE; - } - --static void --on_device_actor_reactive_changed (ClutterActor *actor, -- GParamSpec *pspec, -- PointerDeviceEntry *entry) -+void -+clutter_stage_invalidate_focus (ClutterStage *self, -+ ClutterActor *actor) - { -- ClutterStage *self = entry->stage; -+ ClutterStagePrivate *priv = self->priv; -+ GHashTableIter iter; -+ gpointer value; - -- g_assert (!clutter_actor_get_reactive (actor)); -+ if (CLUTTER_ACTOR_IN_DESTRUCTION (self)) -+ return; - -- clutter_stage_pick_and_update_device (self, -- entry->device, -- entry->sequence, -- CLUTTER_DEVICE_UPDATE_IGNORE_CACHE | -- CLUTTER_DEVICE_UPDATE_EMIT_CROSSING, -- entry->coords, -- CLUTTER_CURRENT_TIME); --} -+ g_assert (!clutter_actor_is_mapped (actor) || !clutter_actor_get_reactive (actor)); - --static void --on_device_actor_destroyed (ClutterActor *actor, -- PointerDeviceEntry *entry) --{ -- /* Simply unset the current_actor pointer here, there's no need to -- * unset has_pointer or to disconnect any signals because the actor -- * is gone anyway. -- */ -- entry->current_actor = NULL; -- g_clear_pointer (&entry->clear_area, cairo_region_destroy); -- clutter_stage_repick_device (entry->stage, entry->device); -+ g_hash_table_iter_init (&iter, priv->pointer_devices); -+ while (g_hash_table_iter_next (&iter, NULL, &value)) -+ { -+ PointerDeviceEntry *entry = value; -+ -+ if (entry->current_actor != actor) -+ continue; -+ -+ clutter_stage_pick_and_update_device (self, -+ entry->device, -+ NULL, -+ CLUTTER_DEVICE_UPDATE_IGNORE_CACHE | -+ CLUTTER_DEVICE_UPDATE_EMIT_CROSSING, -+ entry->coords, -+ CLUTTER_CURRENT_TIME); -+ } -+ -+ g_hash_table_iter_init (&iter, priv->touch_sequences); -+ while (g_hash_table_iter_next (&iter, NULL, &value)) -+ { -+ PointerDeviceEntry *entry = value; -+ -+ if (entry->current_actor != actor) -+ continue; -+ -+ clutter_stage_pick_and_update_device (self, -+ entry->device, -+ entry->sequence, -+ CLUTTER_DEVICE_UPDATE_IGNORE_CACHE | -+ CLUTTER_DEVICE_UPDATE_EMIT_CROSSING, -+ entry->coords, -+ CLUTTER_CURRENT_TIME); -+ } -+ -+ if (actor != CLUTTER_ACTOR (self)) -+ g_assert (!clutter_actor_has_pointer (actor)); - } - - static void - free_pointer_device_entry (PointerDeviceEntry *entry) - { - if (entry->current_actor) -- { -- ClutterActor *actor = entry->current_actor; -- -- g_signal_handlers_disconnect_by_func (actor, -- G_CALLBACK (on_device_actor_reactive_changed), -- entry); -- g_signal_handlers_disconnect_by_func (actor, -- G_CALLBACK (on_device_actor_destroyed), -- entry); -- -- _clutter_actor_set_has_pointer (actor, FALSE); -- } -+ _clutter_actor_set_has_pointer (entry->current_actor, FALSE); - - g_clear_pointer (&entry->clear_area, cairo_region_destroy); - -@@ -3240,30 +3249,12 @@ clutter_stage_update_device_entry (ClutterStage *self, - if (entry->current_actor != actor) - { - if (entry->current_actor) -- { -- ClutterActor *old_actor = entry->current_actor; -- -- g_signal_handlers_disconnect_by_func (old_actor, -- G_CALLBACK (on_device_actor_reactive_changed), -- entry); -- g_signal_handlers_disconnect_by_func (old_actor, -- G_CALLBACK (on_device_actor_destroyed), -- entry); -- -- _clutter_actor_set_has_pointer (old_actor, FALSE); -- } -+ _clutter_actor_set_has_pointer (entry->current_actor, FALSE); - - entry->current_actor = actor; - - if (actor) -- { -- g_signal_connect (actor, "notify::reactive", -- G_CALLBACK (on_device_actor_reactive_changed), entry); -- g_signal_connect (actor, "destroy", -- G_CALLBACK (on_device_actor_destroyed), entry); -- -- _clutter_actor_set_has_pointer (actor, TRUE); -- } -+ _clutter_actor_set_has_pointer (actor, TRUE); - } - - g_clear_pointer (&entry->clear_area, cairo_region_destroy); --- -GitLab - diff --git a/2366.patch b/2366.patch deleted file mode 100644 index 3185a24..0000000 --- a/2366.patch +++ /dev/null @@ -1,37 +0,0 @@ -From dd2eba8d12c2fca877e2180bbdcc5bce416781ae Mon Sep 17 00:00:00 2001 -From: Carlos Garnacho -Date: Wed, 6 Apr 2022 16:07:07 +0200 -Subject: [PATCH] core: Account ClutterStage grabs on Wayland key focus - synchronization - -When switching between the existence and not of a stage ClutterGrab, we -would correctly attempt to synchronize key focus from the perspective of -the Wayland clients. - -But this synchronization should do its own checks about existing stage -grabs before determining a client window has key focus or not. - -Add that check, so that grabs correctly unfocus the keyboard in Wayland -clients, in addition to pointers and touch. - -Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2194 ---- - src/core/display.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/core/display.c b/src/core/display.c -index 5f99578a69..a1c5c2d912 100644 ---- a/src/core/display.c -+++ b/src/core/display.c -@@ -1431,6 +1431,8 @@ meta_display_sync_wayland_input_focus (MetaDisplay *display) - focus_window = NULL; - else if (is_no_focus_xwindow) - focus_window = NULL; -+ else if (clutter_stage_get_grab_actor (CLUTTER_STAGE (stage))) -+ focus_window = NULL; - else if (display->focus_window && display->focus_window->surface) - focus_window = display->focus_window; - else --- -GitLab - diff --git a/mutter.spec b/mutter.spec index 3b78334..48d1a7f 100644 --- a/mutter.spec +++ b/mutter.spec @@ -9,8 +9,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: mutter -Version: 42.0 -Release: 6%{?dist} +Version: 42.1 +Release: 1%{?dist} Summary: Window and compositing manager based on Clutter License: GPLv2+ @@ -26,50 +26,6 @@ Patch1: 0001-Revert-build-Do-not-provide-built-sources-as-libmutt.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1936991 Patch2: mutter-42.alpha-disable-tegra.patch -# Handle input devices with multiple capabilities properly -# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2331 -# https://gitlab.gnome.org/GNOME/mutter/-/issues/2154 -# https://bugzilla.redhat.com/show_bug.cgi?id=2017043 -Patch3: 2331.patch - -# Avoid crashing on reentry into mapping/unmapping cycle -# https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3165 -# https://bugzilla.redhat.com/show_bug.cgi?id=2063381 -# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2299 -Patch4: 2299.patch - -# Fix input to overview search freezing when using input method -# https://gitlab.gnome.org/GNOME/mutter/-/issues/2188 -# https://bugzilla.redhat.com/show_bug.cgi?id=2062660 -# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2353 -Patch5: 0001-clutter-Refactor-code-marking-actors-dirty-for-paint.patch -Patch6: 0002-clutter-Keep-actors-dirty-if-a-redraw-was-queued-up-.patch - -# Fix window switching being locked when dimming is interrupted -# https://gitlab.gnome.org/GNOME/mutter/-/issues/2224 -# https://bugzilla.redhat.com/show_bug.cgi?id=2073206 -# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2333 -Patch7: 2333.patch - -# Fix top bar hover issues -# https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5289 -# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2321 -Patch8: 0001-clutter-Pass-target-actor-of-events-to-event-filter-.patch -Patch9: 0002-events-Use-the-event-target-actor-to-determine-windo.patch - -# Fix issues with stuck modifier keys -# https://gitlab.gnome.org/GNOME/mutter/-/issues/2194 -# https://bugzilla.redhat.com/show_bug.cgi?id=2076390 -# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2366 -Patch10: 2366.patch - -# Fix graphics initialization on legacy Radeon -# https://gitlab.gnome.org/GNOME/mutter/-/issues/2210 -# https://bugzilla.redhat.com/show_bug.cgi?id=2081070 -# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2359 -Patch11: 0001-kms-impl-device-Add-addfb2_modifiers-to-MetaKmsDevic.patch -Patch12: 0002-kms-device-Disable-modifiers-when-DRM_CAP_ADDFB2_MOD.patch - BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.41.0 BuildRequires: pkgconfig(sm) BuildRequires: pkgconfig(libwacom) @@ -213,6 +169,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %{_datadir}/mutter-%{mutter_api_version}/tests %changelog +* Fri May 06 2022 Florian Müllner - 42.1-1 +- Update to 42.1 + * Mon May 02 2022 Adam Williamson - 42.0-6 - Backport MR #2359 to fix GNOME on legacy Radeon (#2081070)