Commit graph

17361 commits

Author SHA1 Message Date
Florian Müllner
14fdfae901 ci: Add --help option to meson-install script
It's not really necessary in an internal script, but it's easy
enough and doesn't hurt *shrug*

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
(cherry picked from commit d97c667937)
2023-04-25 08:07:57 +00:00
Florian Müllner
9e18945773 ci: Use built-in option parsing in meson-install
This is less concise than the current ad-hoc parsing, but gets
us error handling ("unknown option --foo") and is easier to
extend.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
(cherry picked from commit cdd8d33587)
2023-04-25 08:07:57 +00:00
Florian Müllner
6f9e463370 ci: Make sure to always clear meson-install checkout dir
We currently remove the directory at the end of the script, but
that code is only reached when all previous operations were
successful.

Address this by first using an absolute directory path in /tmp
instead of a "random" location based on the CWD, then set a trap
to remove it on exit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
(cherry picked from commit fac05b182c)
2023-04-25 08:07:57 +00:00
Florian Müllner
c8c27a270c ci: Fix meson-install usage check
The script has four mandatory arguments, and also accepts optional
build options that are passed on to meson. Checking for the number
of arguments *before* filtering out the optional ones means that

`./install-meson-project.sh -Done=1 -Dtwo=2 -Dthree=3 -Dfour=4`

is considered valid, even though not a single required argument
is passed.

Fix this by filtering out the arguments before doing the usage
check. As it is a nice touch to have usage information at the
top of the script, move the message into a usage() function at
the top.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
(cherry picked from commit 919812a851)
2023-04-25 08:07:57 +00:00
Florian Müllner
e5c37d2ff4 ci: Stop running meson without subcommand
Invoking meson with no command is deprecated in favor of
`meson setup`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
(cherry picked from commit a5aeb6a3e6)
2023-04-25 08:07:57 +00:00
Florian Müllner
0db98d5ac6 subprojects: Stop running meson without subcommand
Invoking meson with no command is deprecated in favor of
`meson setup`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
(cherry picked from commit 6398ee8dc5)
2023-04-25 08:07:57 +00:00
Marco Trevisan (Treviño)
9777594fe9 shell-app-system: Give priority to .desktop IDs that should be shown
If we have multiple desktop ID's that share the same startup-wm class
and none of them is actually matching the desktop-id, then we should
exclude the ones that should not be shown in the current desktop.

This will help preventing cases such as the previous one in case no
desktop file ID would match the startup-wm-class exactly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2721>
(cherry picked from commit 12bb3a601d)
2023-04-25 08:07:57 +00:00
Marco Trevisan (Treviño)
bb64d077ef shell-app-system: Do not compare startup-wm classes with full desktop IDs
When fetching the desktop ids into a map of startup-wm classes we meant
to give the ones that match the desktop ID more priority, however
this did not happen because we were always comparing a desktop
file id, including the `.desktop` suffix, with a wm-class that generally
does not include that.

This is the case of gnome-system-monitor, that provides two desktop
files, one of which is OnlyShowIn=KDE but both have the same
StartupWMClass and thus the first parsed is preferred, even though its
desktop-id is gnome-system-monitor-kde.

As per this, remove the .desktop suffix when comparing it with the
startup-wm-class, keeping the old check just in case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2721>
(cherry picked from commit e7a09946ca)
2023-04-25 08:07:57 +00:00
Sebastian Keller
0254b2ef6d windowPreview: Ignore leave events after being destroyed
When a WindowPreview is being destroyed, the class default handler for
the `destroy` signal is responsible for destroying its child actors.
This happens after the emission of the `destroy` signal, i.e. after
`WindowPreview::_onDestroy()` has been run.

The destruction of the WindowPreview's child actors now triggers a
re-pick, but due to WindowPreview having already being marked as
`CLUTTER_IN_DESTRUCTION`, it will not be picked, resulting in a `leave`
event if the cursor was on top of the WindowPreview at the time
`destroy()` was called on it.

So this leads to `WindowPreview::vfunc_leave_event()` being run after
`WindowPreview::_onDestroy()`, which means the idle started by the leave
event handler will not be removed and ends up accessing actors after
they have already been destroyed.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5512
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6065
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2738>
(cherry picked from commit 4bbf6d497d)
2023-04-25 08:07:57 +00:00
Marco Trevisan (Treviño)
a54ad6007a dash: Do not destroy a dash label twice
Dash labels are children of the main uiGroup and so could be destroyed
before their logical-owner DashItemContainer during shutdown.

This implies that we could destroy them twice. To avoid this, unset them
when destroyed.

This is mostly visible when using dash-to-dock, but it's still
technically possible with upstream code:

** Message: 19:57:49.847: Shutting down GNOME Shell

