Commit Graph

17323 Commits

Author SHA1 Message Date
Jonas Ådahl
08d4addeef shell-global: Add 'force-animations' property
Set via a command line argument to gnome-shell. Will allow enabling
animations despite e.g. lack of hardware acceleration otherwise
inhibiting it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2560>
2022-11-29 17:52:56 +01:00
Jonas Ådahl
5bb9843217 ui/main: Don't show welcome screen or root warning with perf tests
If we want to run with the welcome screen showing, it should be done so
explicitly. Hide it if there is a perf test running for now, so that
what we test is what is expected to be tested.

We also don't want to show the root user warning, since we'll be running
as root in the CI containers.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2560>
2022-11-29 17:48:20 +01:00
Jakub Steiner
5aa95007de styling: Don't switch app icons to symbolic for HC
While it's true that white against black has the ultimate contrast, the
  decision to switch fullcolor icons to symbolic has a few negative implications:

    * Apps identities usually lean onto colors, switching to white symbolic
      suddenly makes it harder to identify an app.
    * Many 3rd party apps don't ship a symbolic icon making the experience feel
      unpolished/"under construction".
    * Behavior is inconsistent with gtk/libadwaita.

Part of the HC polish initiative -- https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5799

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6136

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2555>
2022-11-28 14:12:33 +00:00
Florian Müllner
1b62b7ea0a status/volume: Clear device menus when unsetting stream
Otherwise we end up accumulating devices when pipewire crashes or
is restarted.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2558>
2022-11-28 00:00:21 +00:00
Vasil Pupkin
e752aa75fc Update Belarusian translation 2022-11-27 21:25:09 +00:00
Jonas Ådahl
207b9bb3c0 tests: Fail on warnings too
Getting warnings are always bad and means something is broken, we
shouldn't pass the test suite with them.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:10:27 +01:00
Jonas Ådahl
a13a2dca66 perf-tool: Add --wrap to wrap the gnome-shell call
This allows neat tricks like first arranging the script `fakegdb`:

```sh

function ignore_gdb_arg() {
    if [[ "$1" == "--quiet" ]] || [[ "$1" == "--args" ]]; then
	    return 1
    else
	    return 0
    fi
}

ignore_gdb_arg "$1" || shift
ignore_gdb_arg "$1" || shift

echo exec "$@"
```

then running

```sh
meson test -C build -v perf-basic --test-args '--wrap "gdb --args"' --gdb --gdb-path `which fakegdb`
```

To make it possible to run the perf test case with gdb running the
actual gnome-shell.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:54 +01:00
Jonas Ådahl
4c6bc1ed00 perf-tool: Port to argparse
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:54 +01:00
Jonas Ådahl
f4934c0421 tests/perf: Use custom solid background in tests
They don't measure performance, and we don't want to have to install
gnome-backgrounds, so bundle a solid color background image to use
instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:54 +01:00
Jonas Ådahl
bcc4d15fdf tests: Add test running basic perf test
This test runs all of GNOME Shell using the headless backend inside a
mocked D-Bus environment. The basic test tests, well, basic things, like
the panel menu, the overview, showing the app grid view, as well as
going back to the session view.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:53 +01:00
Jonas Ådahl
4c10608451 ci: Bump ci image
The new one includes a newer python-dbusmock.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
2ca6e2e7e8 shell/window-tracker: Disassociate windows on shutdown
This avoids trying to deal with handling windows being unmanaged one by
one after we destroyed the ShellGlobal.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
210754f1e9 st/widget: Remove transitions when unmapped
This avoids having animating timelines on invisible and detached actors.
This also silences some warnings about the timeline being running
without being attached to the stage.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
e62eae74fd searchController: Use connectObject for the stage key focus signal
This ensures it's properly disconnected on shutdown.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
9bc89b821c main: Prepend RPATH or RUNPATH paths to gir search paths
If one wants to run tests the non-installed gnome-shell, that currently
fails as gnome-shell the executable attempts to link against
./build/src/libgnome-shell.so, but when GObject introspection tries to
find what library to link to for Shell, it goes to the installed
libgnome-shell.so, causing two different versions of libgnome-shell.so
to be loaded.

