19005 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
9abad7f25f shell-util: Pass the mutter context to the spawn child setup function
This was the type the function expected, but we were actually passing
the global context to it.

This didn't crash for some reason, but indeed it was wrong and we didn't
catch it because mutter side had not type-checks either

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3355>
2024-05-31 16:46:14 +02:00
Jonas Ådahl
22a38c25f2 ci: Don't set GIT_SUBMODULE_STRATEGY anymore
We don't use submodules anymore, so no point configuring the submodule
strategy to use.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3353>
2024-05-31 00:29:09 +02:00
Jonas Ådahl
5649ad6752 Switch to fetching gvc via a meson subproject
Hopefully this will avoid the accidental subprojects/gvc changes.

Developers need to switch from doing

    git submodule update

to

    meson subprojects update

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3353>
2024-05-31 00:29:09 +02:00
Leleat
0f30bfdd53 dbusServices/extensions: Await prefs.fillPreferencesWindow
There are cases where it makes sense to have fillPreferencesWindow be
async, so await it. One such case is when using .ui files from resources
with (GTK) templates. When extension developers load the resource in
`fillPreferencesWindow` and then import the js file that registers the
classes, there will be an error at the moment that there is no UI
provided. Similarly, make getPreferencesWidget async optionally.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3348>
2024-05-28 18:43:53 +00:00
Philip Withnall
8176d6b51c messageTray: Ensure _updateDatetimeId idle callback is cancelled
If the idle callback is not explicitly removed when the notification is
destroyed, it may be invoked after destruction, and try to modify the
notification after it’s been freed.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3352>
2024-05-28 18:06:32 +00:00
Philip Withnall
37e49e8a22 shell-camera-monitor: Fix warning about strict aliasing
Changing type when casting a double pointer is not strictly allowed in
C. In order to fix compilation with `-fstrict-aliasing`, don’t use
`g_clear_pointer()` for clearing this pointer where the type expected by
the destroy notify function does not match the type stored in the
`ShellCameraMonitor` struct.

This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3351>
2024-05-28 17:39:46 +00:00
Mister Smör
245d55488b docs: Fix typo in link to meta-docs
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3349>
2024-05-28 17:31:15 +00:00
Florian Müllner
d99a1d5457 ci: Bump ci-fairy template
The new version allows @users.noreply email addresses by default,
which seems like something we should allow at least for small
drive-by contributions.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3350>
2024-05-28 16:52:10 +00:00
Hugo Carvalho
80961f9af2 Update Portuguese translation 2024-05-28 09:13:00 +00:00
Jose Riha
350f688825 Update Slovak translation
(cherry picked from commit 5c2f9fd94883cf37af4117ad75823f7b76366736)
2024-05-27 20:45:12 +00:00
Artur S0
6814e7ecfb Update Russian translation 2024-05-27 10:22:50 +00:00
Georges Basile Stavracas Neto
4e449536f8 st/scroll-view-fade: Cleanup unecessary vfunc override
It does exactly what ClutterOffscreenEffect does these days.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3347>
2024-05-26 15:55:56 +02:00
Bilal Elmoussaoui
37fd461759 build: Make use of the x11 dependency
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3344>
2024-05-25 10:29:28 +02:00
Bilal Elmoussaoui
c0c4572ed5 build: Remove unnused dependencies
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3344>
2024-05-25 10:28:51 +02:00
Marco Trevisan (Treviño)
64edd7940d js/environment: Always use Shell.util_spawn_async functions if possible
If no child setup is provided then all the shell extensions that use
GLib.spawn_async should actually use the shell spawning utils since we
are supposed to always restore the default nofile rlimit on launched
children.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3293>
2024-05-24 22:48:53 +00:00
Marco Trevisan (Treviño)
494be30764 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>
2024-05-24 22:48:53 +00:00
Marco Trevisan (Treviño)
26e8fb90fb 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>
2024-05-24 22:48:53 +00:00
Marco Trevisan (Treviño)
781010be66 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>
2024-05-24 22:48:53 +00:00
Marco Trevisan (Treviño)
dcb5956dea 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>
2024-05-24 22:48:53 +00:00
Florian Müllner
1fbfb93cbd 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>
2024-05-24 21:42:01 +00:00
Florian Müllner
27445a1c98 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>
2024-05-24 21:42:01 +00:00
Bilal Elmoussaoui
e6618d093d window/menu: Remove move titlebar onscreen action
A feature that works for server side decorated windows only that
only adds slightly more convenience over the regular "move" action that
is still there.
Keeping it around would complicate some cleanups in upstream Mutter
so just drop it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3332>
2024-05-24 15:21:03 +02:00
Michael Evans
f30ffc7f76 keyboard: Add za-extended keyboard layout
Adds an extended variant of the za keyboard layout based on the za.json
and us-extended.json layouts.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3309>
2024-05-23 15:06:17 +00:00
Sebastian Keller
559d38c259 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>
2024-05-22 19:02:42 +00:00
Sebastian Keller
e2adc5a445 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>
2024-05-22 19:02:42 +00:00
Sebastian Keller
31997fa2f9 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>
2024-05-22 19:02:42 +00:00
Florian Müllner
0d3c298c70 ci: Bump mutter image
Mutter bumped its wayland-protocols dependency, so update the
image to pull it in.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3337>
2024-05-22 20:53:42 +02:00
Florian Müllner
6fa6dd6abb 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>
2024-05-22 12:02:00 +00:00
Florian Müllner
2694a64ebb 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>
2024-05-22 12:02:00 +00:00
Florian Müllner
e7dc0de75e 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>
2024-05-22 10:11:00 +00:00
Florian Müllner
dac4f2cb86 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>
2024-05-22 10:11:00 +00:00
Florian Müllner
cf1159e6c0 tests: Remove assertArraysEqual()
It is tied to the legacy jsUnit framework and now unused.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:29 +00:00
Florian Müllner
162c9f0056 tests: Port GNOMEversionCompare() test to jasmine
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Florian Müllner
41aa44707a tests: Port findUrl() test to jasmine
Based on https://bugzilla.gnome.org/show_bug.cgi?id=783738
from Sam Spilsbury.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Florian Müllner
8345047c24 tests: Port signalTracker test to jasmine
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Florian Müllner
d4ecb0986b tests: Port Params.parse() test to jasmine
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Florian Müllner
847b927367 tests: Port fixMarkup() test to jasmine
Based on https://bugzilla.gnome.org/show_bug.cgi?id=783738
from Sam Spilsbury.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Florian Müllner
ab4ca87ee9 tests: Port jsParse test to jasmine
Based on https://bugzilla.gnome.org/show_bug.cgi?id=783738
from Sam Spilsbury.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Florian Müllner
40750f5849 tests: Port insertSorted() test to jasmine
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Florian Müllner
d62146bc19 tests: Port InjectionManager test to jasmine
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Florian Müllner
9315d42dd6 tests: Port Highlighter test to jasmine
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Florian Müllner
ea4f859547 tools/toolbox: Include subprojects in meson-build --dist
The main use of the --dist flag is as a fallback when the CI
dist job doesn't work for some reason. The gnome-shell tarball
now needs the --include-subprojects flag, and it doesn't hurt
for mutter/gnome-shell-extensions, so just add it when --dist
is specified.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Florian Müllner
372dfc5f75 ci: Include subprojects in tarball
jasmine-gjs isn't widely available in distributions, so instead
of adding an obscure build dependency, include the subproject
in the tarball.

