Commit graph

18897 commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
6ab1d1c2ec
js/environment: Add GLib spawn async overrides warning when using child setup
Using child setup functions is unsafe in gjs code so let's warn if this
happens so that extensions using a similar codepath are warned.

This could be also part of gjs, but we provide a shell override since we
have alternatives to log about.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3293>
(cherry picked from commit 494be30764)
2024-05-25 01:13:09 +02:00
Marco Trevisan (Treviño)
e633b1d4f5
js: Use Shell.util_spawn_async functions to launch external processes
As explained in previous commits, it's not safe to use JS code in child
function callbacks, so let's use the safer version of it.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6698
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3293>
(cherry picked from commit 26e8fb90fb)
2024-05-25 01:13:01 +02:00
Marco Trevisan (Treviño)
ef1bdf7934
shell-util: Add async-signal-safe wrappers for GLib.spawn_async implementations
In the shell code we often use GLib.spawn_async to launch processes
with a GSpawnChildSetupFunc implementation in JavaScript to reset the
mutter nofile rlimit in the new child process.

However, this is highly unsafe to do because this implies that the child
setup function code is executed in gjs where a lot of allocations are
done and even more not-async-signal-safe code is executed, in fact
leading to dead-locks as reported in the past.

To prevent this, declare a new functions that do the same of the GLib
counterpart but without providing a GSpawnChildSetupFunc that is instead
implemented in the C-side doing the cleanup that mutter requires without
allocations or async-signal-unsafe code.

Helps: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6698
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3293>
(cherry picked from commit 781010be66)
2024-05-25 01:12:51 +02:00
Marco Trevisan (Treviño)
f6c161ec6e
shell-app: Do not allocate memory during GSpawnChildSetupFunc
The child context setup function used as launch GSpawnChildSetupFunc
uses g_object_get that internally potentially allocates memory, making
it not async-signal-safe and so not something that is safe to use in
between fork and exec, so just use the simpler getter here.

Note that the current implementation of app_child_setup() is safe
already as sd_journal_stream_fd, dup2 and close are so.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3293>
(cherry picked from commit dcb5956dea)
2024-05-25 01:12:44 +02:00
Florian Müllner
5ddc97d630
ci: Hook up release-module
In the future, the module will automate uploading the release
tarball. We already use the CI pipeline to generate the tarball,
so it's easy to hook up the module and provide some testing
before the module goes into production.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3340>
(cherry picked from commit 1fbfb93cbd)
2024-05-25 01:12:34 +02:00
Florian Müllner
0cf3d513c7
ci: Use meson introspect to generate artifact path
We currently assume that the `CI_COMMIT_TAG` variable matches the
version component of the generated dist tarball.

That is usually correct, but sometimes errors happen and a wrong
tag is pushed, and the real release uses something like "46.0-real".

Account for that by building the artifact path from `meson introspect`
and exporting it as environment variable.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3340>
(cherry picked from commit 27445a1c98)
2024-05-25 01:12:28 +02:00
Sebastian Keller
83446972e6
style: Don't use different offset for the HC app grid running indicator
The offset in high contrast mode was moving the dot too close to the
text making the spacing between the text, dot and hover highlight appear
visually unbalanced. Also it was making it more likely to overlap
descenders in the text.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3245>
(cherry picked from commit 559d38c259)
2024-05-23 00:22:54 +02:00
Sebastian Keller
fa0a7093c1
style: Shift dash running indicator dot up a pixel in high contrast mode
With the dot now being placed correctly at the bottom of the hover
highlight it is now also overlapping the 1px inset shadow used as
outline in high contrast mode. To avoid this, shift the dot up
accordingly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3245>
(cherry picked from commit e2adc5a445)
2024-05-23 00:22:48 +02:00
Sebastian Keller
6f215fa55d
appDisplay: Set running indicator dot offset via CSS
The offset was given as a hardcoded (physical) pixel value and did not
take scaling into account. This lead to it being shifted closer towards
the icon as the scale increased.

This now replaces the hardcoded value with a CSS property which
automatically includes the scale factor.

Further this allows simplifying some calculations that previously were
trying to counteract the hardcoded offset using margins by using the
intended offset directly.

