Package: mutter / 3.30.2-9~deb10u1

Metadata

Package Version Patches format
mutter 3.30.2-9~deb10u1 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
Update French translation.patch | (download)

po/fr.po | 35 18 + 17 - 0 !
1 file changed, 18 insertions(+), 17 deletions(-)

 update french translation

Update Basque translation.patch | (download)

po/eu.po | 282 170 + 112 - 0 !
1 file changed, 170 insertions(+), 112 deletions(-)

 update basque translation

cogl auto texture Avoid a double free crash.patch | (download)

cogl/cogl/deprecated/cogl-auto-texture.c | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 cogl-auto-texture: avoid a double-free crash

If texture allocation fails (e.g. on an old GPU with size limit 2048)
then `cogl_texture_new_with_size` was trying to use the same CoglError
twice. The second time was after it had already been freed.

Bug reported and fix provided by Gert van de Kraats.

(cherry picked from commit d21478b0f0163b0688abe065a7009b33453d0d00)

Bug-Ubuntu: https://launchpad.net/bugs/1790525
clutter offscreen effect Disable if no texture.patch | (download)

clutter/clutter/clutter-offscreen-effect.c | 9 6 + 3 - 0 !
1 file changed, 6 insertions(+), 3 deletions(-)

 clutter-offscreen-effect: disable if no texture

If texture allocation fails (e.g. on an old GPU with size limit 2048)
then `update_fbo` would return `FALSE` but leaves `priv->offscreen`
as non-NULL. So the next paint will try to use the offscreen with a
`NULL` texture and crashes. The solution is simply to ensure that
`priv->offscreen` is NULL if there is no `priv->texture`, so the default
(non-offscreen) paint path gets used instead.

Bug reported and fix provided by Gert van de Kraats.

(cherry picked from commit f31cf0c3ef99b27c0b2c0161fc9fc1eb82778b2e)

(cherry picked from commit 1b78ca8c5eef39831639a0bde8d613cd1bb024dc)

Bug-Ubuntu: https://launchpad.net/bugs/1795774
clutter Avoid rounding compensation when invalidating 2D .patch | (download)

clutter/clutter/clutter-paint-volume.c | 15 15 + 0 - 0 !
1 file changed, 15 insertions(+)

 clutter: avoid rounding compensation when invalidating 2d actors

This allows the redraw clip to be more constrained, so MetaCullable doesn't
end up rendering portions of window shadows, frame and background when a
window invalidates (part of) its contents.

(cherry picked from commit a7df459416dc46321204c98197e4fd84724976e0)

Bug-Ubuntu: https://launchpad.net/bugs/1767648
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=782344
tests Don t check pixels outside actor allocation.patch | (download)

clutter/tests/conform/actor-shader-effect.c | 8 4 + 4 - 0 !
1 file changed, 4 insertions(+), 4 deletions(-)

 tests: don't check pixels outside actor allocation

The actor-shader-effect test actors are 50px wide, but we check the 51st
pixel. This went along undetected until "clutter: Avoid rounding
compensation when invalidating 2D actors" because the paint volumes were
made slightly bigger and the shaders paint all over them (I guess nobody
noticed those actors being actually ~52px wide).

Update the test to check the middle of the opposite edge, so we keep neatly
rounded numbers.

(cherry picked from commit 1d73533f786b8f83fcffae7e5f5965d3b1f4e57a)

screen cast Fix monitor recording on HiDPI.patch | (download)

src/backends/meta-screen-cast-monitor-stream-src.c | 6 5 + 1 - 0 !
1 file changed, 5 insertions(+), 1 deletion(-)

 screen-cast: fix monitor recording on hidpi

It scaled the logical monitor rect with scale to get the stream
dimensions, but that is only valid when having
'scale-monitor-framebuffers' enabled. Even when it was, it didn't work
properly, as clutter_stage_capture_into() doesn't work properly with
scaled monitor framebuffers yet.

(cherry picked from commit 3fa6a92cc5dda6ab3939c3e982185f6caf453360)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/415
monitor manager Don t use switch config when ensuring con.patch | (download)

src/backends/meta-monitor-manager.c | 4 1 + 3 - 0 !
1 file changed, 1 insertion(+), 3 deletions(-)

 monitor-manager: don't use switch-config when ensuring configuration

Switch-configs are only to be used in certain circumstances (see
meta_monitor_manager_can_switch_config()) so when ensuring
configuration and attempting to create a linear configuration, use the
linear configuration constructor function directly without going via the
switch config method, otherwise we might incorrectly fall back to the
fallback configuration (only enable primary monitor).

This is a regression introduced by 6267732bec97773.

(cherry picked from commit 149e4d69345adab2bfea84a04f88511cbad62fe0)

Bug: https://gitlab.gnome.org/GNOME/mutter/issues/342
clutter evdev Fix toggling accessibility features from ke.patch | (download)

clutter/clutter/evdev/clutter-input-device-evdev.c | 17 7 + 10 - 0 !
1 file changed, 7 insertions(+), 10 deletions(-)

 clutter/evdev: fix toggling accessibility features from keyboard

Enabling keyboard accessibility features on Wayland from the keyboard
was wrongly assumed to be controlled by the "togglekeys" setting,
whereas it should be simply controlled by the "enable" setting.

