1
0
Fork 0
Commit graph

27296 commits

Author SHA1 Message Date
James Henstridge
063db30c50 xwayland: Start Xwayland on connection to either public X11 socket
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1454
(cherry picked from commit 7b2815077fa1053069e00c0a21b2c3038f4b0d1c)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1669>
2021-01-21 08:48:39 +01:00
James Henstridge
df4b6d4ca5 Revert "wayland: Drop Xwayland abstract socket"
This reverts commit e2123768f6.  Various
container/chroot (e.g. Snaps, pressure-vessel) systems still depend on
the presence of the abstract X11 socket.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1613
(cherry picked from commit ea2192c4899ac7897efca31e8e85c157895950ac)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1669>
2021-01-21 08:48:39 +01:00
Carlos Garnacho
5671888775 wayland: Handle forced Xwayland shutdown elegantly
In the shutdown paths we check with the X11 display whether there's
remaining clients. However this happens in paths that happen after
the MetaX11Display vanished in the case of Xwayland crash.

Since in that situation the clients are forcibly vanishing too,
skip the client check.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1677>
2021-01-20 16:55:08 +01:00
Hugo Carvalho
9c71e208bd Update Portuguese translation 2021-01-20 11:50:55 +00:00
Jonas Ådahl
1c6dd7f30a backend/native: Destroy logind helper after seat
Otherwise we don't actually close input devices using it, since that
would happen after meta_launcher_free() was called.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1670>
2021-01-19 22:54:32 +01:00
Jonas Ådahl
db6bf9d14e backend: Tear down in dispose() instead of finalize()
This means backend implementations can have more control of the order of
how things are destroyed. To be precise, this will, in the next commit,
allow us to destroy the logind integration after the clutter backend
thus the libinput owning seat, that uses the logind integration to
release input devices.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1670>
2021-01-19 22:54:32 +01:00
Jonas Ådahl
05765daabf seat/native: Explicitly destroy MetaSeatImpl
We can't post tasks to the input thread when cleaning up the
MetaSeatImpl, as that will make the GTask complain about adding
references to a to be purged object. Avoid this by adding an explicit
meta_seat_impl_destroy() function that handles the destruction of the
MetaSeatImpl properly.

This also does more of the cleanup in the input thread, as that is where
it was managed. Will likely not make a difference as before this
happened after tearing down the thread, but lets tear down things in the
thread they were managed for good measure.

This fixes the last log spew I see right now when terminating mutter.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1670>
2021-01-19 22:54:32 +01:00
Jonas Ådahl
904116fe4d clutter/seat: Don't unref backend on finalize
We never took a ref on the backend, it's the backend that owns the seat,
not the other way around.

This silences warnings spewed on tear down.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1670>
2021-01-19 20:29:36 +01:00
Jonas Ådahl
50607523bc clutter/backend: Clear stage window pointer after removing weak ref
Otherwise when dispose() is called multiple times we spew warnings on
tear down.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1670>
2021-01-19 20:29:36 +01:00
Daniel Șerbănescu
912ad90573 Update Romanian translation 2021-01-19 15:56:56 +00:00
Yuri Chornoivan
e2381129ef Update Ukrainian translation 2021-01-19 15:12:02 +00:00
Olivier Fourdan
cde0cd5d23 xwayland: Enable Xwayland on demand by default
Make "Xwayland on demand" the default policy when Xwayland supports
"initfd" and remove the corresponding experimental feature.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1673>
2021-01-19 09:33:33 +01:00
Olivier Fourdan
3fc603edd3 xwayland: Make autoclose-xwayland an exp. feature
Closing automatically Xwayland once all relevant X11 clients are gone is
inherently racy, if a new client comes along right at the time we're
killing Xwayland.

Fixing the possible race conditions between mutter, Xwayland and the X11
clients may take some time.

Meanwhile, make that an experimental feature "autoclose-xwayland".

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1673>
2021-01-19 09:33:33 +01:00
Florian Müllner
c255031b6d events: Bypass wayland when scrolling with mouse-button modifier pressed
<super> is considered a system modifier, and applications cannot use it
for keyboard shortcuts or as button modifier. It doesn't seem too much
of a loss taking <super>+scroll-event away as well, so that it becomes
available to gnome-shell/extensions.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1674>
2021-01-18 20:59:17 +01:00
Olivier Fourdan
e5347af000 xwayland: Check X11 clients prior to terminate Xwayland
Currently, mutter checks for the presence of X11 windows to decide
whether or not Xwayland can be terminated, when Xwayland is started on
demand.