This, however, can be avoided thanks to meson adding $ORIGIN paths to
relevant libraries before installing an executable. What this means in
practice is that we can inspect ourself upon startup, discover whether
the RPATH/RUNPATH header contains $ORIGIN, and if so, expand it to the
directory containing the executable, and prepend the introspection
search paths with said directory.

This effectively means that the introspection machinery now finds the
same library that the linker linked the gnome-shell executable with,
making it run successfully.

It's not possible to use $GI_TYPELIB_PATH since
g_irepository_prepend_library_path() takes precedence. There is no
"append" variant of that API.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
1559f03a82 main: Tear down the gjs context before the mutter context
Tearing down gjs means that we won't have any dangling references kept
alive by GC or otherwise alive Javascript objects, when we finally tear
down the mutter context. This allows for a clean shutdown of GNOME
Shell.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
f2ca53b9e0 layout: Destroy non-adopted uiGroup actors
Move back actors that were adopted from mutter (window_group,
top_window_group, the feedback group) from the uiGroup to the stage, and
then destroy the uiGroup. This will tear down more or less all of GNOME
Shells actors gracefully.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
411360cd1b signalTracker: Clear all signal trackers on shutdown
This avoids a lot of otherwise invalid signal handler invokations if we
would later attempt to terminate the gjs and mutter context.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
f6a5093c09 main: Notify about shutdown before tearing down
This will allow the shell to tear things down more gracefully.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
009da0df64 shell-global: Get backend from context
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
f171f92522 shell-global: Add MetaContext getter
Start to use it instead of using g_object_get().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
367d40d31b appDisplay: Don't have goToPage clamp to negative page index
The nPages property can be 0, which is the case in a stripped down CI
image without a single app to be listed, which means we can't clamp to
`nPages - 1`, since that'll give us a negative index and the following
error:

(gnome-shell:266): Gjs-CRITICAL **: 16:48:56.633: JS ERROR: Error: Page -2 does not exist at IconGrid
getItemsAtPage@resource:///org/gnome/shell/ui/iconGrid.js:1383:19
_translatePreviousPageIcons@resource:///org/gnome/shell/ui/appDisplay.js:323:34
_syncPageIndicators@resource:///org/gnome/shell/ui/appDisplay.js:396:14
goToPage@resource:///org/gnome/shell/ui/appDisplay.js:445:14
goToPage@resource:///org/gnome/shell/ui/appDisplay.js:1236:29
goToPage@resource:///org/gnome/shell/ui/appDisplay.js:1582:15
_init/<@resource:///org/gnome/shell/ui/appDisplay.js:499:18
_init/pagesChangedId<@resource:///org/gnome/shell/ui/iconGrid.js:1137:24
_removePage@resource:///org/gnome/shell/ui/iconGrid.js:454:14
_removeItemData@resource:///org/gnome/shell/ui/iconGrid.js:495:18
moveItem@resource:///org/gnome/shell/ui/iconGrid.js:854:14
moveItem@resource:///org/gnome/shell/ui/iconGrid.js:1277:29
_moveItem@resource:///org/gnome/shell/ui/appDisplay.js:1194:20
_redisplay/<@resource:///org/gnome/shell/ui/appDisplay.js:1085:22
_redisplay@resource:///org/gnome/shell/ui/appDisplay.js:1080:17
_redisplay@resource:///org/gnome/shell/ui/appDisplay.js:1370:15
_init/<@resource:///org/gnome/shell/ui/appDisplay.js:633:24
_initializeManager@resource:///org/gnome/shell/misc/parentalControlsManager.js:95:14
async*_init@resource:///org/gnome/shell/misc/parentalControlsManager.js:63:14
ParentalControlsManager@resource:///org/gnome/shell/misc/parentalControlsManager.js:55:4
getDefault@resource:///org/gnome/shell/misc/parentalControlsManager.js:42:22
start@resource:///org/gnome/shell/ui/main.js:184:29
@resource:///org/gnome/shell/ui/init.js:6:17

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
fa47a7576d calendar: Unbind settings when destroying
Running dispose on the setting causes issues when we're being destroyed,
as the signal handler in the GSettings binding will be cleared by the
GObject itself before it has the chance, resulting in warnings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
7f4db052a0 dialog: Remove incorrect disconnectObject()
It was added, as there was a previous signal disconnect in this
function, but it happened to be dead code, and the disconnectObject()
call was added in error. Remove it.