As "togglekeys" is off by default and doesn't have a UI option to
enable, that would prevent turning on or off the keyboard accessibility
features using the keyboard.

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/501
clutter Fix check for keyboard a11y features.patch | (download)

clutter/clutter/evdev/clutter-input-device-evdev.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 clutter: fix check for keyboard a11y features

The typo was actually toggling the feature on for those who had it
disabled.

Bug: https://gitlab.gnome.org/GNOME/mutter/issues/529
clutter x11 Consider remapped keys when guessing the keyc.patch | (download)

clutter/clutter/x11/clutter-keymap-x11.c | 20 20 + 0 - 0 !
1 file changed, 20 insertions(+)

 clutter/x11: consider remapped keys when guessing the keycode from
 the keysym

Since e3e933c4 a keyval can be temporarily remapped to an unused keycode. Due to
some limitations in XTestFakeKeyEvent, the remapping has to be done in the first
xkb group/layout. In case there are two or more keyboard layouts enabled and the
selected keyboard layout is not the first, clutter_keymap_x11_keycode_for_keyval
will fail to retrieve the correct keycode for a remapped keyval. Let's use the
reserved_keycodes map in order to retrieve the correct keycode if needed.

(cherry picked from commit e0811ce1416f93906026a18fda4cd6811594cfb2)

Bug: https://gitlab.gnome.org/GNOME/mutter/issues/443
compositor Destroy window actors list on destruction.patch | (download)

src/compositor/compositor.c | 17 17 + 0 - 0 !
1 file changed, 17 insertions(+)

 compositor: destroy window actors list on destruction

When the compositor is destroyed we should cleanup the list of window actors we
created and destroy them.
Since all the actors are added to the window_group or top_window_group we can
just destroy these containers (together with the feedback_group), and simply
free the windows list.

This is particularly needed under X11 because before we destroy the display, we
might do some cleanups as detaching the surface pixmaps and freeing the damages
and if this happens at later point (for example when triggered by garbage
collector in gnome-shell), we might crash because the x11 dpy reference is
already gone.

Destroying the window actors instead, ensures we avoid any further call to X11
related functions and that we release the actors XServer resources.

(cherry picked from commit 7718e67f5c0c78ed93e9ad04e7254b6db70a0337)

Bug: https://gitlab.gnome.org/GNOME/mutter/issues/576
compositor Disconnect from stage signals on destruction.patch | (download)

src/compositor/compositor-private.h | 3 3 + 0 - 0 !
src/compositor/compositor.c | 21 16 + 5 - 0 !
2 files changed, 19 insertions(+), 5 deletions(-)

 compositor: disconnect from stage signals on destruction

From this point there's not any need for the compositor to listen to signals
so we can disconnect from the stage ones we are connected to.

(cherry picked from commit 3ba79961fed2c70df3201b3e588990c92aadcd7f)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/556
clutter x11 Implement keycode remap to keysyms on virtual.patch | (download)

clutter/clutter/x11/clutter-keymap-x11.c | 167 167 + 0 - 0 !
clutter/clutter/x11/clutter-keymap-x11.h | 6 5 + 1 - 0 !
clutter/clutter/x11/clutter-virtual-input-device-x11.c | 19 14 + 5 - 0 !
3 files changed, 186 insertions(+), 6 deletions(-)

 clutter/x11: implement keycode remap to keysyms on virtual key
 devices

Keycode lookup can fail for serveral reasons, e.g. if there is no combination of
modifiers and keycodes that can produce the target keysym with the current
keyboard layout.

In case the keycode lookup fails, remap temporarily the keysym to an unused
keycodes.

(cherry-picked from commit e3e933c47a69bd137bb83b3692d105d1261d16ff)

Bug: https://gitlab.gnome.org/GNOME/gnome-shell/issues/109
cursor renderer native Free MetaCursorNativePrivate struc.patch | (download)

src/backends/native/meta-cursor-renderer-native.c | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 cursor-renderer-native: free metacursornativeprivate struct

Fix a small leak in native renderer.

(cherry picked from commit b016ff29f638b04d1a756b82c461563207083391)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
wayland seat Use g_free to cleanup MetaWaylandSeat.patch | (download)

src/wayland/meta-wayland-seat.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 wayland-seat: use g_free to cleanup metawaylandseat

MetaWaylandSeat is allocated using g_new0(), and thus we should use g_free() to
destroy it.

(cherry picked from commit 040578657309a515df4c73b51a068140ad477f03)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
cogl pipeline Don t try to access to free d pointer data.patch | (download)

cogl/cogl/cogl-pipeline.c | 6 3 + 3 - 0 !
1 file changed, 3 insertions(+), 3 deletions(-)

 cogl/pipeline: don't try to access to free'd pointer data

When free'ing a pipeline we destroy the BigState first and then the fragment and
vertex snippets lists using the big state pointer which is now invalid.
This causes a crash  when G_SLICE=always-malloc is set and using MALLOC_CHECK_.

So, invert the operations by free'ing the snippet lists first, and the big state
afterwards.

(cherry picked from commit 7e0d185120ea116c91a8db60276971d3fecece80)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/581
renderer native add missing eglTerminate in EGLDevice err.patch | (download)

src/backends/native/meta-renderer-native.c | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 renderer/native: add missing eglterminate in egldevice error path
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Currently the EGLDevice code gets the display and calls eglInitialize.
As a follow-up it checks the required EGL extensions - technically it
could check the EGL device extensions earlier.