The --include-subprojects flag only applies to subprojects that
are used in the build, so we do not bundle gi-docgen that is
provided in the mutter image.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Florian Müllner
151e2faa0f build: Set up jasmine for unit testing
Jasmine[0] is a popular testing framework for javascript, which
gjs itself has used in a heavily customized form for its own
unit tests for years.

It's far superior to the very rudimentary `jsUnit` module that
is still included with gjs, and the jasmine-gjs project provides
a general-purpose wrapper for gjs apps.

Set up the necessary build infrastructure to run unit tests
through jasmine. That allows for existing unit tests to be
ported one-by-one.

[0] https://jasmine.github.io/index.html

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Florian Müllner
1fcdc60ca0 tests: Drop wrapper script for unit test runner
We build a small run-js-test executable so tests run in a
similar environment as gnome-shell, and then wrap it with
a generated script that provides environment variables like
GI_TYPELIB_PATH.

This is more complicated than it needs to be, we can just as
well set up the typelib search path from the runner and pass
in the environment via meson.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Sam Spilsbury
3d9c40783f util: Implement fixMarkup in util as opposed to messageList
We want to be able to import it in the markup unit test without
bringing in a UI dependency.

https://bugzilla.gnome.org/show_bug.cgi?id=783738

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Sam Spilsbury
4711f6eee4 util: Import notifyError dynamically when needed
For unit tests, it is best not to pull in UI related code.

https://bugzilla.gnome.org/show_bug.cgi?id=783738

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Sam Hewitt
6fd0aac864 slider: Remove border drawing code add hover style
- remove all the border drawing on sliders since they are unused
- listen for hover and add hover style

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6274
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3320>
2024-05-21 13:10:49 +00:00
Sam Hewitt
43596ffca6 popupMenu: Use selected pseudoclass instead of class
- drop :focus from menuitem drawing
- update menuitem drawing function to style :selected

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7637
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3314>
2024-05-21 12:49:32 +00:00
segfault
9e6552a20d 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>
2024-05-21 12:32:38 +00:00