With this the dot in the dash is also now placed at exactly the bottom
of the hover highlight, while previously there was an unintentional 1px
space.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7488
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3245>
(cherry picked from commit 31997fa2f9)
2024-05-23 00:22:41 +02:00
Florian Müllner
aff1183af8
workspaceThumbnails: Update target scale when fully unexpanded
We currently only update the scale when fully expanded. In order
to fix the initial expand transition, also update the scale
when fully unexpanded.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3331>
(cherry picked from commit 6fa6dd6abb)
2024-05-22 16:32:56 +02:00
Florian Müllner
2d32848a8e
workspaceThumbnail: Don't rely on allocation to compute scale
We currently compute the target scale from the allocated height,
which means that it only becomes available after thumbnails have
been allocated at least once at their expanded height.

As the minimap is initially hidden, this only happens after it is
expanded for the first time, which means the corresponding transition
is not animated.

In order to allow for a fix, compute the target height ourselves
to allow the scale computation to work independently from the
expand factor.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3331>
(cherry picked from commit 2694a64ebb)
2024-05-22 16:32:49 +02:00
Florian Müllner
c3a31e6e6b
authPrompt: Consume cancel key event
The auth prompt currently propagates all key presses, even the
Escape press that is used to cancel it.

On the lock screen that means that the same event that cancels
the prompt (and switches back to the clock) is *also* propagated
to the handler that activates the prompt on key press.

That handler doesn't do anything when the prompt is already visible,
which is the case when the transition to the clock is animated.

However when animations are disabled, canceling the prompt will
result in a new prompt getting created immediately, and the login
screen is stuck on the prompt.

Fix this by not propagating key events that are used to cancel
the prompt.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3317>
(cherry picked from commit e7dc0de75e)
2024-05-22 16:32:41 +02:00
Florian Müllner
c22d56e75f
authPrompt: Use signal handler instead of vfunc
The prompt itself may get destroyed when canceled, in which
case it is no longer possible to chain up in the vfunc.

This is usually not an issue as the prompt is only destroyed
at the end of a transition, but it results in a warning if
animations are disabled.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3317>
(cherry picked from commit dac4f2cb86)
2024-05-22 16:32:33 +02:00
segfault
418276e4d1
automountManager: Fix password not re-asked for TCRYPT devices
Since commit

  f881092bbc

released in cryptsetup 2.5.0, cryptsetup returns EPERM instead of EINVAL
when the TCRYPT header can't be decrypted with the provided
password and parameters.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7631
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3300>
(cherry picked from commit 9e6552a20d)
2024-05-22 16:31:48 +02:00
Sebastian Wick
571126e229
tests: Make sure XDG_CURRENT_DESKTOP is set to an empty string
gsettings overrides can be in affect when XDG_CURRENT_DESKTOP is set. We
need predictable default values for predictable tests in mutter and thus
mutter will start asserting that GSETTINGS_BACKEND='memory' and
XDG_CURRENT_DESKTOP=''.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3329>
(cherry picked from commit beb3f120dd)
2024-05-22 16:31:38 +02:00
Ray Strode
8c3b242e5d
gdm/util: Make sure error is GError before checking it
The fingerprint device fetching code has a generic error handler,
that assumes the passed in error is GError. If it's not a
GError it will fail trying to use GError specific methods.

This commit adds some validation checking.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3319>
(cherry picked from commit d8ab090d47)
2024-05-22 16:31:26 +02:00
Florian Müllner
1d4df339ef
croco: Remove unused and dodgy function
The function creates a parser object that is never used nor
freed, then always returns NULL.

Luckily it's unused, so just remove it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3321>
(cherry picked from commit 3220005eea)
2024-05-22 16:31:20 +02:00
Florian Müllner
c4a923801d
accessDialog: Stop owning portal name
We no longer provide a portal implementation, so there's no need
for owning the name. Right now only the gnome portal consumes
the API, and that accesses it under "org.gnome.Shell".

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3326>
(cherry picked from commit 9cafdb6d27)
2024-05-22 16:31:14 +02:00
Sam Hewitt
0ad1756a64
style: Adjust font sizes in Calendar popover
- increase the font size definition for %smaller used by calendar
- drop numeric time style for weather box

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7400
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6024
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3313>
(cherry picked from commit aa2c8ae435)
2024-05-22 16:31:04 +02:00
Sebastian Keller
20623458ae
status/keyboard: Use '+' to separate variant when launching tecla
The code was not changed when switching from gkbd-keyboard-display which
was using tab to separate layout and variant. Tecla uses '+' instead.

This fix was suggested by Neil Mayhew.

