Commit Graph

17750 Commits

Author SHA1 Message Date
Florian Müllner
f7c8ff7a0c portalHelper: Adjust coding style
Most of the file already complies with the new style. Quickly change
the last remaining bits of legacy style before making further changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2690>
2023-04-25 10:45:19 +00:00
Florian Müllner
6c6e3a8e76 portalHelper: Stop monkey-patching String.format()
It's not used, so no need to set it up.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2690>
2023-04-25 10:45:19 +00:00
Florian Müllner
a1f8f2efa1 portalHelper: Remove pointless destroyWindow() method
Years ago, the function used to clean up the cache when the
window was closed. But now that an ephemeral data manager is
used, nothing is cached anymore and the function is left as
a mere wrapper around this.destroy().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2690>
2023-04-25 10:45:19 +00:00
Automeris naranja
65ec7b3fa8 screenshot: Use independent tooltips for the Screenshot/Screencast buttons
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6189

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2683>
2023-04-25 10:33:58 +00:00
Florian Müllner
9168e2fc63 environment: Remove old compatibility code
St.set_slow_down_factor() has been deprecated for over 3 years
(since 3.34). That's plenty of time for extensions to switch to
St.Settings.get().slow_down_factor.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2743>
2023-04-25 09:52:22 +00:00
Florian Müllner
2815f33458 status/backgroundApps: Show spinner when closing
It can take a little while for an app to quit after the user
clicked the close button, and another for the portal to pick
up the change.

In order to provide feedback to the user that the request is
being handled, replace the close button with a spinner.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2732>
2023-04-25 09:39:52 +00:00
Florian Müllner
d6d6bf727f workspaceThumbnail: Use click action
Now that we have a convenient way of combining a draggable with
a click action, we can port the code without making it more
complicated.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2742>
2023-04-25 09:01:16 +00:00
Florian Müllner
3f9ee9cd5e dnd: Add addClickAction() method
The events that the draggable uses to initiate a drag operation
are the same as the ones a click action consumes for clicks.

It is still possible to combine the two, but it's finicky and far
from being straight-forward. To make this easier, add a dedicated
addClickAction() method to draggables that takes care of the
setup before adding the action to the draggable actor.

In the longer term, we'll want to turn DND into an action, and
have something like GTK's gesture group to allow combining actions
that would otherwise step on each other's toes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2742>
2023-04-25 09:01:16 +00:00
Florian Müllner
a9ba9b7a47 popupMenu: Replace event handlers with click action
Actions provide a higher-level API than event handlers, not unlike
GTK's event controllers (albeit less complete). Allowing them to
take care of the low-level bits where possible is generally a good
idea.

Menu items are a very straight-forward case, with a good amount
of code saving, so port them over.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2742>
2023-04-25 09:01:16 +00:00
Florian Müllner
cd862aa53e panel: Drop unnecessary captured-event handler
The handler dates back to commit 50f248ec5b in 2011, and is
part of the original hack of making the activities button a
PanelMenu.Button while suppressing its menu.