In either case, eglTerminate is missing. Thus the connection to the
display was still bound.

This was highlighted with Mesa commit d6edccee8da ("egl: add
EGL_platform_device support") + amdgpu.

In that case, since the eglTerminate is missing, we end up reusing the
underlying amdgpu_device due to some caching in libdrm_amdgpu. The
latter in itself being a good solution since it allows buffer sharing
across primary and render node of the same device.

Note: we should really get this in branches all the way back to 3.30.

(cherry picked from commit 9213574870faee7fe40609791fc48f4b44f861c0)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/619
Fixes: 934184e23 ("MetaRendererNative: Add EGLDevice based rendering support")
Cc: Jonas dahl <jadahl@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

Updated Spanish translation.patch | (download)

po/es.po | 53 32 + 21 - 0 !
1 file changed, 32 insertions(+), 21 deletions(-)

 updated spanish translation

workspace Focus only ancestors that are focusable.patch | (download)

src/core/workspace.c | 37 27 + 10 - 0 !
1 file changed, 27 insertions(+), 10 deletions(-)

 workspace: focus only ancestors that are focusable

When destroying a window that has a parent, we initially try to focus one of
its ancestors. However if no ancestor can be focused, then we should instead
focus the default focus window instead of trying to request focus for a window
that can't get focus anyways.

(cherry picked from commit eccc791f3b3451216f957e67fec47a73b65ed2b2)
Bug: https://gitlab.gnome.org/GNOME/mutter/issues/308
tests Add accept_focus command to runner and client.patch | (download)

src/tests/test-client.c | 18 18 + 0 - 0 !
src/tests/test-runner.c | 19 19 + 0 - 0 !
2 files changed, 37 insertions(+)

 tests: add 'accept_focus' command to runner and client

Under the hood, calls gtk_window_set_accept_focus in the client

(cherry picked from commit e1f839f48f8e49c826ba558fbc9d6842a156b28b)
Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/307
tests Add can_take_focus command to runner and client.patch | (download)

src/tests/test-client.c | 50 50 + 0 - 0 !
src/tests/test-runner.c | 19 19 + 0 - 0 !
2 files changed, 69 insertions(+)

 tests: add 'can_take_focus' command to runner and client

Allow to set/unset WM_TAKE_FOCUS from client window.
This is added by default by gtk, but this might not happen in other toolkits,
so add an ability to (un)set this.

So fetch the protocols with XGetWMProtocols and unset the atom.

test-client now needs to depend on Xlib directly in meson build.

(cherry picked from commit f2d2d473b71dbdb339c80f068c5cb3e529af2478)
Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/307
tests stacking Add tests with no input and no take focus .patch | (download)

src/Makefile-tests.am | 3 3 + 0 - 0 !
src/tests/stacking/closed-transient-no-input-no-take-focus-parent.metatest | 21 21 + 0 - 0 !
src/tests/stacking/closed-transient-no-input-no-take-focus-parents.metatest | 23 23 + 0 - 0 !
src/tests/stacking/closed-transient-no-input-parent.metatest | 20 20 + 0 - 0 !
4 files changed, 67 insertions(+)

 tests, stacking: add tests with no-input and no-take-focus windows

When a window with no frame, that doesn't accept focus and that has no
take-focus atom set is destroyed, we ended up in not changing the current_focus
window, causing a crash.

Added test cases that verify this situation.

Related to https://gitlab.gnome.org/GNOME/mutter/issues/308
(cherry picked from commit 2fc7760ceed6f948d4f3c1dd74d4e57c7df05eea)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/307
test runner Add assert_focused command.patch | (download)

src/tests/test-runner.c | 36 36 + 0 - 0 !
1 file changed, 36 insertions(+)

 test-runner: add 'assert_focused' command

This allows to verify which window should have the focus, which might not
be the same as the top of the stack.

It's possible to assert the case where there's no focused window using
"NONE" as parameter.

(cherry picked from commit 51f9e04ef1fa8cd7298044ac8c82e83bea425770)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/307
tests Verify focused window in closed transient tests.patch | (download)

src/tests/stacking/closed-transient-no-input-no-take-focus-parent.metatest | 2 2 + 0 - 0 !
src/tests/stacking/closed-transient-no-input-no-take-focus-parents.metatest | 13 10 + 3 - 0 !
2 files changed, 12 insertions(+), 3 deletions(-)

 tests: verify focused window in closed-transient tests

Ensure that we have a focused window when closing transient windows with
no-focus or no-take-focus atoms

(cherry picked from commit fcb408ad5d8d7fec3e6a7bdaa92e5ef06b55c2c6)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/307
test runner Add sleep command.patch | (download)

src/tests/test-runner.c | 29 27 + 2 - 0 !
1 file changed, 27 insertions(+), 2 deletions(-)

 test-runner: add 'sleep' command

This allows to sleep for a given timeout in milliseconds.

Rename test_case_before_redraw to test_case_loop_quit since it's a generic
function and use it for the timeout too.

(cherry picked from commit d08763c18cb25fe250b27bf296e1607e63e86400)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/307
test runner Add dispatch command.patch | (download)

src/tests/test-runner.c | 38 28 + 10 - 0 !
1 file changed, 28 insertions(+), 10 deletions(-)

 test-runner: add 'dispatch' command

This will only wait for events to be dispatched and processed by the server
without waiting for client processing.

Reuse the code for the wait command too.

(cherry picked from commit 6022b23923fa6192c630920e9f895f185977beee)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/307
window x11 Focus the default window with delay while wait.patch | (download)

src/Makefile-tests.am | 1 1 + 0 - 0 !
src/tests/stacking/closed-transient-no-input-parent-delayed-focus-default-cancelled.metatest | 36 36 + 0 - 0 !
src/tests/stacking/closed-transient-no-input-parent.metatest | 16 13 + 3 - 0 !
src/x11/window-x11.c | 98 94 + 4 - 0 !
4 files changed, 144 insertions(+), 7 deletions(-)

 window-x11: focus the default window with delay while waiting for
 take-focus

When requesting to a take-focus window to acquire the input, the client may or
may not respond with a SetInputFocus (this doesn't happen for no-input gtk
windows in fact [to be fixed there too]), in such case we were unsetting the
focus while waiting the reply.

In case the client won't respond, we wait for a small delay (set to 250 ms) for
the take-focus window to grab the input focus before setting it to the default
window.

Added a test for this behavior and for the case in which a window takes the
focus meanwhile we're waiting to focus the default window.

(cherry picked from commit f71151a5dd990d935f3fbb39451f9b41f640b625)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/307
window Emit an error and return when trying to activate a.patch | (download)

src/core/window.c | 7 7 + 0 - 0 !
1 file changed, 7 insertions(+)

 window: emit an error and return when trying to activate an
 unmanaged

If something (i.e. gnome-shell or an extension) tries to activate an unmanaged
window, we should warn about this and avoid to perform further actions as this
could lead to a crash of mutter, since the window has not valid flags (like
workspace) set anymore at this stage.

(cherry picked from commit a6fc656e917fd48b8708b8d9f4bf9f8b15581313)

Bug: https://gitlab.gnome.org/GNOME/mutter/issues/580
window x11 Add lost definition for TAKE_FOCUS_FALLBACK_DE.patch | (download)

src/x11/window-x11.c | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 window-x11: add lost definition for take_focus_fallback_delay_ms

In commit 8abd1b009 (cherry-pick to gnome-3-30 of commit f71151a5d) the
definition of TAKE_FOCUS_FALLBACK_DELAY_MS was not properly merged.

Include this back to fix the build failure.

window actor Set actor as compositor private in window be.patch | (download)

src/compositor/meta-window-actor.c | 6 3 + 3 - 0 !
1 file changed, 3 insertions(+), 3 deletions(-)

 window-actor: set actor as compositor private in window before the
 surface

In MetaWindowActor creation we're setting the compositor private (i.e. the
window actor itself) of a window before creating the surface actor, and so
passing to the it a window without its compositor side set.