Fixes: 04aaa4b67 ("keyboard: Spawn "tecla" to show keyboard map")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7638
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3324>
(cherry picked from commit 658beda9a9)
2024-05-22 16:30:57 +02:00
Sam Hewitt
65f7dcbdba
style: Fix contrast issues of themed icons in messages
- increase circular bg color transparency

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7628
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3315>
(cherry picked from commit 1053b5826a)
2024-05-22 16:30:31 +02:00
Sam Hewitt
d97fc92c45
style: Adjust margin on search results grid to fix Large Text display
- drop unneeded margin definitions that cause results items to disappear when Large Text is enabled

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7511
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3312>
(cherry picked from commit 25ad8c9408)
2024-05-22 16:30:24 +02:00
Sam Hewitt
1379df716b
style: New window-icon class to split it from icon-dropshadow
- new class for window icons in window picker
- move HC specific styles to this new class

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/507
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3310>
(cherry picked from commit 6fee2c24e3)
2024-05-22 16:30:18 +02:00
Florian Müllner
268fb63e81
style: Don't force symbolic notification icons
With the addition of notification headers, we no longer include
an icon with every notification, but only when the notification
explicitly specifies an icon (other than the app icon).

After those changes, it makes more sense to use the icon as
provided by the app than forcing the symbolic style (which
only works for themed icons anyway).

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7620
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3296>
(cherry picked from commit 676503ff27)
2024-05-22 16:30:05 +02:00
Florian Müllner
ddaeec69d8
messageList: Only apply special styling to symbolic icons
The styling introduced in commit 8fed0b83d was only intended
for symbolics, it looks weird when applied to full-color icons.

So instead of using the GIcon type, apply the special styling
based on the new StIcon:is-symbolic property.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7620
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3296>
(cherry picked from commit a94b80b2d4)
2024-05-22 16:29:58 +02:00
Florian Müllner
03253382ee
st/icon: Add :is-symbolic property
It can be useful to know whether an icon displays a symbolic (rather
than just requesting it). Add a new :is-symbolic property for that
purpose, backed by private API on StImageContent that allows the
texture cache to shuffle that information through to the icon.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3296>
(cherry picked from commit 56cc755bf6)
2024-05-22 16:29:51 +02:00
Florian Müllner
69db43af40
unlockDialog: Bind source titles
After the recent notification changes, the title may still be null
when the source is originally added. Handle that case and make sure
we pick up later title changes by setting up a property binding.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3308>
(cherry picked from commit fe24de3ef2)
2024-05-22 16:11:58 +02:00
Florian Müllner
6dde8b9471
messageTray: Notify count when adding a notification
Adding a notification clearly constitutes a count change, but
the notify call was accidentally dropped during the overhaul
of the notification API.