By now, panel buttons without a menu have been properly supported
for years, but somehow that bit of the hack stuck around, even though
it is no longer actually needed (probably since the introduction of
DummyMenu.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2741>
2023-04-25 08:09:02 +00:00
Florian Müllner
b0ca64e777 Bump version to 44.1
Update NEWS.
2023-04-24 10:26:56 +02:00
Bobby Rong
a2e5cab3a4 docs: Remove invalid XInclude
This unbreaks the -Dgtk_doc=true build.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6486
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2749>
2023-04-24 10:55:40 +08:00
Florian Müllner
b8dcf85cc8 status/volume: Ignore capitalization for headphone detection
When we can't detect a headphone by form factor, we do a string
match on the port name. A match on 'Headphone' isn't less likely
to be valid than a match on 'headphone', so make sure we ignore
capitalization.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2691>
2023-04-21 18:53:00 +00:00
Florian Müllner
2eb3aff92c ci: Don't ignore init.js
Unlike js102, the gjs-check-syntax script supports modules, so
there's no longer a reason for ignoring the file.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2193>
2023-04-21 18:28:32 +00:00
Florian Müllner
0a420404c6 ci: Update JS tooling
Provided we use the correct version of the SpiderMonkey shell, we
can perform checks using the same engine that is used by gjs.

However some engine features are opt-in, so the set of features enabled
by gjs and js102 may differ. The obvious option for avoiding this is
replacing js102 with gjs for tests.

For that reason the check-potfiles.js script has been ported to gjs
and a second (simpler) script to replace `js102 --compileonly` was
added. This work happened in a separate repository to make sharing
between different JS-based projects easier.

Update the CI image to pull in those scripts and include gjs.

This will also address the issue that `js102 --compileonly` does not
handle modules.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2193>
2023-04-21 18:28:32 +00:00
Florian Müllner
ddae41456d ci: Remove duplicated cleanup
The template will already call `dnf clean all` after processing
packages and the script, so no need for us to call it as well.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2193>
2023-04-21 18:28:32 +00:00
Balló György
1ee070a14b autorunManager: Add missing await keyword
This fixes a regression introduced in commit c6861c0a3d

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2745>
2023-04-21 12:59:55 +00:00
Florian Müllner
f54af2639d ci: Update JS image
The image hasn't been updated for over a year, and it's now based
on an unsupported distro version. Jump directly to F38 which has
just been released.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2695>
2023-04-21 12:45:18 +00:00
Florian Müllner
5a7ba105c4 ci: Drop version suffix from job name
We don't build images for multiple distro versions, so all it does
is making version bumps more finicky.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2695>
2023-04-21 12:45:18 +00:00
Sebastian Keller
f6a8b63276 search: Expand search results view
Otherwise the search results can end up only as large as their content.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5924
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2744>
2023-04-21 01:08:23 +02:00
Florian Müllner
ea629cabbf ci: Make fringe meson-install arguments optional
Both the subdir and prepare arguments are very specific to
building the extensions-tool subproject stand-alone. In order
to make the script more generic, turn those required arguments
into optional --subdir and --prepare ones.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
2023-04-20 15:59:56 +00:00
Florian Müllner
d97c667937 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>
2023-04-20 15:59:56 +00:00
Florian Müllner
cdd8d33587 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>
2023-04-20 15:59:56 +00:00
Florian Müllner
fac05b182c 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>
2023-04-20 15:59:56 +00:00
Florian Müllner
919812a851 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>
2023-04-20 15:59:56 +00:00
Florian Müllner
a5aeb6a3e6 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>
2023-04-20 15:59:55 +00:00
Florian Müllner
6398ee8dc5 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>
2023-04-20 15:59:55 +00:00
Marco Trevisan (Treviño)
12bb3a601d 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>
2023-04-20 15:11:58 +00:00
Marco Trevisan (Treviño)
e7a09946ca 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>
2023-04-20 15:11:58 +00:00
Jonas Ådahl
8d1fe3b4cb scripting: Return promise in helper window wait functions
Otherwise they won't wait when doing e.g. `await waitTestWindows();`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>
2023-04-20 14:52:01 +02:00
Jonas Ådahl
c2412dbe59 tests/closeWithActiveWindows: Also test input method tear down
From a test case perspective, it's simple - make the test window have a
text entry, and make sure we have a virtual keyboard making GTK3 enable
the text entry. This would without a fix trigger
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6535.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>
2023-04-20 14:52:01 +02:00
Jonas Ådahl
8ab344929d js/main: Unset input method on shutdown
After shutdown, the Javascript context will be disposed, so we must make
sure we remain the active input method after this point.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6535
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>
2023-04-20 14:52:01 +02:00
Jonas Ådahl
1da8df81c5 perf-helper: Allow creating window with text input
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>
2023-04-20 14:52:01 +02:00
Jonas Ådahl
d272b16e50 tests/perf: Add test for shutdown with open window
This would without the applied fix trigger
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6536.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>
2023-04-20 14:49:38 +02:00
Jonas Ådahl
2325022d2f scripting: Allow avoiding exiting perf helper
This will help creating test cases where windows are open during
shutdown.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>
2023-04-20 14:49:38 +02:00
Jonas Ådahl
ff705fa902 shell: Make singletons owned by ShellGlobal
This means also means they will be cleaned up when disposing
ShellGlobal, which will then mean signals tied to the GObject lifetime
will be disconnected.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6536
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>
2023-04-20 14:49:38 +02:00
Jonas Ådahl
517482b562 shell/window-tracker: Disconnect signals on disposal
We always leak this, so this has no effect right now, but will in a
follow up commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>
2023-04-20 14:49:38 +02:00
Florian Müllner
728a94dead popupMenu: Only activate items that still have the pointer
After the introduction of implicit grabs in Clutter, a release
event will now always be delivered to the actor that received
the corresponding press event.

This results in surprising behavior when moving the pointer
while pressed, as a button release will always activate the
original item, even when the pointer moved to a different item
or outside the menu altogether.

Address this by checking the hover state (that is, whether
the item contains the pointer actor) before activating it.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2740>
2023-04-20 12:15:45 +00:00
Philipp Kiemle
ec37f2158d Update German translation 2023-04-20 09:01:27 +00:00
Asier Sarasua Garmendia
4147c6918f Update Basque translation 2023-04-19 17:36:25 +00:00
Sebastian Keller
4bbf6d497d 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>
2023-04-18 19:44:20 +00:00
Marco Trevisan (Treviño)
8bf06bfc9f 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>
2023-04-17 20:22:12 +00:00
Florian Müllner
ecb274cee0 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>
2023-04-17 20:09:56 +00:00
msizanoen1
cde7d44a28 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>
2023-04-17 19:40:45 +00:00
Sebastian Keller
15048c1fcb st/icon-theme: Fix small memory leak when checking fallback theme path
This is a small one time leak if there is more than one entry in the
search path due to multiple iterations overwriting the old pointer
before finally going out of scope.

Fixes: 934faaace ("st/icon-theme: Start using g_autofree")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2737>
2023-04-17 10:38:33 +02:00
Balázs Úr
a8ae5fa1ec Update Hungarian translation 2023-04-13 21:40:08 +00:00
Fran Dieguez
20e7294974 Update Galician translation 2023-04-13 16:59:21 +00:00
Yaron Shahrabani
4598c5254c Update Hebrew translation 2023-04-13 11:29:58 +00:00
Sabri Ünal
3beb32e4f7 Update Turkish translation 2023-04-12 20:12:31 +00:00
Martin
0e53261b9c Update Slovenian translation 2023-04-12 19:49:42 +00:00