(gnome-shell:2788214): Gjs-CRITICAL **: 19:57:49.933: Object St.Label
 (0x55b33668eab0), has been already disposed — impossible to access it.
 This might be caused by the object having been destroyed from C code using
something such as destroy(), dispose(), or remove() vfuncs.
  == Stack trace for context 0x55b3345fd3d0 ==
  #0   7ffeabd810d0 b   /data/GNOME/gnome-shell/js/ui/dash.js:86
  #1   55b335b62f88 i   /data/GNOME/JHBUILD_HOME/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/docking.js:487
  #2   7ffeabd838f0 b   self-hosted:1121
  #3   55b335b62ec8 i   /data/GNOME/gnome-shell/js/ui/layout.js:240

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2739>
(cherry picked from commit 8bf06bfc9f)
2023-04-25 08:07:57 +00:00
Florian Müllner
73b0aee7b6 panelMenu: Fix keynav of menu-less buttons
The left/right navigation between top bar buttons is usually
handled by a key-press handler on the button's menu.

However when a DummyMenu is used, the button itself serves as
fake menu actor and will get grabbed when "opening" the menu.
Due to that grab, the event is not propagated to the stage,
and regular keynav does not work.

To avoid the focus getting stuck in that case, add an explicit
key-press handler that bypasses the grab.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2734>
(cherry picked from commit ecb274cee0)
2023-04-25 08:07:57 +00:00
msizanoen1
a3a996484d messageTray: Don't set _notificationRemoved if destroyed notification is queued
When the user clears all notifications from the notification menu UI, it's
possible for a queued notification to be destroyed after the currently displayed
notification. The removal of the currently displayed notification is not
processed until the notification menu is closed (due to `this._bannerBlocked`).
By then, it's possible that `_notificationRemoved` has already been overwritten
when `_onNotificationDestroy` is invoked with another (queued) notification.

This eventually results in a notification banner that cannot be removed by the
user as the notification object needed to do so has already been destroyed.

Fix this by only assigning to `_notificationRemoved` if `this._notification ==
notification`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2736>
(cherry picked from commit cde7d44a28)
2023-04-25 08:07:57 +00:00
Jonas Dreßler
cb43448873 misc/objectManager: Fix emission of object-removed signal
Emitting this signal is broken right now: We check for a length of 0 on
this._objects[objectPath], but the
`this._objects[objectPath][interfaceName] = null` we do before the
check doesn't actually remove the key, it only sets the value to null,
leaving the key around and thus the amount of entries in the object doesn't
change.

Fix that by using the delete statement instead, "delete" properly removes
the key and thus affects the amount of entries in the object, making our
length === 0 check effective.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2730>
(cherry picked from commit 8431e7ae51)
2023-04-25 08:07:57 +00:00
Ivan Molodetskikh
b09b17f804 screenshot: Get cursor texture from window
When a window is in the background and should not have the cursor on top
of it, its _cursor will be null. By getting the texture through it, we
add this extra check, which was missing before, leading to a cursor
drawn at 0, 0 on windows where it should not have been drawn.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2702>
(cherry picked from commit 237c3e958d)
2023-04-25 08:07:57 +00:00
Florian Müllner
2ae0abc1da workspacesView: Update visibility after updating workspaces
When the number of workspaces changes, it is possible that one
of the visible (non-active) workspaces is removed, and another
invisible workspace moves in its place.

Make sure that workspaces are shown as necessary in this case.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6519

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2699>
(cherry picked from commit 95386a1423)
2023-04-25 08:07:57 +00:00
Florian Müllner
f392bf9e3c modalDialog: Fix fading out dialog
The dialog's state property has been read-only since
commit 2f6323afc, but the callback at the end of the
fade transition still tries to set the value directly.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6506

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2696>
(cherry picked from commit 5766d4111a)
2023-04-25 08:07:57 +00:00
Daniel van Vugt
ace6d62c9f appDisplay: Avoid using an undefined _swipeTracker
It might have been deleted already during shutdown by `_onDestroy()`.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6512
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2693>
(cherry picked from commit b8013704cf)
2023-04-25 08:07:57 +00:00
Will Thompson
fa998ef5e0 status/location: Handle geoclue not being activatable
In GNOME OS, due to a misconfiguration, geoclue was configured without
systemd support. In that configuration, geoclue does not install its
systemd .service file (geoclue.service) but it (incorrectly) includes
the following line in its D-Bus service file:

    SystemdService=geoclue.service

As a result, when dbus-daemon tried to activate it at gnome-shell's
request, it would fail with:

    Unit geoclue.service not found

Then, GeoclueAgent._onGeoclueVanished() would be called, as the
name_vanished_handler passed to Gio.bus_watch_name(). This is consistent
with Gio.bus_watch_name()'s documentation:

> You are guaranteed that one of the handlers will be invoked after
> calling this function.

