mutter/src
Carlos Garnacho 4bee25d8e6 wayland: Cancel selection data sources that are set while unfocused
If a client is naive enough to assume that it can set the selection while
it has got no surfaces, mutter will simply ignore the request and leave
the selection unchanged.

This is good and the expected behavior, however the poor client that did
this will enter in an inconsistent state where it "claimed" the selection,
but nobody told it that the wl_data_source is not current.

So, when the client is focused the next time, it will receive wl_data_offers
as usual, but it will still think all the time that it is owning the
selection. In the case of GTK, that takes client-side shortcuts, so any
attempted paste will still bring back the client-side aborted selection.

To fix this, cancel the selection right away if it happened while unfocused,
the client will be able to undo its own failed selection, and not assume
that future offers are its own.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1469
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1772>
2021-03-23 17:07:31 +00:00
..
backends backend: Destroy stage when destroying backend 2021-03-13 18:56:21 +00:00
compositor later: Handle gracefully calls with unset display 2021-03-13 15:12:36 +00:00
core main: Expose hooks to manage context with more granularity 2021-03-13 18:56:21 +00:00
meta core: Drop "volatile" from static GTypes in manual registration 2021-03-22 10:47:51 +00:00
tests tests: Add persistent virtual monitor test 2021-03-12 15:09:45 +00:00
ui frame: Fix crash when clicking below titlebar with broken gtk themes 2021-03-08 21:16:09 +00:00
wayland wayland: Cancel selection data sources that are set while unfocused 2021-03-23 17:07:31 +00:00
x11 x11-display: Use unsetenv if old value was NULL 2021-02-27 09:16:49 +00:00
libmutter.pc.in
meson.build screen-cast/session: Introduce RecordVirtual D-Bus API 2021-03-12 15:09:45 +00:00
meta-private-enum-types.c.in core: Drop "volatile" from static GTypes in manual registration 2021-03-22 10:47:51 +00:00
meta-private-enum-types.h.in screen-cast: Add screen cast flag to streams 2020-07-30 09:51:16 +02:00
org.freedesktop.login1.xml
org.gnome.Mutter.DisplayConfig.xml x11: Support the CTM (color transform matrix) RandR property 2021-01-11 13:44:54 +00:00
org.gnome.Mutter.IdleMonitor.xml
org.gnome.Mutter.RemoteDesktop.xml remote-desktop/session: Add CapsLockState and NumLockState properties 2021-03-04 17:39:08 +00:00
org.gnome.Mutter.ScreenCast.xml screen-cast/session: Introduce RecordVirtual D-Bus API 2021-03-12 15:09:45 +00:00