Fixes: 26235bbe54
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
c628b9f6bc tests: Add dbus runner
This adds a dbus-runner ala meta-dbus-runner.py. It extends the one used
in mutter, and adds various mocked services needed by gnome-shell.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
65a6ceddca tests: Add accounts_service mock service
This is a shrunk copy of the accounts_service.py service previously
found in upstream python-dbusmock. It also adds parental control
properties to make GNOME Shell happy.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
a071d9e009 scripting: Terminate using meta_context_terminate()
With meta_exit() we bypass the tear down procedures, making the test
case excercising much less code paths. Use meta_context_terminate()
instead, as that exits the main loop and goes through proper shutdown.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
67d965d560 scripting: Exit helper after running test
This avoids the helper process exiting with an error due to a broken
pipe.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
6fc538b7f7 perf/basic: Toggle quick settings instead of old menu
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
13ac25b0c5 perf-tool: Add --headless
This will use the headless mode of the native backend, and create a
1280x720 virtual monitor, for running the perf test in.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
b56f853103 perf-tool: Only 'restore' gnome-shell if run with --replace
Otherwise the perf tool will fork and spawn a gnome-shell process
that'll just go and fail.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Jonas Ådahl
faff190364 perf/basic: Add some helpful logging
This is purely to see that things are happening when running this test.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
2022-11-25 22:09:37 +01:00
Alessandro Bono
cf47b4a347 overview: Start animation after setting coverPane initial state
Since commit 7bd98f3f5f the onComplete callback
is called right away when animations are disabled. As side effect, now
this._coverPane gets shown/hidden in the wrong order. Start the animation after
setting this._coverPane initial state, so that the animation callback can set the
this._coverPane final state without it being overwritten later.

Move the animation also after emitting the showing and hiding signals. So that the
order showing -> shown and hiding -> hidden is still preserved when animations are
disabled.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6096
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2532>
2022-11-25 15:19:37 +00:00
Alessandro Bono
f23ca85f79 overview: Make preparation to enter/leave overview explicit
This give us more control on when the preparation happens and will be
used in the subsequent commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2532>
2022-11-25 15:19:37 +00:00
Alessandro Bono
b8b8919563 overviewControls: Group prepare to enter/leave overview code
Move preparation code into their own functions. These functions will be used
in order to separate the animation control into two steps.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2532>
2022-11-25 15:19:37 +00:00
Roshan-R
63904a09bf keyboard: Change osk menu entry to control-center keyboard pane
Currenty, the osk settings popup has the menu entry of "Region and
Language settings" which should be changed to the "Keyboard" pane
instead as input source configuration is done there.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2554>
2022-11-24 13:49:55 +01:00
Sam Hewitt
aafa011f2b style: High Contrast improvments
- rework the entry style to work in both hc and normal
- rework drawing functions to accommodate hc
- buttons all get borders under hc now
- window picker titles are more legible
- alt+tab switcher tiles are visible
- dash is made more visible under hc
- popover menus are all more visible under hc
- search results borders are improved
- calendar days have a different look under hc
- overview bg is completely black in hc

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2527>
2022-11-24 09:54:02 +00:00
Dušan Kazik
c998e4a123 Update Slovak translation
(cherry picked from commit e68d987d9a9a54a47cdd88b00ca58640de4a9336)
2022-11-22 22:09:05 +00:00
Florian Müllner
a4e2d708e5 overview: Don't block on wayland popovers
We don't allow entering the overview when there's an ongoing grab
operation, as they are generally incompatible with ClutterGrab.