Fixes: 34f05b075b ("messageTray: Let the tray decide whether to show a
banner")

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3308>
(cherry picked from commit 2c43225575)
2024-05-22 16:11:51 +02:00
Quentin PAGÈS
86ed75b92d Update Occitan translation 2024-05-20 15:38:15 +00:00
Balázs Úr
6cf9603ba3 Update Hungarian translation 2024-05-19 08:20:04 +00:00
Jose Riha
5d18bb8a70 Update Slovak translation 2024-05-17 22:05:46 +00:00
Scrambled 777
b03a683140 Update Hindi translation 2024-05-12 13:23:43 +00:00
Simon McVittie
538973868f
screencast: Correct expected bus name for streams
Previously, this only worked because GDBusConnection was not filtering
signals by their sender correctly (GNOME/glib#3268).

Thanks: Alicia Boya García
Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3303>
(cherry picked from commit 50a011a19d)
2024-05-07 20:18:23 +02:00
Ray Strode
3be24dd7b5
loginDialog: Make info messages themed
They were lacking a definition before leading them to
show up invisible.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3298>
(cherry picked from commit 09b541ad61)
2024-05-07 20:18:13 +02:00
Jonas Ådahl
0550105191
ci: Run tests with the timeout multiplier set to 5
Sometimes the test runners are saturated with other work. Bump the test
timeouts by a multiplier of 5 with the hope that they now will be much
more likely to have time to finish in time.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3299>
(cherry picked from commit f31099cd85)
2024-05-07 20:18:03 +02:00
Florian Müllner
893bcbdc02
ctrlAltTab: Ignore DOCK windows without app
The fallback path broke when we removed support for window icons.

Nowadays we track all windows, and as a result should always have an
associated app (although not necessarily backed by a .desktop file),
so this shouldn't make a difference in practice. Not to mention that
external docks (like cairo-dock) are extremely rare themselves now.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3295>
(cherry picked from commit 0d571e9191)
2024-05-07 20:17:54 +02:00
Marco Trevisan (Treviño)
03c2941dff
na-tray-child: Use absolute icon position as root event coordinates
Currently we're using relative positioning when sending click events to
tray icon clients, and this leads to some apps (especially Qt ones) to
try to open the menus at such absolute coordinate under X11.

To prevent this to happen, let's get the root coordinate from the xembed
and let's use it to compute the synthetic event root x/y.

We could have even used the actual event position for this, but getting
it from the xembed makes this more consistent.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3283>
(cherry picked from commit 794acd65a8)
2024-05-07 20:17:38 +02:00
Sebastian Keller
11a10214ff
js: Update for Gio/GioUnix split
GLib 2.79.2 split out the platform specific Gio APIs into a separate
GIRs, while still keeping a copy in the Gio GIR. gjs then added warnings
about the APIs being moved.

This bumps the Gio(Unix) version requirement to 2.79.2 and switches to
using the new GioUnix GIR.

See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3892
See: https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/918
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7539
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3288>
(cherry picked from commit 80a37bcf53)
2024-05-07 20:17:32 +02:00
pesader
3502d04b18
unlockDialog: Also center the time in 12h format
Since the time string uses a space to pad single-digit numbers, the
centered label looks off-center. Fix this by applying the trim()
function to get rid of whitespaces.

The drawback of this approach is that the label will change position
slightly when the time changes, but for the lockscreen that's okay.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6193
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3290>
(cherry picked from commit ccdd46c0d9)
2024-05-07 20:16:53 +02:00
Marco Trevisan (Treviño)
9e44219304
workspaceAnimation: Do not create clones for override redirect windows
Override redirect windows manage their own positioning and size alone
and are always sticky, so we're not covering them either with the
animation MonitorsGroup, and thus there's no need to clone them or we'd
end up having two windows painted.

This was causing the shell tray icon window actors (that have no opacity
by default but that are override redirect) to show up during the
animation as their clone animation is not 0.

The other option would be hide them during the animation phase, but
there's no need for this.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3285>
(cherry picked from commit 3a34c16eca)
2024-05-07 20:16:29 +02:00
Sebastian Keller
43b4d67a70
portalHelper: Fix handling of invalid TLS certificates
WebKitGTK 6.0 moved allow_tls_certificate_for_host() from WebContext to
NetworkSession. This was not adjusted here when the portal helper was
switched from 4.0 to 6.0.

2d1b53b211

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7597
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3284>
(cherry picked from commit b7079b8f2f)
2024-05-07 20:16:07 +02:00
Jakub Steiner
4b736f8486
theme: Worksace indicator height
- set the workspace indicator height to match the non-labeled osd panels
  such as volume or brightness

Fixes #7612

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3282>
(cherry picked from commit fb74d56258)
2024-05-07 20:15:46 +02:00
Gabriel Nagy
97a2a09bec
extensions-app: Fix XML declaration in gschema
Even if an invalid syntax doesn't make glib-compile-schemas error out in this
case, ensure the file is valid XML to appease third-party parsers.

Signed-off-by: Gabriel Nagy <gabriel.nagy@canonical.com>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3281>
(cherry picked from commit a106e52b4f)
2024-05-07 20:15:39 +02:00
Sebastian Wick
1a0fb7f258
shell-util: Only use systemd if gnome-shell is managed by systemd
Simply looking at the return value of sd_pid_get_user_unit can be used
to determine if the process is in a systemd unit, but it doesn't say if
gnome-shell is managed by systemd.

For example, running toolbx on a host with systemd creates a libpod
unit, even if the gnome-shell that gets started in the toolbx is itself
not managed by systemd.

We can make sure that gnome-shell is managed by systemd simply by
checking if the unit we're running starts with org.gnome.Shell.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3267>
(cherry picked from commit b3580919e3)
2024-05-07 20:15:06 +02:00
Hugo Carvalho
a0f6817aa1 Update Portuguese translation 2024-05-04 23:14:43 +00:00
Rachida SACI
49978f4fc6 Update Kabyle translation 2024-05-01 14:53:00 +00:00
Andika Triwidada
2d8c6f48c8 Update Indonesian translation 2024-04-22 11:08:20 +00:00
Florian Müllner
0d0aadf013
Bump version to 46.1
Update NEWS.
2024-04-21 14:24:51 +02:00
Florian Müllner
df50c2dfc6 cleanup: Replace deprecated String.prototype.substr()
The method is documented as deprecated:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr

Switch to the non-deprecated substring() method.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3234>
2024-04-19 17:38:37 +00:00
Florian Müllner
193b6c129e cleanup: Don't use substring to check prefix
String.prototype.startsWith() is more idiomatic in that case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3234>
2024-04-19 17:38:37 +00:00