Unfortunately, not all X11 clients will map a window all the time, an
X11 client may keep the X11 connection opened after closing all its
windows. In that case, we may terminate Xwayland while there are some
X11 client connected still, and terminating Xwayland will also kill
those X11 clients.

To avoid that issue, check the X11 clients actually connected using the
XRes extension. The XRes extension provides the PID of the (local) X11
clients connected to the Xserver, so we need to match that against the
actual executable names, and compare with a list of known executables
that we can safely ignore, such as ibus-x11 or gsd-xsettings.

We also check against our own executable name, considering that the X11
window manager is also an X11 client connected to the Xserver.

Also, XRes returning the PID of local clients only is not a problem
considering that Xwayland does not listen to remote connections.
However, if the user spawns a client remotely on another system using
ssh tunneling (ssh -X), only clients which actually map a window will
be accounted for.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1537
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1671>
2021-01-18 17:52:22 +01:00
Jordi Mas
22312db41d Update Catalan translation 2021-01-16 14:26:43 +01:00
Марко Костић
de0e17a6f7 Update Serbian translation 2021-01-15 01:48:09 +00:00
Florian Müllner
898aa25c68 Post-release version bump (again) 2021-01-14 17:57:01 +01:00
Florian Müllner
c423ea4624 Tag release 40.alpha.1.1
Some GSettings schemas moved from g-s-d to gsettings-desktop-schemas
in g-s-d 40.alpha. 40.alpha.1 didn't include the corresponding
adjustment, so do a quick follow-up release to not abort on startup
with the latest g-s-d release.
2021-01-14 17:22:43 +01:00
Carlos Garnacho
6011562aa9 backends: Update pointer drag-threshold/double-click settings location
Following recent gsettings-desktop-schemas changes.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1416>
2021-01-14 13:58:16 +00:00
Carlos Garnacho
ff43eb8745 clutter: Update settings location for font aa/hinting/rgb order
Update to the new settings location as per recent gsettings-desktop-schema.

Related: https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/issues/31
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1416>
2021-01-14 13:58:16 +00:00
Carlos Garnacho
5411b892a0 build: Bump gsettings-desktop-schemas dependency
We will depend on new settings there, ensure we build depend on
it, and CI pulls the dependency.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1416>
2021-01-14 13:58:16 +00:00
Georges Basile Stavracas Neto
2c57f0986a clutter/click-action: Release if motion crosses drag threshold
When the drag threshold is crossed while the click action is pressed,
release it. This way, we can avoid spurious "clicked" signals from
being emitted.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1667>
2021-01-14 13:30:19 +00:00
Georges Basile Stavracas Neto
6239e6db18 clutter/click-action: Only emit "clicked" when within drag threshold
ClutterClickEvent currently doesn't check if button press and release
happen within the drag threshold, which can be surprising sometimes.

Only emit the "clicked" signal if the button press and release happen
within the area of drag threshold.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1667>
2021-01-14 13:30:19 +00:00
Georges Basile Stavracas Neto
8a82abc4d7 clutter/click-action: Factor out drag threshold check
Next commit will perform the same check to determine if the
button release should emit the "clicked" signal or not, so
put it in a shared function.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1667>
2021-01-14 13:30:19 +00:00
Florian Müllner
857e56b96e Post-release version bump 2021-01-14 12:13:23 +01:00
Florian Müllner
c23a834c87 Tag version 40.alpha.1
Update NEWS.
2021-01-13 22:52:14 +01:00
Matej Urbančič
eb3ba85027 Update Slovenian translation 2021-01-12 18:31:06 +00:00
Carlos Garnacho
98ef6d0d05 wayland: Ensure pointer constraint region consistency
Changes in games between fullscreen and windowed modes may trigger
chaotic situations where the buffer and the frame size temporarily
disagree, producing rectangles with negative width/height. This is
usually followed by other updates that bring the pointer constraint
up to date.

This makes cairo panic and return an "error" empty region, which breaks
deeper down when using the region rectangles to apply the pointer
constraint.

