Accepting request 975406 from GNOME:Factory

- Update to version 42.1:
  + Send correct LEAVE events when entering windows.
  + Be more forgiving with wrongly sized clients.
  + Add ClutterInputCapabilities enum and device property.
  + Fall back if COPY_MODE_SECONDARY_GPU fails to init.
  + Fix missing root window properties after XWayland start.
  + wayland/shm: Add support for ABGR8888 and XBGR8888 formats.
  + Keep actors dirty if a redraw was queued up during paint().
  + Fix overview painting of shaped texture with layer snippets.
  + Survive missing GAMMA_LUT KMS property.
  + Record current event when going through event filters.
  + Pass events to pointer a11y before going through filters.
  + Update cursor when scaled or transformed.
  + Fix screen cast when DMA buffer fails or can't be used.
  + Repick when pointer actor goes unmapped.
  + Improve IM support.
  + Allow using dumb buffers for cursor sprites.
  + wayland/dma-buf: Only advertise supported formats.
  + Fix screen cast cursor metadata with unthrottled input.
  + Fixed crashes.
  + Plugged memory leak.
- Drop mutter-bail-out-on-reentry-into-map-unmap.patch and
  mutter-42.0-fix-top-bar-elements-hovering-effect.patch (merged
  upstream). (forwarded request 975365 from fcrozat)

OBS-URL: https://build.opensuse.org/request/show/975406
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mutter?expand=0&rev=184
This commit is contained in:
Dominique Leuenberger 2022-05-08 19:52:33 +00:00 committed by Git OBS Bridge
commit 70c1b5db52
8 changed files with 36 additions and 333 deletions

View File

@ -3,7 +3,7 @@
<service name="obs_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://gitlab.gnome.org/GNOME/mutter.git</param>
<param name="revision">refs/tags/42.0</param>
<param name="revision">refs/tags/42.1</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">(.*)\+0</param>
<param name="versionrewrite-replacement">\1</param>

View File

@ -1,240 +0,0 @@
From 2aad56b949b86b4f1d0eab6d3d3b0d5491e8515b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2321>
---
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
--
GitLab
From 0280b0aaa563db65bf79a3643f6a9e8e76bfe458 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2321>
---
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;
--
GitLab

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f5672cdaa73fd384fe237e61a9e4395e93ee82d9f8e94491bf2f3efee2f95821
size 25040909

3
mutter-42.1.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e0aae69ebd27faa14f351631bdfe5fb3cab1334938fd052c244a213a5d4ca384
size 25077261

View File

@ -1,76 +0,0 @@
From 53de072634527c5f433911553d8f921a6e119ac1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
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

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Fri May 06 08:22:25 UTC 2022 - Frederic Crozat <fcrozat@suse.com>
- Update to version 42.1:
+ Send correct LEAVE events when entering windows.
+ Be more forgiving with wrongly sized clients.
+ Add ClutterInputCapabilities enum and device property.
+ Fall back if COPY_MODE_SECONDARY_GPU fails to init.
+ Fix missing root window properties after XWayland start.
+ wayland/shm: Add support for ABGR8888 and XBGR8888 formats.
+ Keep actors dirty if a redraw was queued up during paint().
+ Fix overview painting of shaped texture with layer snippets.
+ Survive missing GAMMA_LUT KMS property.
+ Record current event when going through event filters.
+ Pass events to pointer a11y before going through filters.
+ Update cursor when scaled or transformed.
+ Fix screen cast when DMA buffer fails or can't be used.
+ Repick when pointer actor goes unmapped.
+ Improve IM support.
+ Allow using dumb buffers for cursor sprites.
+ wayland/dma-buf: Only advertise supported formats.
+ Fix screen cast cursor metadata with unthrottled input.
+ Fixed crashes.
+ Plugged memory leak.
- Drop mutter-bail-out-on-reentry-into-map-unmap.patch and
mutter-42.0-fix-top-bar-elements-hovering-effect.patch (merged
upstream).
-------------------------------------------------------------------
Sun Mar 27 05:38:39 UTC 2022 - Luciano Santos <luc14n0@opensuse.org>

View File

@ -1,4 +1,4 @@
name: mutter
version: 42.0
mtime: 1647100643
commit: 9249aba72a5c4454894c08735a4963ca1665e34d
version: 42.1
mtime: 1651777298
commit: 94bd385bf3ece2a746d8755049fc1fa5c8c0a808

View File

@ -22,7 +22,7 @@
%define api_minor 0
%define libmutter libmutter-%{api_major}-%{api_minor}
Name: mutter
Version: 42.0
Version: 42.1
Release: 0
Summary: Window and compositing manager based on Clutter
License: GPL-2.0-or-later
@ -38,13 +38,6 @@ Patch0: mutter-Lower-HIDPI_LIMIT-to-144.patch
Patch1: mutter-disable-cvt-s390x.patch
# PATCH-FIX-OPENSUSE mutter-window-actor-Special-case-shaped-Java-windows.patch -- window-actor: Special-case shaped Java windows
Patch2: mutter-window-actor-Special-case-shaped-Java-windows.patch
# PATCH-FIX-UPSTREAM mutter-bail-out-on-reentry-into-map-unmap.patch bsc#1197350, glgo#GNOME/mutter!2299 alynx.zhou@suse.com -- Bail out on reentry into map/unmap() in Clutter
Patch3: mutter-bail-out-on-reentry-into-map-unmap.patch
# PATCH-FIX-UPSTREAM mutter-42.0-fix-top-bar-elements-hovering-effect.patch -- luc14n0@opensuse.org
# Elements in the top bar don't lose the cursor hovering effect if the cursor immediately enters an app window.
# Based on commits: 0280b0aaa563db65bf79a3643f6a9e8e76bfe458 and 2aad56b949b86b4f1d0eab6d3d3b0d5491e8515b
# Upstream issue: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5203
Patch4: mutter-42.0-fix-top-bar-elements-hovering-effect.patch
## SLE-only patches start at 1000
# PATCH-FEATURE-SLE mutter-SLE-bell.patch FATE#316042 bnc#889218 idonmez@suse.com -- make audible bell work out of the box.
@ -152,8 +145,6 @@ applications that want to make use of the mutter library.
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
# SLE-only patches and translations.
%if 0%{?sle_version}