Since the surface actor might use the parent actor, set this before updating
the surface.

(cherry picked from commit 7776941b8950d6be71927b3fb575d66b43964310)

surface actor x11 Assign X11 Display only if we have reso.patch | (download)

src/compositor/meta-surface-actor-x11.c | 8 6 + 2 - 0 !
1 file changed, 6 insertions(+), 2 deletions(-)

 surface-actor-x11: assign x11 display only if we have resources

free_damage and detach_pixmap functions are called inside dispose and an object
can be disposed multiple times, even when the display is already closed.

So, don't try to deference a possibly null-pointer, assigning the xdisplay too
early, as if the X11 related resources have been unset, the server might not be
open anymore. In fact, we assume that if we have a damage or a pixmap set,
the display is still open.

(cherry picked from commit d7d97f247767ace2655f1fd2a7bbee0c0c8cfb50)

surface actor x11 Bind the surface actor resources to win.patch | (download)

src/compositor/meta-surface-actor-x11.c | 18 14 + 4 - 0 !
1 file changed, 14 insertions(+), 4 deletions(-)

 surface-actor-x11: bind the surface actor resources to window actor
 life

X11 actors need to release the server data (pixmap and damage) before the
display is closed.
During the close phase all the windows are unmanaged and this causes the window
actors to be removed from the compositor, unsetting their actor surface.

However, in case a window is animating the surface might not be destroyed until
the animation is completed and a reference to it kept around by gjs in the shell
case. By the way, per commit 7718e67f all window actors (even the animating
ones) are destroyed before the display is closed, but this is not true for the
child surface, because the parent window will just unref it, leaving it around
if reffed somewhere else. This is fine for wayland surfaces, but not for X11
ones which are bound to server-side pixmaps.

So, connect to the parent MetaWindowActor "destroy" signal, releasing the x11
resources that implies detaching the pixmap (unsetting the texture) and removing
the damages.

(cherry picked from commit de97b54595cf4662c437fecf26ca2e08339a13a3)

Bug: https://gitlab.gnome.org/GNOME/mutter/issues/629
Makefile tests Fix paths for stacking metatests.patch | (download)

src/Makefile-tests.am | 8 4 + 4 - 0 !
1 file changed, 4 insertions(+), 4 deletions(-)

 makefile-tests: fix paths for stacking metatests

In commit 29ffaa6f8 and commit 8abd1b009 were added stacking tests with wrong
paths.

Fix them.

Realated to: https://gitlab.gnome.org/GNOME/mutter/merge_requests/307