But that function assumed that this._managerProxy is defined, leading
to:

    JS ERROR: TypeError: this._managerProxy is undefined
    _onGeoclueVanished@resource:///org/gnome/shell/ui/status/location.js:163:9

Fix this by checking for nullishness of this._managerProxy. (Strictly
speaking, it's undefined rather than being null, but other code in this
file already uses the vaguer '!= null' test, which considers undefined
to be null.)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2689>
(cherry picked from commit ab0c795e81)
2023-04-25 08:07:57 +00:00
Ivan Molodetskikh
aef5975acf screenshot: Use meta_window_has_pointer () for pointer check
909616b208 seems to have wrapped window actors in a container, so the actor.has_pointer check started failing. Instead, switch to meta_window_has_pointer () which doesn't rely on window actor implementation details.

We check for existence of has_pointer first just in case someone attempts to run gnome-shell 44.1 with mutter 44.0 which does not have the function exported publicly yet.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2710>

(cherry picked from commit 4daea0ccae)
2023-04-25 08:07:57 +00:00
Boyuan Yang
046c283736 Update Chinese (China) translation 2023-04-10 19:41:22 +00:00
Nart Tlisha
3499d2e875 Update Abkhazian translation 2023-04-05 09:08:17 +00:00
Florian Müllner
83c44abe00 Bump version to 43.4
Update NEWS.
2023-03-19 21:25:01 +01:00
Sebastian Keller
742437305e overview: Hide when failing to take grab at end of startup animation
Otherwise keyboard input would be going to whatever window was
preventing us from taking the grab while it is obscured by the overview.

(cherry picked from commit 56478f21e6)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2704>
2023-03-19 12:08:56 +01:00
Sebastian Keller
d70de69513 overview: Don't claim to be SHOWN when HIDDEN during startup animation
When the overview gets hidden during the startup animation, the callback
would still change the state to SHOWN, despite the overview not being
shown.

This can happen for example if a `monitors-changed` signal triggers a
relayout during startup.

See: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2514#note_1683525
(cherry picked from commit bb42973730)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2704>
2023-03-19 12:08:56 +01:00
Jonas Dreßler
c35bcd628d dnd: Handle dragActorSource getting destroyed
(cherry picked from commit de08ec915f)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2704>
2023-03-19 12:07:10 +01:00
Sebastian Keller
dbd95e2458 status/network: Fix WirelessNetwork related leaks
NetworkManager frequently refreshes the list of available access points.
For some reason this often ends up removing some or all access points
only to add them back in a later refresh later. With the exception of
the currently connected access point, which is never removed.

When all access points of a WirelessNetwork have been removed, it gets
destroyed by NMWirelessDeviceItem::_removeAccessPoint(). This however
does not happen for the currently connected network due to the always
present access point. If this network now happens to consist of multiple
access points, the "unused" NMAccessPoints will get removed and added
in these refreshes, without the WirelessNetwork getting destroyed.

Whenever such an unused access point is added, due to the use of signal
tracking this leaks the NMAccessPoint and SignalTracker until the
WirelessNetwork is destroyed.

However when the NMWirelessDeviceItem is destroyed, for example due to
suspending, it stops tracking access point changes, ensuring that the
condition for the WirelessNetwork being destroyed can not occur anymore.

Even with just two access points, such as can be found in 2.4GHz+5GHz
home routers this issue leaks hundreds of NMAccessPoints and
SignalTrackers per day. As well as a small number of WirelessNetworks
which are also kept alive by the SignalTrackers.

To fix this disconnect from the access point when it gets removed and
destroy all remaining networks when the NMWirelessDeviceItem is
destroyed.

(cherry picked from commit feb1c57dde)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2704>
2023-03-19 12:06:29 +01:00
Alan Paris
bd822513d7 Update French translation 2023-03-08 16:46:42 +00:00
Balázs Úr
6f7ff15ecc Update Hungarian translation 2023-03-02 01:30:16 +00:00
Мирослав Николић
02cb10944f Update Serbian translation 2023-02-26 18:16:58 +00:00
Aurimas Černius
c21095377f Update Lithuanian translation 2023-02-19 19:35:07 +00:00
Piotr Drąg
f4cf896d55 Update Polish translation 2023-02-18 16:19:01 +01:00
Tim Sabsch
b2386ad5f4 Update German translation 2023-02-18 13:54:10 +00:00
Martin
a672e5441e Update Slovenian translation 2023-02-15 22:29:56 +00:00
Kukuh Syafaat
8c25087b13 Update Indonesian translation 2023-02-15 03:47:12 +00:00
Yuri Chornoivan
692b5747ef Update Ukrainian translation 2023-02-14 17:55:52 +00:00
Hugo Carvalho
bcbc364da3 Update Portuguese translation 2023-02-14 10:45:14 +00:00
Ekaterine Papava
b00f8e33ad Update Georgian translation 2023-02-14 07:30:05 +00:00
Jiri Grönroos
67998e371b Update Finnish translation 2023-02-14 07:18:22 +00:00
Sabri Ünal
f8cb82179b Update Turkish translation 2023-02-14 05:18:29 +00:00
Anders Jonsson
0f4e34fdc8 Update Swedish translation 2023-02-14 05:16:38 +00:00
Florian Müllner
85f141fabd Bump version to 43.3
Update NEWS.
2023-02-14 01:11:32 +01:00
Sebastian Keller
567886893a gdmUtil: Fix SignalTracker leak in ShellUserVerifier
ShellUserVerifier was connecting to UserVerifierChoiceList signals using
SignalTracker, but never disconnected those, leading to the
corresponding SignalTracker being leaked.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6395
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2637>
(cherry picked from commit 1236bf8f09)
2023-02-13 16:58:11 +01:00
Sebastian Keller
293245dce4 authPrompt: Manually destroy inactive/unused entry
AuthPrompt creates two entries, one for text and one for passwords, but
only ever one is used as child widget. This would lead to the other one
not getting destroyed when the the AuthPrompt is destroyed.