If we hit this situation, ignore the frame rectangle, and just go with
the buffer rectangle.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1655>
2021-01-12 12:32:24 +01:00
Marc-Antoine Perennou
d439501faf clutter: Fix build with clang
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1668>
2021-01-11 22:52:10 +01:00
Jonas Ådahl
237cdeef4c seat-impl: Destroy libinput objects on input thread on tear down
We didn't tear down the libinput objects in the right thread when
exiting, but did so after the input thread exited.

We also tried to destroy the libinput devices after the libinput context
was destroyed, which isn't allowed.

Fix these two issues by tearing down the libinput objects in a input
thread task that when done exits the input thread. This effectively
"flushes" the input thread tasks while destroying the libinput objects
just before the thread exits.

While it might fine to tear down libinput objects in an arbitrary (main
in this case) thread while making sure nothing pokes at it in parallel
(e.g. the input thread is gone), libinput is by definition single
threaded, and could theoretically make assumptions about this, and we
shouldn't cause any possible surprises here, so make sure to destroy it
all in the right thread.

This fixes an abort() on exit caused by an assert about invalid object
destruction in libinput.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1663>
2021-01-11 17:17:39 +00:00
Jonas Ådahl
3bf1af07ed seat-impl: Fix some variable names
The "seat" usually refers to the ClutterSeat (MetaSeatNative) object,
and "seat_impl" to the MetaSeatImpl object, but there were still a few
places where this wasn't adhered to so fix those.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1663>
2021-01-11 17:17:39 +00:00
Aaron Plattner
e88467f9d7 x11: Support the CTM (color transform matrix) RandR property
When supported, this property allows the window system to apply a 3x3 color
correction matrix in order to transform colors from the window system's native
color space to the measured color space of a display device.

Query for this property and set the 'supports-color-transform' property in the
GetResource reply. Add support for the SetOutputCTM DBus method and plumb that
through to the server's CTM property.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1048>
2021-01-11 13:44:54 +00:00
Florian Müllner
bd15cfc94b ci: Replace custom commit-log script with ci-fairy
ci-fairy now supports checking commit messages for required/disallowed
patterns. Use that to replace our custom commit-log script.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1649>
2021-01-11 14:02:58 +01:00
Jonas Dreßler
6c19d49a68 tests/stage-views: Test whether stage views and frame clocks are freed
Add a test case to check whether the stage views and frame clocks are
all correctly freed after working with timelines a bit and then
hotplugging and removing all monitors.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1632>
2021-01-11 09:42:10 +00:00
Jonas Dreßler
7871ab5437 clutter/timeline: Don't manually set frame clock in set_actor()
In clutter_timeline_set_actor() we currently always unset the
priv->frame_clock pointer of the old actor when a new actor gets set.
The priv->frame_clock pointer takes a reference on the ClutterFrameClock
though, so we leak ClutterFrameClocks here.

To fix it, simply rely on update_frame_clock(), which will call
set_frame_clock_internal() unconditionally to update the
priv->frame_clock pointer for us.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1632>
2021-01-11 09:42:10 +00:00
Pascal Nowack
f363476229 remote-desktop: Allow using custom scroll source for NotifyPointerAxis
Currently, the NotifyPointerAxis method always assumes that the scroll
source is CLUTTER_SCROLL_SOURCE_FINGER.
This is however not always true and in some cases a remote desktop
client needs to submit a PointerAxis event with a custom axis step.
This is for example the case with high resolution mouse wheels, where
the NotifyPointerAxisDiscrete method is unsuitable.
In such cases NotifyPointerAxis needs to be called, but with the
intention that the scroll source is still a mouse wheel.

To solve this situation, don't assume the scroll source always to be
CLUTTER_SCROLL_SOURCE_FINGER.
Instead, add further flag options to NotifyPointerAxis, which allow a
remote desktop client to choose the scroll source.
This way a remote desktop client can choose what scroll source is the
most suitable one for the current scroll event.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1636>
2021-01-11 10:12:53 +01:00
Daniel van Vugt
93e938e22f background: Make the final monitor texture RGB instead of RGBA
The monitor texture is the final background image. It doesn't need to
have any alpha channel. Cross-fades (which is the process of rendering
*into* the monitor texture) still work just fine.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1665>
2021-01-11 15:08:27 +08:00
Daniel van Vugt
f0a9ec0519 cogl/journal: Invalidate framebuffer mipmaps on each journal insertion
Because the framebuffer itself might be backed by a texture, which might
have mipmapping enabled. If so then rendering to the framebuffer will make
those mipmaps out of date.