The exception are wayland popups which are expected to work, and
don't conflict with ClutterGrabs.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2549>
2022-11-20 20:49:21 +00:00
Florian Müllner
b0befbbfbb inhibitShorcutsDialog: Fix permission check
Each permission entry is an array of strings, so checking that against
the expected string itself will always fail.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2548>
2022-11-19 00:48:25 +00:00
Alessandro Bono
39263d3530 accessDialog: Change fallback button labels
All the new portals dialog mockups have "Deny/Allow" buttons. Rename them.

https://gitlab.gnome.org/Teams/Design/os-mockups/-/blob/master/portals/portals.png

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2544>
2022-11-19 00:42:26 +00:00
Florian Müllner
d0740d605e status/remoteAccess: Don't override existing style classes
The indicator needs special styling for the color, but we still
want it to pick shared 'system-status-icon' styling like the
icon size.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2547>
2022-11-18 18:50:43 +01:00
Florian Müllner
a9e7dfe8fa data: Remove unused overrides schema
The old custom overrides mechanism was superseded by
session-specific defaults back in 2018. By now any
potential consumers (like gnome-tweaks) should have
adjusted, so time to remove it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2517>
2022-11-18 14:48:03 +00:00
Florian Müllner
990cdbd134 layout: Initialize regions unconditionally
We currently initialize regions in all code paths except for the
greeter. But while there are no windows on the login screen, the
work area can still be used for positioning, for example for
notifications.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2546>
2022-11-18 13:16:06 +00:00
Florian Müllner
14f061ffab status/network: Fix handling portal result
Commit 637ee7386e accidentally dropped all parameters from the
method invocation when changing a .bind() handler to an arrow
function.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2545>
2022-11-17 22:05:52 +01:00
Florian Müllner
b2ff25b31d status/network: Fix name of initially hidden devices
We assign (disambiguated) device names every time a device is added
or removed, and store the name on the corresponding menu item.

However menu items are only created when the device should be shown,
not necessarily when it is added (unplugged ethernet cable, ongoing
initialization, ...).

Fix this by tracking device names separately from device items, and
set the name on newly created items.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2529>
2022-11-17 11:09:27 +00:00
Carlos Garnacho
a33e3eaf22 keyboard: Ensure completion is disabled when OSK is destroyed
If the OSK is destroyed while visible without being close()'d first,
the completion mode might remain turned on. Ensure it is turned off
on OSK destruction so that typing-booster has no chance to remain
turned on.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2543>
2022-11-16 18:06:27 +00:00
Carlos Garnacho
52253625b8 keyboard: Disconnect from InputMethod::terminal-mode-changed on destruction
The OSK may be created and destroyed, while it connects to signals from the
longer-lived InputMethod object. This makes these signals linger and issue
copious warnings while trying to change the extended keymap and new ratio
on a defunct OSK.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6085
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2543>
2022-11-16 18:06:27 +00:00
Carlos Garnacho
a0352ba312 keyboard: Bind emoji pager visibility to swipeTracker enabled state
The swipeTracker may connect gestures on the stage, so we might end up
in the odd situation that the swipeTracker is handling events for an
invisible actor. Avoid doing this.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2543>
2022-11-16 18:06:27 +00:00
Carlos Garnacho
7e4f7c7e5b keyboard: Explicitly destroy swipeTracker after emoji panel destruction
Even though the emoji panel may be destroyed with the OSK, the swipeTracker
that is set up to navigate between pages is left lingering, and handling
events for some gestures in the stage. This results in warnings like:

  JS ERROR: TypeError: this._panel is null
  set delta@resource:///org/gnome/shell/ui/keyboard.js:720:9
  _onSwipeUpdate@resource:///org/gnome/shell/ui/keyboard.js:750:22
  _updateGesture@resource:///org/gnome/shell/ui/swipeTracker.js:670:14
  vfunc_gesture_progress@resource:///org/gnome/shell/ui/swipeTracker.js:288>

on touch interaction after the OSK was shown and dismissed. In order to fix
this, issue explicit destruction of the swipeTracker when the emoji pager
actor is destroyed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2543>
2022-11-16 18:06:27 +00:00