This now manually destroys the inactive one when the AuthPrompt is
destroyed to avoid that leak.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6395
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2637>
(cherry picked from commit 572d011894)
2023-02-13 16:58:11 +01:00
Sebastian Keller
945368d823 overview: Skip SHOWN to SHOWN when changing from app grid to overview
Switching between the app grid and the window picker in the overview via
gestures results in _gestureEnd() getting called with endProgress !== 0
in both cases, which leads to it calling _showDone(). This then
unconditionally changes the state to SHOWN, which in this situation is
already the current state. Since the previous commit this results in a
warning, so check if we are already in the SHOWN state.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2514>
(cherry picked from commit f5d793647b)
2023-02-13 16:58:11 +01:00
Sebastian Keller
e15bad6cf5 overview: Validate transitions of the shown state
There have been several bugs in the past that caused invalid transitions
of the `shown` state, such as going from `showing` to `showing`. These
cause consecutive emissions of the `showing` signal, which can confuse
other classes such as the search controller which connects to the stage
`key-press-event` on showing and disconnects again on `hiding`. Having
two consecutive `showing` signals will cause it to connect twice, and
only disconnect once when hiding the overview again. This will lead to
key presses getting repeated in the search until the session is
restarted. Because there is no obvious connection to how and when this
issue got triggered, this now adds some validation code that only allows
valid transitions and throws an error otherwise so we get a backtrace of
the code actually causing the problem.

This does not fix the issue(s) causing the invalid state transitions, it
only adds a way of tracking them down.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4651
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2514>
(cherry picked from commit a91b6439ba)
2023-02-13 16:58:11 +01:00
Carlos Garnacho
937594b806 window-tracker: Only emit ::tracked-windows-changed on title changes
Since commit a1d650ce27, window title changes are listened for in the
ShellWindowTracker in order to emit ::tracked-windows-changed when
there are window title changes.

The rest of the things that happen in between (removing the window
from a ShellApp, possibly have it destroyed, and possibly creating a
new ShellApp to re-insert the window) are superfluous and even result
in the altTab switcher popup ending up confused about the applications
available.

Only emit the signal so changes can be followed on D-Bus, but avoid
the ShellApp fiddling otherwise.

Fixes: a1d650ce27 - window-tracker: Emit 'tracked-windows-changed' on title changes

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6385
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2634>
(cherry picked from commit 41c91c7a3b)
2023-02-13 16:58:11 +01:00
Florian Müllner
4fac895ecd extension-tool: Fix falling back to GSettings
When we switched the tool to the public Extensions service, the
fallback to GSettings broke in the case GNOME is installed but
not running (because the service can be autostarted, albeit it'll
fail later).

Fix this by also falling back when we don't get a response from
gnome-shell.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6127

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2552>
(cherry picked from commit 007778880b)
2023-02-13 16:58:11 +01:00
Florian Müllner
28899e2a56 croco: Use g_string_free() return value
glib now warns if the return value is not used, so use the API as
intended instead of assigning the character data separately before
freeing the GString.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2625>
(cherry picked from commit e86a0b32c2)
2023-02-13 16:58:11 +01:00
Florian Müllner
9b0b3ef9b9 shell/window-preview-layout: Add precondition checks
It's good practice to guard public API against programmer errors,
so do that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6351

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2622>
(cherry picked from commit 888a0ad623)
2023-02-13 16:58:11 +01:00
Florian Müllner
344b54f18b shell/window-preview-layout: Mark return value as nullable
The function may return null, so we should mark it as such, even
if that information is currently unused.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6351

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2622>
(cherry picked from commit 1993f362d2)
2023-02-13 16:58:11 +01:00