Technically we are flagging the framebuffer's mipmaps as dirty *before*
they are, because the journal hasn't been flushed yet. But we need to do
it early because ideally the next flush will both write the offscreen
framebuffer contents and then read them for use in rendering to an onscreen
framebuffer. And the `mipmaps_dirty` flag needs to be set before the read,
so therefore we need to do it before the next journal flush.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3146
where the offscreen framebuffer in question is meta-background's
`monitor->fbo`.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1664>
2021-01-08 15:51:09 +08:00
Hugo Carvalho
d415b2b841 Update Portuguese translation 2021-01-06 14:50:03 +00:00
Fran Dieguez
c29d2adf31 Update Galician translation 2021-01-04 23:12:41 +00:00
Aurimas Černius
06c3484b76 Updated Lithuanian translation 2021-01-04 17:01:56 +02:00
Sebastian Keller
791761499a clutter/effect: Don't call effect paint_node() if pre_paint() failed
Some effects such as the BrightnessContrastEffect try to skip rendering
by returning early with a FALSE return value in pre_paint() in cases
where the effect would not change the rendering. This stopped working
when effects were ported to paint nodes.

In the case of OffscreenEffects, like BrightnessContrastEffect,
pre_paint() is responsible for setting up the offscreen buffer which is
then used in paint_node(). However if pre_paint() fails, this buffer is
not created and attempting to use it will result in several error
messages and broken rendering.

Instead of trying to call paint_node() of the effect if pre_paint()
failed, just draw the actor.

Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/1576

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1658>
2021-01-02 19:00:39 +00:00
Jonas Dreßler
189eb4c7a7 clutter/actor: Remove superfluous line
This sets exactly the same thing as the line above and doesn't
manipulate any parts of the calculation, too, it's most likely a very
old copy-paste mistake, remove it.

Thanks to Rafał Mikrut for discovering it.

Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/1222

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1660>
2020-12-31 10:17:01 +01:00
Carlos Garnacho
65e7b9ae3a wayland: Repick (again) on pointer motion
Unfortunately there's situations where we can't fully rely on only
crossing events here. One such situation is pointer visibility changes
due to touch interaction, or e.g. after closing the lid.

In these situations the pointer position stays the same, picks the
same actor, yet we want to see the right surface as the pointer focus
again in the wayland side.

This used to happen on the first motion event after the pointer
visibility change before commit ad3f2b0b86, use motion events again
for picking so we don't break these usecases.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1657>
2020-12-28 19:11:26 +01:00
Carlos Garnacho
d39d4d124e wayland: Do not account touch crossing events for pointer
These events may be emitted for touchpoints (in which case they contain
an event sequence). Ignore those as they are not relevant for pointer
picking, and shouldn't influence its focus.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1657>
2020-12-28 19:11:26 +01:00
Carlos Garnacho
4fb968af76 clutter: Remove reentrancy checks at emit_event_chain()
When using alt-tab to switch between windows, on a key handler we
undo the compositor grab, which triggers a repick, which generates
crossing events, which are handled in place, and trigger these
reentrancy checks.

On one hand, we do intend these crossings to take effect in place,
rather than being queued (possibly after a number of already queued
events). On the other hand, we now outright discourage generating
events from random places (and hope to make it just not possible,
eventually) thus we can afford not to protect against reentrancy
caused by API misuse.

So just drop these checks, and let these crossing events be
properly handled.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1657>
2020-12-28 19:11:26 +01:00
Carlos Garnacho
96820a9979 backends: Disconnect MetaInputMapper signal connection on device dispose
This signal may be left dangling when disconnecting a device, and be executed
later on if the device is connected again, and mapped to other output. Make it
sure the signal handler is disconnected when unplugging the device.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1657>
2020-12-28 19:11:26 +01:00
Asier Sarasua Garmendia
9b6fb31edc Update Basque translation 2020-12-27 18:54:50 +00:00
Philipp Kiemle
7a7bfd6c5a Update German translation 2020-12-27 13:58:27 +00:00