window x11 Don t double check for unmanaging windows.patch | (download)

src/x11/window-x11.c | 3 0 + 3 - 0 !
1 file changed, 3 deletions(-)

 window-x11: don't double-check for unmanaging windows

When looking for the best fallback focus window, we ignore it if it is in the
unmanaging state, but meta_stack_get_default_focus_window() does this is check
for us already.

So, ignore the redundant test.

(cherry picked from commit 9aee47daa984e5cc4a1ccefb3aacfbb2729cfbc1)

window x11 Accept any focusable window as fallback focus.patch | (download)

src/Makefile-tests.am | 1 1 + 0 - 0 !
src/tests/stacking/closed-transient-no-input-parents.metatest | 46 46 + 0 - 0 !
src/x11/window-x11.c | 2 1 + 1 - 0 !
3 files changed, 48 insertions(+), 1 deletion(-)

 window-x11: accept any focusable window as fallback focus

As per commit f71151a5 we were ignoring WM_TAKE_FOCUS-only windows as focus
targets, however this might end-up in an infinite loop if there are multiple
non-input windows stacked.

So, accept any focusable window as fallback focus target even if it's a
take-focus one (that might not reply to the request).

Added a stacking test to verify this.

(cherry picked from commit c327b2df95ff9979dd22bca2e0d285e1b3ba0add)

Bug: https://gitlab.gnome.org/GNOME/mutter/issues/660
stack Add a function to get a sorted list of focus candid.patch | (download)

src/core/stack.c | 55 42 + 13 - 0 !
src/core/stack.h | 15 15 + 0 - 0 !
2 files changed, 57 insertions(+), 13 deletions(-)

 stack: add a function to get a sorted list of focus candidates

Use a static function if a window can be the default focus window, and use such
function to return a filtered list of the stack.

(cherry picked from commit 2439255f32b4e775d4427c92a6797b8bd33e7d5a)

test client Add x11 events GSource handler.patch | (download)

src/tests/test-client.c | 141 141 + 0 - 0 !
1 file changed, 141 insertions(+)

 test-client: add x11 events gsource handler

When using gtk under X11 some WM related events are always filtered and not
delivered when using the gdk Window filters.

So, add a new one with higher priority than the GTK events one so that we can
pick those events before than Gtk itself.

(cherry picked from commit bd0f1bd338d86b382ca34e659b6651e288eba2fd)

tests Add accept_take_focus command.patch | (download)

src/tests/test-client.c | 108 107 + 1 - 0 !
src/tests/test-runner.c | 19 19 + 0 - 0 !
2 files changed, 126 insertions(+), 1 deletion(-)

 tests: add "accept_take_focus" command

When used it setups an X11 event monitor that replies to WM_TAKE_FOCUS
ClientMessage's with a XSetInputFocus request.

It can only be used by x11 clients on windows that have WM_TAKE_FOCUS atom set
and that does not accept input.

(cherry picked from commit b80250e483e20bc2b66aa0117af0c442875c1b74)

window x11 Use any focusable window as fallback delayed f.patch | (download)

src/Makefile-tests.am | 2 2 + 0 - 0 !
src/tests/stacking/closed-transient-no-input-parent.metatest | 2 1 + 1 - 0 !
src/tests/stacking/closed-transient-no-input-parents-queued-default-focus-destroyed.metatest | 43 43 + 0 - 0 !
src/tests/stacking/closed-transient-no-input-parents.metatest | 6 3 + 3 - 0 !
src/tests/stacking/closed-transient-only-take-focus-parents.metatest | 34 34 + 0 - 0 !
src/x11/window-x11.c | 119 96 + 23 - 0 !
6 files changed, 179 insertions(+), 27 deletions(-)

 window-x11: use any focusable window as fallback delayed focus
 window

As per commit f71151a5 we focus an input window if no take-focus-window accepts
it. This might lead to an infinite loop if there are various focusable but
non-input windows in the stack.

When the current focus window is unmanaging and we're trying to focus a
WM_TAKE_FOCUS window, we intent to give the focus to the first focusable input
window in the stack.

However, if an application (such as the Java ones) only uses non-input
WM_TAKE_FOCUS windows, are not requesting these ones to get the focus. This
might lead to a state where no window is focused, or a wrong one is.

So, instead of only focus the first eventually input window available, try to
request to all the take-focus windows that are in the stack between the
destroyed one and the first input one to acquire the input focus.
Use a queue to keep track of those windows, that is passed around stealing
ownership, while we protect for unmanaged queued windows.

Also, reduce the default timeout value, as the previous one might lead to an
excessive long wait.

Added metatests verifying these situations.

(cherry picked from commit 6d8293a422b08af97d3da985d49448db32d59248)

Bug: https://gitlab.gnome.org/GNOME/mutter/issues/660
window x11 Focus a window in the active workspace as take.patch | (download)

src/x11/window-x11.c | 15 11 + 4 - 0 !
1 file changed, 11 insertions(+), 4 deletions(-)

 window-x11: focus a window in the active workspace as take-focus
 fallback

Starting with commit 2db94e2e we try to focus a fallback default focus window
if no take-focus window candidate gets the input focus when we request it and
we limit the focus candidates to the current window's workspace.

However, if the window is unmanaging, the workspace might be unset, and we could
end up in deferencing a NULL pointer causing a crash.

So, in case the window's workspace is unset, just use the currently active
workspace for the display.

