Commit Graph

27457 Commits

Author SHA1 Message Date
Dz Chen
c11958e6eb Update Chinese (China) translation 2021-03-27 23:57:30 +00:00
Takao Fujiwara
e3bd764491 clutter/input-method: Calculate evdev_code from keycode
evdev_cocde is forwarded in meta-wayland-keyboard.c:default_grab_key()
in mutter 40 and clutter_input_method_forward_key() should assign
evdev_code.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1709#
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1802>
2021-03-25 17:24:19 +09:00
Jonas Ådahl
71b78c7bf4 clutter/seat: Fix initial value in clutter_seat_has_touchscreen()
If we didn't have a touchscreen, we returned an uninitialized value.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1801>
2021-03-24 11:48:40 +01:00
Carlos Garnacho
83ed2afe34 clutter: Ensure to reset touchpoints when disabling action
The action might not have been triggered yet, as per its trigger
threshold. This doesn't mean we shouldn't reset the point(s) accumulated
so far.

This fixes those touchpoints persisting after disable/enable, thus
making gesture recognition fail from there on.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1791>
2021-03-23 18:05:08 +00:00
Carlos Garnacho
b0a0be3ccc clutter: Update ClutterGestureAction point position before ::prepare
We might want to perform distance/threshold checks in the ::prepare
vfunc, but we didn't record the last motion event yet. This used to
give a delta of 0/0 between the press and last motion coordinates,
despite the ClutterGestureAction having a trigger threshold. This
happens no longer.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1791>
2021-03-23 18:05:08 +00:00
Jonas Dreßler
0e97c0550e clutter/actor: Always use allocation size for picking
The usage of clutter_actor_get_preferred_width/height() for building the
pick box can trigger Clutters size negotiation machinery in case the
allocation of the actor is invalidated, with commit 82f3bdd1 we worked
around that by excluding actors with invalidated allocations from
picking.

There's no need to do that though, when picking we always want to
operate on the last known allocation of the actor, since that is what's
actually painted on the screen.

So instead of not picking at all when an actors allocation is
invalidated, just use the size of the last allocation. We still have to
factor in one extra case, that's when an actor hasn't gotten any
allocation yet: In that case we want to exclude the actor from picking
since the actor is not on the screen yet.

This fixes a regression introduced by the commit mentioned above where
picking wouldn't work on windows that have just been resized.

https://gitlab.gnome.org/GNOME/mutter/-/issues/1674

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1784>
2021-03-23 17:37:22 +00:00
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
Daniel van Vugt
3555f65b75 wayland-dma-buf: Add support for DRM_FORMAT_ABGR2101010
It seems to be the preferred format of the Mesa V3D driver on
Raspberry Pi 4. If the compositor doesn't advertise it then Mesa will
fallback from `zwp_linux_dmabuf_v1` to `wl_drm`, incorrectly. Meaning
it will keep using a buffer with modifiers on an interface that does
not have modifiers.

Add support for `DRM_FORMAT_ABGR2101010`. It works, and prevents Mesa
from taking its broken fallback path.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1520
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1798>
2021-03-23 16:40:40 +00:00
Marek Černocký
dc74d4d429 Updated Czech translation 2021-03-23 12:45:55 +01:00
Carlos Garnacho
dc9481973d core: Drop "volatile" from static GTypes in manual registration
As documented in g_once_init_enter(): "While @location has a volatile qualifier,
this is a historical artifact and the pointer passed to it should not be
volatile.". And effectively this now warns with modern glibc.

Drop the "volatile" qualifier from these static variables as it's expected.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1785>
2021-03-22 10:47:51 +00:00
Carlos Garnacho
bc1026d52d clutter: Drop "volatile" from static GTypes in manual registration
As documented in g_once_init_enter(): "While @location has a volatile qualifier,
this is a historical artifact and the pointer passed to it should not be
volatile.". And effectively this now warns with modern glibc.

