When resolving an icon name, we currently look in all themes in
order whether one of the requested names matches.
That means, a "keyboard" icon from the configured theme will
trump over any of "keyboard-shift", "keyboard-brightness" and
"keyboard-preferences" from lower-ranked themes (like "Adwaita"
and "hicolor").
That applies to custom icons we include in the resource, which
are added to the fallback ("hicolor") theme.
We are less bound by the named-icons spec than GTK, so we can
adapt the lookup to prefer the most accurate match to matches
from the highest priority theme.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2824>
The eslint jobs report their results as artifacts in junit format,
so that gitlab can present them in its UI.
However many people miss that, and unsuccessfully check the logs
instead.
Account for that by also printing the results to stdout.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2829>
console.log() is implemented with structured logging, and as we
set an appropriate log domain, it's identical to the custom function
bar the custom fields with extension data.
Few people know about those custom fields, and adding them comes
at a cost, as we end up producing and parsing a stacktrace on
every log() call.
It therefore seems appropriate to drop the custom function, and
turn the global log() symbol into a simple convenience alias for
console.log().
If it turns out that people do miss the custom fields, we can add
an alternative to ExtensionUtils.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2830>
`toLocaleFormat` is now `formatDateWithCFormatString` and formatTime and
formatTimeSpan are moved into dateUtils.
Instead of overriding system.clearDateCaches, add a helper in dateUtils.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2827>
Now that scripts are loaded as external modules, there's no reason
anymore for bundling them with the gnome-shell executable. Just
move the scripts into a dedicated folder in tests/ and run them
from there.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2812>
The purpose of the tool has shifted from running a limited set
of performance tests repeatedly to collect performance data
and catch regressions, to a wrapper that drives gnome-shell via
scripts for tests.
With that, the concept of a "default" script doesn't really make
sense anymore.
Instead, turn the argument from an optional flag into a required
parameter. This will allow us to stop bundling the existing tests
in a follow-up commit.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2812>
The original purpose of the tool was to collect performance data
that would optionally be uploaded to a server in Owen's living
room. While the corresponding scripts are still included (although
the server was probably dismantled years ago), the tool is mainly
used for running gnome-shell with scripted tests nowadays.
Rename the tool to reflect that.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2812>
Environment variables aren't the best option to pass parameters
to a process (wouldn't it be "fun" if SHELL_PERF_MODULE appeared
in a regular user session?).
Instead, use a (hidden) --automation-script command line flag to
specify a script file that should be used to drive an automated
session.
As a side effect, the script no longer has to be relative to the
main module itself, so it will be possible to run scripts that
aren't bundled with the shell sources.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2812>
The perf scripts that can be used to script the gnome-shell UI
for testing are sufficiently separate from the rest of the code
base to allow porting them to ESM modules before the rest of
the code base.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2812>
We currently only find a matching ref on the same remote in
a merge request pipeline, but not in branch pipelines.
It can occasionally be useful to run a pipeline without opening
a merge request, so try the same remote here as well instead of
just assuming origin.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2814>
The file indicates to the systemd shutdown scripts that extensions
should be disabled, so that extensions that crash the shell on
startup cannot lock out the user indefinitely.
For that purpose, we create the file before initializing extensions,
and remove it after 60 seconds. That generally works, because it's
highly unlikely that a session genuinely ends within the first minute.
It's possible though (for example during developments or when running
tests), so also remove the file when shutting down cleanly before
the timeout.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2807>
Now that extensions themselves are imported as modules, do the
same for their preference dialogs.
Extensions must now export a class with a `fillPreferencesWindow()`
method as default.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2795>
Continue the move to ESM by loading modules dynamically with
the standard import() expression, rather than by installing a
custom (legacy) importer.
This is a breaking change that affects all extensions, as they
now need to explicitly export the expected symbols.
As we are already breaking all extensions, take that opportunity
and remove support for the individual entry points: Using a
class with enable()/disable() methods has been the recommended
pattern for a long time, it is now the only entry point.
Instead of instantiating the class from an `init()` function,
the class must now be exported as default to be recognized.
Additionally, we no longer install an importer on the extension
object, so extensions that consist of more than one file MUST
import those files as modules now.
There will be a second breaking change for extensions when
gnome-shell's own code is ported to ESM, so most extension
developers will likely want to wait until the port is complete
before starting to port their extensions.
Based on a commit from Evan Welsh.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2795>
When using fractional scaling, the size of the loaded image with
applied scaling may still differ from the displayed size. This
is currently addressed by syncing the size of all slice actors
in the (probably only) caller.
Instead, set the actors to fill their parent automatically.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2798>
The tests rely on the ability to run Clutter as stand-alone app,
which hasn't been possible for quite a while now. Event handling
was broken long before that, plus tests that need a human to run
them and evaluate the result aren't that useful to begin with.
It would be neat to test our CSS rendering by setting up a stage,
capturing it and comparing it to a reference image. But writing
some code that exercises backgrounds, borders etc. is hardly the
obstacle to make that happen, and not worth carrying around dead
code.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2811>
This was necessary after mutter configured a non-root user
for the image, although as it turned out not sufficient.
The latest image no longer sets up a special user, so building
the toolbox image should work again as before.
This reverts commit ee384d85da.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2813>
The keybinding is a direct, less commonly used alternative to
stand-alone 'super'. While it can be useful to have a regular
keybinding alternative - although 'super+alt+up' also provides
that to some extent - most users probably don't even know about
it's existence.
It is therefore less justified to take away a valuable shortcut
slot, so stop assigning a default shortcut to free 'super+s' for
other actions.
Users who do use the keybinding can still use Settings to assign
a shortcut.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5670
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2716>
If gjs itself defines ARGV, it only holds the arguments that are
passed on to the script, and javascript code should combine the
programName and ARGV (or the newer programArgs) when it needs a
C-style argv array.
Do the same in the portal-helper process instead of passing along
the original C argv, to avoid confusion when accessing the arguments
from javascript.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2786>
We want to replace gjs' custom (and now legacy) imports system
with standard EcmaScript modules: JS developers are already
familiar with them, they have better tooling support and using
standard features over non-standard ones is generally the right
thing to do.
Our D-Bus services are separate from the main process, and thus
can be ported separately (except for the few imports that are
shared with the main process' code base).
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2786>
- spin out all the panel button styling into a drawing mixin
- clean up the styles generally
- make special cases for the clock and non-flat buttons
- contrast fixes for non-flat buttons, fixes#6768
- new stop icon for the screen recording/cast indicators
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2804>
GTK 4.12 deprecates gdk_wayland_toplevel_unexport_handle() in favor
of the new gdk_wayland_toplevel_drop_exported_handle(). We are not
bound by API stability, so we can just expose the additional argument
that the replacement requires instead of tracking the handle
internally.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2778>