(cherry picked from commit 5ca0ef078d39548edda1a97e9066d44aa8f38108)

Bug: https://gitlab.gnome.org/GNOME/mutter/issues/687
window x11 Remove double definition of MetaStack.patch | (download)

src/x11/window-x11.c | 1 0 + 1 - 0 !
1 file changed, 1 deletion(-)

 window-x11: remove double definition of metastack

In commit c05fe4ae9 we introduced a double definition of MetaStack due to a
wrong cherry-pick conflict resolution.

Fix this by removing the invalid duplicated line.

Related to https://gitlab.gnome.org/GNOME/mutter/merge_requests/688

wayland output Set user data of xdg_output resource.patch | (download)

src/wayland/meta-wayland-outputs.c | 8 4 + 4 - 0 !
1 file changed, 4 insertions(+), 4 deletions(-)

 wayland/output: set user data of xdg_output resource

mutter would randomly crash in `send_xdg_output_events()` when changing
the fractional scaling:

  wl_resource_post_event ()
  zxdg_output_v1_send_logical_size ()
  send_xdg_output_events ()
  wayland_output_update_for_output ()
  meta_wayland_compositor_update_outputs ()
  on_monitors_changed ()
  g_closure_invoke ()
  signal_emit_unlocked_R ()
  g_signal_emit_valist ()
  _signal_emit ()
  meta_monitor_manager_notify_monitors_changed ()
  meta_monitor_manager_rebuild ()

This is because the xdg-output resource got freed but wasn't removed
from the list of resources.

Fix this by setting the user data of the xdg-output resource to the
corresponding `MetaWaylandOutput` so that the xdg-output resource
destructor can remove it from the list of resources.

renderer native Use g_set_error instead of _cogl_set_erro.patch | (download)

src/backends/native/meta-renderer-native.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 renderer/native: use g_set_error() instead of _cogl_set_error()

It's even a GError, so lets use the proper API.

(cherry picked from commit 1efb32d3000ca06ee3cfcc146dc812866d243619)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/622
renderer native Make sure we re not destroying an active .patch | (download)

src/backends/native/meta-renderer-native.c | 13 13 + 0 - 0 !
1 file changed, 13 insertions(+)

 renderer/native: make sure we're not destroying an active eglsurface

When making a new surface/context pair current, mesa may want to flush
the old context. Make sure we don't try to flush any freed memory by
unmaking a surface/context pair current before freeing it.

Not doing this results in the following valgrind warnings:

==15986== Invalid read of size 8
==15986==    at 0x69A6D80: dri_flush_front_buffer (gbm_dri.c:92)
==15986==    by 0x1750D458: intel_flush_front (brw_context.c:251)
==15986==    by 0x1750D4BB: intel_glFlush (brw_context.c:296)
==15986==    by 0x1739D8DD: dri2_make_current (egl_dri2.c:1461)
==15986==    by 0x17393A3A: eglMakeCurrent (eglapi.c:869)
==15986==    by 0x54381FB: InternalMakeCurrentVendor (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0)
==15986==    by 0x5438515: eglMakeCurrent (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0)
==15986==    by 0x522A782: _cogl_winsys_egl_make_current (cogl-winsys-egl.c:303)
==15986==    by 0x49B64C8: meta_renderer_native_create_view (meta-renderer-native.c:3076)
==15986==    by 0x48D26E7: meta_renderer_create_view (meta-renderer.c:78)
==15986==    by 0x48D277A: meta_renderer_rebuild_views (meta-renderer.c:111)
==15986==    by 0x49BF46E: meta_stage_native_rebuild_views (meta-stage-native.c:142)
==15986==  Address 0x1b076600 is 0 bytes inside a block of size 48 free'd
==15986==    at 0x4839A0C: free (vg_replace_malloc.c:540)
==15986==    by 0x49B59F3: meta_renderer_native_release_onscreen (meta-renderer-native.c:2651)
==15986==    by 0x5211441: _cogl_onscreen_free (cogl-onscreen.c:167)
==15986==    by 0x5210D81: _cogl_object_onscreen_indirect_free (cogl-onscreen.c:51)
==15986==    by 0x51D0066: _cogl_object_default_unref (cogl-object.c:103)
==15986==    by 0x520F989: _cogl_framebuffer_unref (cogl-framebuffer.c:1814)
==15986==    by 0x51D00B1: cogl_object_unref (cogl-object.c:115)
==15986==    by 0x536F3C7: clutter_stage_view_dispose (clutter-stage-view.c:304)
==15986==    by 0x4B7DAF2: g_object_unref (gobject.c:3309)
==15986==    by 0x4A9596C: g_list_foreach (glist.c:1013)
==15986==    by 0x4A9599A: g_list_free_full (glist.c:223)
==15986==    by 0x48D2737: meta_renderer_rebuild_views (meta-renderer.c:100)
==15986==  Block was alloc'd at
==15986==    at 0x483AB1A: calloc (vg_replace_malloc.c:762)
==15986==    by 0x69A76B2: gbm_dri_surface_create (gbm_dri.c:1252)
==15986==    by 0x69A6BFE: gbm_surface_create (gbm.c:600)
==15986==    by 0x49B4E29: meta_renderer_native_create_surface_gbm (meta-renderer-native.c:2221)
==15986==    by 0x49B57DB: meta_onscreen_native_allocate (meta-renderer-native.c:2569)
==15986==    by 0x49B6423: meta_renderer_native_create_view (meta-renderer-native.c:3062)
==15986==    by 0x48D26E7: meta_renderer_create_view (meta-renderer.c:78)
==15986==    by 0x48D277A: meta_renderer_rebuild_views (meta-renderer.c:111)
==15986==    by 0x49BF46E: meta_stage_native_rebuild_views (meta-stage-native.c:142)
==15986==    by 0x49A75B5: meta_backend_native_update_screen_size (meta-backend-native.c:520)
==15986==    by 0x48B01BB: meta_backend_sync_screen_size (meta-backend.c:224)
==15986==    by 0x48B09B7: meta_backend_real_post_init (meta-backend.c:501)