Drop the "volatile" qualifier from these static variables as it's expected.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1785>
2021-03-22 10:47:51 +00:00
Carlos Garnacho
9e10d2fa88 cogl: Drop "volatile" from static GTypes in manual registration
As documented in g_once_init_enter(): "While @location has a volatile qualifier,
this is a historical artifact and the pointer passed to it should not be
volatile.". And effectively this now warns with modern glibc.

Drop the "volatile" qualifier from these static variables as it's expected.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1785>
2021-03-22 10:47:51 +00:00
Ngọc Quân Trần
3b702886be Update Vietnamese translation 2021-03-22 01:31:05 +00:00
Bruce Cowan
9e36ff2dda Update British English translation 2021-03-21 20:23:02 +00:00
Florian Müllner
4a5b983809 Post-release version bump 2021-03-20 13:41:19 +01:00
Florian Müllner
21a09fb792 Tag release 40.0
Update NEWS.
2021-03-20 13:09:44 +01:00
Fran Dieguez
561ef38a1e Update Galician translation 2021-03-19 20:01:44 +00:00
Марко Костић
374a811648 Update Serbian translation 2021-03-19 07:11:55 +00:00
Olivier Fourdan
1f1bf4cd9d xwayland: Check permissions on /tmp/.X11-unix
For Xwayland, mutter creates the sockets in the standard /tmp/.X11-unix
directory.

Yet, if that directory already exists, it may have been created by
another user with full control over the created socket.

To avoid that issue, if the directory /tmp/.X11-unix already exists,
check that the permissions are as we expect, i.e. the directory belongs
to either root or the user herself, is writable and has the sticky bit.

Thanks to fabian@ritter-vogt.de for reporting that issue.

https://gitlab.gnome.org/GNOME/mutter/-/issues/1708

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1787>
2021-03-18 17:43:02 +01:00
Olivier Fourdan
7b5e855032 xwayland: Use defines for X11 directory and path
Rather than repeating the same strings for X11 directory and path all
around the code, use a define.

No functional change.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1787>
2021-03-18 17:43:02 +01:00
Matej Urbančič
0629df3fe6 Update Slovenian translation 2021-03-17 17:44:41 +00:00
Daniel Mustieles
774a62b104 Updated Spanish translation 2021-03-16 16:10:35 +01:00
Tim Sabsch
6cc43ed6d4 Update German translation 2021-03-16 13:19:18 +00:00
Hugo Carvalho
4b71f0fad2 Update Portuguese translation 2021-03-15 18:48:13 +00:00
Florian Müllner
59b56a546c Post-release version bump 2021-03-15 16:10:02 +01:00
Florian Müllner
0986556b60 Tag release 40.rc
Update NEWS.
2021-03-15 14:16:31 +01:00
Robert Mader
2ef6490323 wayland/surface: Do not free placement ops of cached state
The list gets freed in `meta_wayland_surface_state_clear()`
if the pointer is still set.

Fixes ba8499f9ec

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1783>
2021-03-15 12:49:45 +00:00
Gwan-gyeong Mun
b1b403254d Update Korean translation 2021-03-15 12:34:50 +00:00
Milo Casagrande
d7f3b017bf Update Italian translation 2021-03-15 08:08:28 +00:00
Anders Jonsson
1199010d45 Update Swedish translation 2021-03-14 21:12:03 +00:00
A S Alam
5a91ce367c Update Punjabi translation 2021-03-14 17:58:41 +00:00
Kukuh Syafaat
9628272be7 Update Indonesian translation 2021-03-14 12:19:30 +00:00
Aurimas Černius
6bd383c81b Updated Lithuanian translation 2021-03-14 12:31:54 +02:00
Balázs Úr
627930f170 Update Hungarian translation 2021-03-14 07:15:30 +00:00
Robert Mader
ba8499f9ec wayland/subsurface: Move placement ops to the parents pending state
Unlike other subsurface state, placement operations need to get
applied in order. As per spec:

```
Requests are handled in order and applied immediately to a pending
state. The final pending state is copied to the active state the
next time the state of the parent surface is applied.
```

Having placement operations being part of the subsurface state
makes it difficult to support arbitrary orderings. Make them
part of the parents surface pending state instead.

Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/1691

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1768>
2021-03-14 00:38:18 +01:00
Marco Trevisan (Treviño)
eed368ee91 clutter: Always make the seat handle the events first
Some events such as the proximity one requires a device to be set before
we process them, so ensure we process the event details after we've
added the device to the seat.

This may lead to handle a device-removed signal before the clutter event
but it's anyways not different from what we did before commit 012c0a18

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1779>
2021-03-13 21:36:25 +00:00
Fran Dieguez
a78a3258e2 Update Galician translation 2021-03-13 21:32:51 +00:00
Marek Černocký
f5733d1009 Updated Czech translation 2021-03-13 22:17:32 +01:00
Asier Sarasua Garmendia
e9d53dc0ae Update Basque translation 2021-03-13 20:07:09 +00:00
Jonas Ådahl
1ff1100d76 cally/stage: Don't add weak pointer to stage
The CallyStage objects lifetime is tied to the stage, so if we add a
weak pointer to it, we won't be able to remove it, as we would try to do
so not until the stage itself is being disposed, at which point removing
it fails. However, not removing it will make the stage try to clean up
the weak refs, and since it does this more or less directly after
freeing the cally stage, it ends up writing NULL to freed memory,
causing memory corruption.

Fix this by avoiding adding the weak pointer when that pointer is to the
stage.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1775>
2021-03-13 18:56:21 +00:00
Jonas Ådahl
12f2fcd332 main: Expose hooks to manage context with more granularity
This is to allow gnome-shell to tear down more gracefully. It's a stop
gap solution until there is a better context handling system, but will
have to do for now.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1775>
2021-03-13 18:56:21 +00:00
Jonas Ådahl
c3aa32987a backend: Destroy stage when destroying backend
Otherwise we leak it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1775>
2021-03-13 18:56:21 +00:00
Jonas Ådahl
c5f699b8b3 backend: Destroy backend explicitly
This now ensures that calling meta_release_backend() destroys the
backend.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1775>
2021-03-13 18:56:21 +00:00
Jonas Ådahl
c1810d6947 backend: Destroy clutter backend explicitly
Instead of relying on reference counting, destroy it with a destroy
function that calls run_dispose() on before removing a reference.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1775>
2021-03-13 18:56:21 +00:00
Jonas Ådahl
ab600cafd2 backend: Destroy seat explicitly
Don't let any dangling pointer keeping it alive.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1775>
2021-03-13 18:56:21 +00:00
Jonas Ådahl
6ecd911dd0 backend: Take over seat ownership from the clutter backend
Having the clutter backend owning and managing creates complication for
implementing graceful shutdown, so move it to the real backend.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1775>
2021-03-13 18:56:21 +00:00
Jonas Ådahl
16b63451a3 input-settings: Don't eat up seat reference
MetaInputSettings unref:ed the seat on destruction, but it never ref:ed
it on construction, meaning it "stole" the reference from the rightful
owner. Make MetaInputSettings less of a thief.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1775>
2021-03-13 18:56:21 +00:00
Jonas Ådahl
353cdf5273 clutter/backend/x11: Fix some variable naming convention
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1775>
2021-03-13 18:56:21 +00:00
Jonas Ådahl
5aa43ec6c4 clutter/backend/native: Don't double manage stage implementation
The stage owns the "stage window", so don't double manage it in
MetaClutterBackendNative, as that means it'd be double-destroyed if the
stage would be destroyed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1775>
2021-03-13 18:56:21 +00:00
Olivier Fourdan
c016437857 backends/native: Sync LEDs when adding new device
Adding new input devices resets the LED state, make sure to restore it
to keep the LED and XKB state consistent.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1594
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1662>
2021-03-13 18:34:22 +00:00