(cherry picked from commit 56ddaaa3809240a357b5e19b5789d1aa49aaecc3)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/622
renderer native Fix EGLSurface destruction order.patch | (download)

src/backends/native/meta-renderer-native.c | 38 27 + 11 - 0 !
1 file changed, 27 insertions(+), 11 deletions(-)

 renderer/native: fix eglsurface destruction order

Make sure to destroy the EGL surface after releasing held buffers,
otherwise we'll get the following valgrind warnings:

==24016== Invalid read of size 8
==24016==    at 0x1739943F: release_buffer (platform_drm.c:73)
==24016==    by 0x49AC355: meta_drm_buffer_gbm_finalize (meta-drm-buffer-gbm.c:213)
==24016==    by 0x4B75B61: g_object_unref (gobject.c:3346)
==24016==    by 0x49B4B41: free_current_bo (meta-renderer-native.c:991)
==24016==    by 0x49B816F: meta_renderer_native_release_onscreen (meta-renderer-native.c:2971)
==24016==    by 0x5209441: _cogl_onscreen_free (cogl-onscreen.c:167)
==24016==    by 0x5208D81: _cogl_object_onscreen_indirect_free (cogl-onscreen.c:51)
==24016==    by 0x51C8066: _cogl_object_default_unref (cogl-object.c:103)
==24016==    by 0x5207989: _cogl_framebuffer_unref (cogl-framebuffer.c:1814)
==24016==    by 0x51C80B1: cogl_object_unref (cogl-object.c:115)
==24016==    by 0x53673C7: clutter_stage_view_dispose (clutter-stage-view.c:304)
==24016==    by 0x4B75AF2: g_object_unref (gobject.c:3309)
==24016==  Address 0x18e742a8 is 536 bytes inside a block of size 784 free'd
==24016==    at 0x4839A0C: free (vg_replace_malloc.c:540)
==24016==    by 0x17399764: dri2_drm_destroy_surface (platform_drm.c:231)
==24016==    by 0x1738550A: eglDestroySurface (eglapi.c:1145)
==24016==    by 0x5440286: eglDestroySurface (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0)
==24016==    by 0x49613A5: meta_egl_destroy_surface (meta-egl.c:432)
==24016==    by 0x49B80F9: meta_renderer_native_release_onscreen (meta-renderer-native.c:2954)
==24016==    by 0x5209441: _cogl_onscreen_free (cogl-onscreen.c:167)
==24016==    by 0x5208D81: _cogl_object_onscreen_indirect_free (cogl-onscreen.c:51)
==24016==    by 0x51C8066: _cogl_object_default_unref (cogl-object.c:103)
==24016==    by 0x5207989: _cogl_framebuffer_unref (cogl-framebuffer.c:1814)
==24016==    by 0x51C80B1: cogl_object_unref (cogl-object.c:115)
==24016==    by 0x53673C7: clutter_stage_view_dispose (clutter-stage-view.c:304)
==24016==  Block was alloc'd at
==24016==    at 0x483AB1A: calloc (vg_replace_malloc.c:762)
==24016==    by 0x173997AE: dri2_drm_create_window_surface (platform_drm.c:145)
==24016==    by 0x17388906: _eglCreateWindowSurfaceCommon (eglapi.c:929)
==24016==    by 0x5440197: eglCreateWindowSurface (in /home/jonas/Dev/gnome/install/lib/libEGL.so.1.1.0)
==24016==    by 0x49612FF: meta_egl_create_window_surface (meta-egl.c:396)
==24016==    by 0x49B752E: meta_renderer_native_create_surface_gbm (meta-renderer-native.c:2538)
==24016==    by 0x49B7E6C: meta_onscreen_native_allocate (meta-renderer-native.c:2870)
==24016==    by 0x49B8BCF: meta_renderer_native_create_view (meta-renderer-native.c:3387)
==24016==    by 0x48D274B: meta_renderer_create_view (meta-renderer.c:78)
==24016==    by 0x48D27DE: meta_renderer_rebuild_views (meta-renderer.c:111)
==24016==    by 0x49BB4FB: meta_stage_native_rebuild_views (meta-stage-native.c:142)
==24016==    by 0x49A733C: meta_backend_native_update_screen_size (meta-backend-native.c:517)

Bug: https://gitlab.gnome.org/GNOME/mutter/merge_requests/622
theme use gtk_render_icon_suface to paint button icon.patch | (download)

src/ui/theme.c | 18 4 + 14 - 0 !
1 file changed, 4 insertions(+), 14 deletions(-)

 theme: use gtk_render_icon_suface to paint button icon

This will properly take care of the icon transformations
and of the shadow.

Fixes #100

Bug: https://gitlab.gnome.org/GNOME/mutter/issues/100
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1764558
theme load icons as Gtk does with fallback and RTL suppor.patch | (download)

src/ui/theme.c | 36 28 + 8 - 0 !
1 file changed, 28 insertions(+), 8 deletions(-)

 theme: load icons as gtk does with fallback and rtl support

bgo768531_workaround startup notifications.patch | (download)

src/wayland/meta-wayland-gtk-shell.c | 10 10 + 0 - 0 !
1 file changed, 10 insertions(+)

 gtk-shell: work around non-working startup notifications

GNOME Shell relies on the MetaScreen::startup-sequence-changed signal,
which is tied to (lib)startup-notification and therefore X11. As a result,
when we remove the startup sequence of a wayland client, GNOME Shell will
not be notified about this until startup-notification's timeout is hit.
As a temporary stop-gap, go through XWayland even for wayland clients,
so that the signal is emitted when expected.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=768531
clutter Fix offscreen effect painting of clones.patch | (download)

clutter/clutter/clutter-actor-box-private.h | 12 12 + 0 - 0 !
clutter/clutter/clutter-actor-box.c | 52 52 + 0 - 0 !
clutter/clutter/clutter-offscreen-effect.c | 172 76 + 96 - 0 !
clutter/clutter/clutter-paint-volume.c | 48 2 + 46 - 0 !
clutter/tests/conform/Makefile.am | 1 0 + 1 - 0 !
clutter/tests/conform/actor-offscreen-limit-max-size.c | 119 0 + 119 - 0 !
clutter/tests/conform/actor-offscreen-redirect.c | 7 4 + 3 - 0 !
7 files changed, 146 insertions(+), 265 deletions(-)

 clutter: fix offscreen-effect painting of clones

`ClutterOffscreenEffect` had been getting the wrong bounding box in the
case of clones and descendents of clones, causing visibly incorrect
clipping. This was due to `clutter_actor_get_paint_box` only ever being
given the source actor during a paint (which is correct) and not the clone.
Even if we weren't painting a clone but an offscreened descendent of a
clone (like in gnome-shell's desktop zoom), we would get the wrong result.

Fortunately we don't need to know the actual clone/actor being painted so
don't need to call the problematic `clutter_actor_get_paint_box` at all.
The solution is to only keep untransformed rendering in the FBO and leave
the correct transformation for later. The correct clone/actor's
transformation is already set for us as the current cogl modelview matrix
by `clutter_actor_paint`.

Bonus optimization: This all means we don't need to keep `last_matrix_drawn`
or force a full repaint every time some part of the transformation changes.
Because the FBO contents are no longer affected by transformations. As it
should be. In other words, offscreen-effected actors can now move around
on screen without themselves being repainted.

Special thanks to Mai Lavelle for identifying the cause of the problem.

Fixes:
https://bugzilla.gnome.org/show_bug.cgi?id=789050,
https://bugzilla.gnome.org/show_bug.cgi?id=659523#c9,
https://gitlab.gnome.org/GNOME/mutter/issues/196,
https://gitlab.gnome.org/GNOME/mutter/issues/282,
https://gitlab.gnome.org/GNOME/gnome-shell/issues/387,
https://launchpad.net/bugs/1767648,
https://launchpad.net/bugs/1779615

Sync to the hardware refresh rate not just 60.00Hz.patch | (download)

src/Makefile.am | 25 24 + 1 - 0 !
src/backends/native/meta-gpu-kms.c | 69 64 + 5 - 0 !
src/backends/native/meta-gpu-kms.h | 3 3 + 0 - 0 !
src/backends/native/meta-renderer-native.c | 55 50 + 5 - 0 !
src/meta-marshal.list | 1 1 + 0 - 0 !
5 files changed, 142 insertions(+), 11 deletions(-)

 sync to the hardware refresh rate, not just 60.00hz

The Clutter master clock supports three synchronization methods in order of
preference:
  (a) Hardware presentation times
  (b) Swap throttling
  (c) Fake vsync at 60.00Hz
X11 already supports all three but Wayland only has (c). This patch implements
both (a) and (b) for Wayland bringing it in line with X11.

debian/synaptics support.patch | (download)

clutter/clutter/x11/clutter-device-manager-xi2.c | 15 12 + 3 - 0 !
src/backends/x11/meta-input-settings-x11.c | 150 136 + 14 - 0 !
2 files changed, 148 insertions(+), 17 deletions(-)

 backends/x11: support input-synaptics, if present.

Add support for configuring the Xorg synaptics touchpad driver.

Turns out it's very simple to support both libinput and synaptics
simultaneously, both under the heading of XI2.

Bug-Ubuntu: https://launchpad.net/bugs/1686081
debian/skip texture test.patch | (download)

clutter/tests/conform/Makefile.am | 1 0 + 1 - 0 !
1 file changed, 1 deletion(-)

 skip texture test

This test fails on hppa, mipsel, powerpc, ppc64 and s390x.

See the build logs at
https://buildd.debian.org/status/logs.php?pkg=mutter&ver=3.30.0-2

I don't know why this test works in the clutter-1.0 package.

Bug: https://gitlab.gnome.org/GNOME/mutter/issues/324