Commit Graph

8722 Commits

Author SHA1 Message Date
Florian Müllner
209d8c7f10 workspaceSwitcherPopup: Drop direction parameter
The original popup included arrows that indicated the direction of
the switch. We stopped doing that a long time ago, and ever since
the popup has only indicated active vs. non-active workspaces.

Simplify both the API and style to reflect that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2127>
2022-02-12 15:28:52 +00:00
Florian Müllner
3e8fd65045 osdWindow: Implement new OSD design
Switch to a horizontal layout, use smaller icons and move
the OSD to the bottom of the screen.

https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/152

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2127>
2022-02-12 15:28:52 +00:00
Florian Müllner
5135af0750 osdWindow: Don't inherit from St.Widget
We don't apply any styling to the toplevel OSD actor, so we can just
as well avoid the style machinery and use a plain actor.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2127>
2022-02-12 15:28:52 +00:00
Ivan Molodetskikh
2949244d72 status/remote-access: Don't show recording icon for screenshot UI casts
If there's only a single recording and it is the screenshot UI
recording, don't show the icon, because it's already displayed by the
new panel.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2163>
2022-02-12 14:36:54 +00:00
Ivan Molodetskikh
144acb1d02 status/remote-access: Remove menu for stopping screencasts
It is now handled by a dedicated panel.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2163>
2022-02-12 14:36:54 +00:00
Ivan Molodetskikh
6ec8480052 panel: Add a screen recording indicator
The indicator shows the recording duration and lets the user stop it on
click. It is more discoverable than the stop entry in the aggregate
menu.

The class extends ButtonBox directly rather than Button because Button
does nothing that it uses, and actually causes issues with its dummy
menu (its vfunc_hide() throws an "open-state-changed: Error: incorrect
pop").

The menu-set signal declaration is required by the panel.

The screencast is stopped upon button press in vfunc_event(), which
matches PanelMenu.Button's input handling.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2163>
2022-02-12 14:36:54 +00:00
Ivan Molodetskikh
33cf163f95 main: Move screenshotUI initialization earlier
A new screen recording panel indicator will connect to its signal, so it
needs to be initialized before the panel.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2163>
2022-02-12 14:36:54 +00:00
Alexander Mikhaylenko
348fcdaa77 background: Handle errors when loading wallpapers
Since it happens while setting up the startup animation, we will get stuck
inside that animation and block input if it fails.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2176>
2022-02-12 14:31:10 +00:00
Ivan Molodetskikh
1272ce37a7 Add new screenshot UI icons
To replace the applets-screenshooter one that was deprecated and isn't
even available on GNOME OS anymore.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2167>
2022-02-12 14:08:01 +00:00
Björn Daase
528ee01fef dateMenu: Replace ellipsis with full sentences
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2108>
2022-02-12 14:15:21 +01:00
Florian Müllner
a1dd1b25d8 js: Use templates for non-translatable strings
This reverts commit 9d941f8202 and replaces all additional
instances of .format() that have been added since.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2160>
2022-02-12 12:29:52 +00:00
Florian Müllner
29dfde5a4a js: Reindent some code
... to make sure it conforms to the non-legacy style
before touching it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2160>
2022-02-12 12:29:52 +00:00
Florian Müllner
615155f424 ibusManager: Fix version in log message
Whoops, we the log message complaints about minor.minor instead
of minor.micro.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2160>
2022-02-12 12:29:52 +00:00
Ivan Molodetskikh
a9fbee05b1 screenshot-ui: Add a key to open the screencast UI
It replaces the "record a short screencast" key from g-s-d.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2107>
2022-02-12 12:13:22 +00:00
Ivan Molodetskikh
b757f165a3 screenshot-ui: Add mode argument to open()
In a subsequent commit we will add a function to open the screenshot UI
in the screencast mode. This argument will allow us to do that without
resorting to accessing private fields from the outside.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2107>
2022-02-12 12:13:22 +00:00
Ivan Molodetskikh
6d3dd232ad screenshot: Connect shot/cast toggle with bind_property
This way we don't need to uncheck the other button manually, and it also
allows switching the mode by setting the other button's checked to
false, and not just by setting the target mode's button to true. An
example clean-up can be seen in the "V" key handler.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2107>
2022-02-12 12:13:22 +00:00
Ivan Molodetskikh
b0ebbb00b8 screenshot-ui: Add two key bindings from g-s-d
These two are moving into gnome-shell to unify screenshot handling and
allow for same-frame capturing.

While we're at it, move the keybindings .xml file from g-c-c here
because it belongs to gnome-shell.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2107>
2022-02-12 12:13:22 +00:00
Ivan Molodetskikh
414592acf9 screenshot-ui: Extract binding modes
We will re-use the same modes for more bindings in subsequent commits.
Also, while we're at it, invert the modes, to emphasize where the
screenshot UI cannot be used, rather than where it can be used.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2107>
2022-02-12 12:13:22 +00:00
Ivan Molodetskikh
84cfab2119 windowMenu: Add an entry to take a screenshot
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2105>
2022-02-12 00:20:54 +00:00
Ivan Molodetskikh
b2fd93f3da screenshot: Make captureScreenshot async
Now that it's split out and has no implicit arguments we can convert it
to be a proper async function.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2105>
2022-02-12 00:20:54 +00:00
Ivan Molodetskikh
907377ec40 screenshot-ui: Split out captureScreenshot()
It will be used for the window right-click menu and for handling keys
that are moving here from g-s-d.

Lockdown settings are also moving into the split _storeScreenshot() as
that is the only place where they are used.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2105>
2022-02-12 00:20:54 +00:00
Carlos Garnacho
c12f085530 ibusManager: Check existence of IBus systemd units before manual start
IBus is moving to being a systemd managed service in GNOME sessions
(see https://github.com/ibus/ibus/pull/2377). Since there will be a
transition period, and we still have to support non-systemd sessions,
check for this existence at runtime.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2171>
2022-02-11 23:51:24 +00:00
Sam Hewitt
4b56acb775 calendarMenu: Fix several visual issues with calendar and notifications
- drop card style from calendar
- remove focus ability from non-interactive calendar elements
- flesh out the styles for the calendar grid
- fix margin and padding issue with login screen calendar
- update no-notifications icon
- add padding to media player buttons
- catch a couple other minor style papercuts

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2161>
2022-02-11 23:23:05 +00:00
Florian Müllner
57b819ae2d calendar: Reindent code
We are about to touch some code that still uses the legacy indentation
style.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2161>
2022-02-11 23:23:05 +00:00
Alexander Mikhaylenko
de485c8f47 shellDBus: Add ScreenTransition()
Settings will use this when switching between light and dark styles.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2070>
2022-02-12 02:54:57 +05:00
Alexander Mikhaylenko
03e307f328 Revert "background: Mark pattern backgrounds as loaded"
This reverts commit fdac0602db.

The commit was fixing a crash, which cannot longer be reproduced, but also
introduced a noticeable white flash when switching wallpapers. This will
become even more noticeable when we try to uniformly transition the whole
screen.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2070>
2022-02-12 02:54:01 +05:00
Alexander Mikhaylenko
ad830fad1e network: Update Settings appid
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2175>
2022-02-11 17:33:34 +00:00
Alexander Mikhaylenko
07f28ceb39 shellDBus: Update Settings appid
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2175>
2022-02-11 17:33:34 +00:00
Florian Müllner
5442266f28 js: Simplify promisify() calls
If the finish function isn't specified, promisify will now try
to use the async name without '_async'/'_begin' suffix (if any)
and '_finish' appended.

Everything except IBus uses a variation of that pattern, so there's
quite a bit of boilerplate we get to remove…

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2174>
2022-02-11 16:24:01 +00:00
Florian Müllner
928f3288e9 js: Stop using Gio._LocalFilePrototype
gjs now supports overriding interface methods, so promisify()
works on Gio.File itself, not just the LocalFilePrototype cludge.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2174>
2022-02-11 16:24:01 +00:00
Razze
55a37ac992 Let users use the other mouse button to switch
As users can have different primary mouse buttons (left vs right) it
might happen, that a user with a different
preference wants to switch. Currently they need
to use the mouse button, that the current
user prefers.

This change enables users to use either the left or right button.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1972>
2022-02-11 12:33:25 +00:00
Florian Müllner
78c7d5ba0c status/location: Track enabled state
More fallout from commit e3a1d84992: We are tracking the agent's
:max-accuracy-level property that we don't use, but not :enabled.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2170>
2022-02-10 13:19:57 +00:00
Florian Müllner
5628849a40 status/location: Use correct enabled state
Commit e3a1d84992 split out the agent from the indicator, but kept
using a local 'enabled' property with no connection at all to the
actual state.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2170>
2022-02-10 13:19:57 +00:00
Florian Müllner
d7d484a8cd dbusServices: Allow to persist services via environment
Auto-shutdown prevents debugging a service with tools like
d-feet, so allow turning it off with an environment variable.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2169>
2022-02-10 13:14:45 +00:00
Carlos Garnacho
c13d44439f popupMenu: Avoid intermediate focus changes on menu switch
Currently when switching from a popup menu to another in the same
manager, we first show the new menu, then hide the old menu and
remove its grab, then create a new grab for the just shown menu.

This briefly ungrabbed moment will still trigger keyboard focus
changes, that might have other visible effects. In order to fix
this, change the grabbing order so first the new grab is created
then the old one is dismissed. This ensures focus moves from the
old menu to the new menu without gaps in between.

Since a grab is tied to an active menu, but close/grab are now
slightly decoupled, also ensure closing a menu only tears down its
own grab. This is necessary for correct accounting while doing the
grab shuffling.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5039
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2166>
2022-02-09 16:44:08 +00:00
Florian Müllner
00e41383c7 dbusServices/screencast: Removed unused properties
Those have been superseded by corresponding state enums.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2165>
2022-02-09 13:00:04 +01:00
Bastien Nocera
0531fc54e5 status/bluetooth: Fix wedged state
Fix a state where toggling the main Bluetooth switch in the header will
always show the "Bluetooth Off" menu header with "Turn Off" as the only
option.

To reproduce, with Bluetooth enabled and working, run
"hciconfig hci0 down" as root, and check the status menu.

See gnome-bluetooth!102 and gnome-control-center!1148

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4857
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2055>
2022-02-08 23:16:46 +00:00
Bastien Nocera
4a480a78af status/bluetooth: Port to new GListModel API
The GtkTreeView API was removed, and replaced with a GListModel API.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4748
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2055>
2022-02-08 23:16:46 +00:00
Florian Müllner
e07bc62fbd dbusServices/extensions: Give extensions access to the prefs window
The current preference API - buildPrefsWidget() - predates client-side
decorations. While extension authors have been finding ways around
the limitation of not having access to the window/titlebar, the change
to the new Adwaita API seems like a good time for an updated API that
officially provides that access (as far as allowed by libadwaita).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2012>
2022-02-08 19:11:19 +00:00
Florian Müllner
285ebe020c dbusServices/extensions: Stop setting a default size
Adw.PreferencesWindow already sets an appropriate default.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2012>
2022-02-08 19:11:19 +00:00
Florian Müllner
cd9532c678 dbusServices/extensions: Use default style class
libadwaita provides a series of style classes as part of its API.
Use those instead of meddling manually with the font size.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2012>
2022-02-08 19:11:19 +00:00
Florian Müllner
7a8b636028 dbusServides/extensions: Use Adw.PreferencesWindow
Adapt the new GNOME platform API for the upcoming 42. This makes
sure that we get the latest version of the stylesheet, as well as
support for the new dark mode.

Using the dedicated preference API also gives extensions with more
complex preferences an easier and standardized way for implementing
multi-page preferences.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2012>
2022-02-08 19:11:19 +00:00
Florian Müllner
089fd315dd dbusServices/extensions: Simplify actions handling
GTK4 has dedicated API for widget-specific actions, make use of that
instead of explicitly managing an action group.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2012>
2022-02-08 19:11:19 +00:00
Florian Müllner
ae92c1c4eb dbusServices/extensions: Split error page from window
The error UI comprises the bits that are actually custom. Splitting them
out from the off-the-shelf window makes it easier to replace the dialog
with libadwaita's dedicated preference window.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2012>
2022-02-08 19:11:19 +00:00
Florian Müllner
073dbc3a04 dbusServices/extensions: Split out prefs dialog
We're about to make changes to the UI, so this seems to be a good
time to split GUI and service code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2012>
2022-02-08 19:11:19 +00:00
Florian Müllner
c071c3ed4c dbus-services/extensions: Remove outdated requires
We are using GTK4, not GTK3 >= 3.20 ...

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2012>
2022-02-08 19:11:19 +00:00
Bastien Nocera
b83b22bc58 powerProfiles: Remove support for power-profiles-daemon < 0.9.0
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2101>
2022-02-08 11:21:44 +00:00
Olivier Fourdan
3fc7357e3f util: Restore the NOFILE limit before spawning apps
Make sure the restore the original NOFILE limit prior to run the
commands so those don't inherit from the raised value.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2117>
2022-02-08 08:25:25 +00:00
Olivier Fourdan
bafacdf629 ibusManager: Restore the NOFILE limit
Use GLib's spawn_async() instead of Gio.SubprocessLauncher() which does
not support the child setup function to start ibus-daemon.

This way we can restore the NOFILE limit prior to run the ibus-daemon.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2117>
2022-02-08 08:25:25 +00:00
Olivier Fourdan
7c394b0512 networkAgent: Restore the NOFILE limit
Restore the original NOFILE limit prior to spawn the VPN helper.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2117>
2022-02-08 08:25:25 +00:00
Florian Müllner
8d8eba000f dbusServices: Allow replacement
The REPLACE flag we currently pass is useless, as replacing the service
is disallowed when not started with the ALLOW_REPLACEMENT flag.

Fix this by adopting a more standard pattern where replacement is always
allowed, but only actually requested when `--replace` is passed on the
command line.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2152>
2022-02-07 18:44:34 +00:00
Rachit Keerti Das
a67877f520 dash: Use pin instead of favorites
Use the term 'pin' for adding new items to the dash
Note that this is only a string change.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2136>
2022-02-07 14:12:04 +00:00
Alexander Mikhaylenko
a619eb55bf background: Support dark wallpapers
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1174

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2137>
2022-02-07 10:20:51 +00:00
Sam Hewitt
d9f3596592 lookingGlass: Fix visual papercuts
- change icon size to 16px
- give those icons a buttonized style

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2156>
2022-02-06 20:59:38 +01:00
Florian Müllner
a92f749daf lookingGlass: Turn toolbar icons into actual buttons
Yes, we can use reactive icons with a `button-press-event` handler,
but really, there's a standard control for that kind of behavior ...

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2156>
2022-02-06 20:59:35 +01:00
Florian Müllner
35466b0e0a dbusServices/notifications: Disallow acting on "foreign" IDs
The Notify() and CloseNotification() methods act on a notification,
identified by the passed ID. Just like it makes sense to only emit
notification signals to the original sender, those methods should
be restricted to the notification owner.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2153>
2022-02-05 12:17:23 +00:00
Florian Müllner
0cbab09044 dbusServices/notifications: Stop broadcasting signals
All fd.o Notifications signals are emitted for a particular notification,
so debugging aside, only the owner of said notification has a legitimate
reason to act on it.

So far we (and other implementations like the old notification-daemon)
have relied on the client-side to properly filter the signals (like
libnotify), but at least the QT implementation is known to not do
that.

Enforce correct client behavior by only emitting the signal to the
original sender.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2153>
2022-02-05 12:17:23 +00:00
Sam Hewitt
1944af4013 calendar: Use symbolic icon for No Notifications
- drop old assets
- use symbolic icon for no notifications

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2157>
2022-02-04 13:29:36 -03:30
Sam Hewitt
0e3ddb1f02 theme: Remove icon resources from theme
- move all icons to the icons directory
- rename some icons to be more meaningful
- put all icons on a resource sheet
- update references to icon name changes
- deprecate icons for those in standard set

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2141>
2022-02-04 13:59:20 +00:00
Florian Müllner
7a58f76278 keyboard: Reindent key definitions
... to match the non-legacy eslint config.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2141>
2022-02-04 13:59:20 +00:00
Sam Hewitt
372ccc3e29 status/a11y: Update deprecated icon name
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2155>
2022-02-04 13:08:42 +00:00
Ivan Molodetskikh
a0206dcc3f systemActions: Add a screenshot UI action
It waits for the overview to close because otherwise the screenshot UI
would capture the overview.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2106>
2022-02-04 13:03:09 +00:00
Ivan Molodetskikh
6765fac76a screenshot: Move close button to the panel
CSS and JS adapted from the Overview window close buttons, but with some
style tweaks requested by the designers.

Since the screenshot UI is long-lived (it's created once at startup,
rather than every time it's opened), we need to refresh the close button
position, as it can change at runtime. Subscribing to preference changes
seems to be skipped for bindings generation in Mutter, but simply
refreshing upon opening the UI should do the job.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4997

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2147>
2022-02-03 16:43:02 +00:00
Ivan Molodetskikh
3cc045b6b8 screenshot: Close on lock
Since the screenshot UI cannot open in GDM or on the lock screen, it
seems that simply closing it on any session mode update is sufficient,
without adding extra variables.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4996

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2149>
2022-02-03 16:24:43 +00:00
Florian Müllner
4f27a6e520 panel: Remove panel corners
They were a cute gimmick for a decade, now it's time to say
goodbye ... 😢https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5010

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2151>
2022-02-03 00:19:25 +01:00
Carlos Garnacho
61b34ffe78 dnd: Drop captured event handler
This was here exclusively to silence out events from other pointing
devices in the stage. Since ClutterGrab being used now is global to
all devices and events are coerced to an invisible actor, there is
no need to explicitly do this.

Also, this event handler was set on the stage, while the grab happened
on a child, so it was fairly uneffective already.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2146>
2022-02-02 17:22:20 +01:00
Carlos Garnacho
d32005b3a4 dnd: Make event handler actor reactive
Even though we coerce events on it through a grab, it does require
to be reactive to be considered a keyboard focus. Make it reactive
so it can handle key events again.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5005
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2146>
2022-02-02 17:14:37 +01:00
Carlos Garnacho
939e26eb43 popupMenu: Ensure to let focus manager handle key events
Since the grab no longer lets events bubble up to the stage unstopped,
we should be forwarding the key events that bubbled up to the dialog
to maybe cycle focus.

Fixes broken keyboard navigation in several context menus around the
shell, other than the panel ones.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2140>
2022-02-01 14:30:24 +00:00
Carlos Garnacho
fcf70aa021 modalDialog: Ensure to let focus manager handle key events
Since the grab no longer lets events bubble up to the stage unstopped,
we should be forwarding the key events that bubbled up to the dialog
to maybe cycle focus.

Fixes focus cycling on keyboard navigation inside dialogs.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2140>
2022-02-01 14:30:24 +00:00
Carlos Garnacho
b3f5fdcb6b endSessionDialog: Connect to events in the dialog itself
Connecting to stage events won't work from a modal dialog, since the
grab will take events from the portions of the actor hierarchy above
the grabbing actor.

Connect to events from the dialog itself, so that the end session
dialog can again show the "boot options" easter egg.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2140>
2022-02-01 14:30:24 +00:00
Carlos Garnacho
e374a4957f grabHelper: Fix handling of events within the grabbed actor
Commit d92b71d2b2 went overeager in the removal of the additional
actors that were allowed to handle events (since the new grab
infrastructure makes them unable to see events in the first place),
and removed an early return in the captured event handler meant to
let events go through in those cases.

Since the grabbing actor was also part of this group, this was also
the code path where child actors of the grabbing actor could handle
events. Removing these made the captured event handler eat most
events meant for children. Add this check back, specifically for the
grabbing actor.

While at it, explicitly check (and propagate) crossing events,
since these are now enforced to be propagated (and warned about) in
Mutter.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4991
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2140>
2022-02-01 14:30:24 +00:00
Alexander Mikhaylenko
f6edfd503b status/a11y: Use the new high-contrast gsettings key
With the new boolean setting, the "High Contrast" toggle can now
simply toggle the setting instead of the current gtk/icon-theme
shenanigans.

This isn't only much simpler, but will also make switching between
high-contrast and a non-default theme reliable at last.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2069>
2022-02-01 14:11:07 +00:00
Alexander Mikhaylenko
f67418c682 st/settings: Use the new high-contrast gsettings key
We now have a dedicated "high-contrast" setting that we can
use instead of a "magic" theme name.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2069>
2022-02-01 14:11:07 +00:00
Daniel van Vugt
ed7fe756ef workspace: Fix a signal leak in WorkspaceBackground
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2143>
2022-02-01 12:11:54 +00:00
kyte
1260e35093 swipeTracker: Ignore Meta key while workspace scroll gesture is in progress
Workspace transition stopped midway when the Meta key
was released while the two-finger scroll gesture was
in progress. This commit ignores the Meta key once
the gesture has been confirmed and is in motion.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2135>
2022-01-31 22:09:28 +00:00
Ivan Molodetskikh
5b83ed59dd screenshot: Enable opacity redirect for the panel
This makes the panel look correct when it fades out (e.g. while dragging
the area selection around or while the screenshot UI is fading in and
out).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2138>
2022-01-31 12:39:18 +00:00
Ivan Molodetskikh
0d1f6b0eb9 screenshot: Remove _dragDevice
It went unused since
21cc534add

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2139>
2022-01-31 11:49:40 +03:00
Ivan Molodetskikh
1e4bbc9cd4 screenshot-ui: Put screencasts into a subdirectory
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2103>
2022-01-29 14:43:49 +00:00
Ivan Molodetskikh
6f252657fd screenshot-ui: Add screencast done notification
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2103>
2022-01-29 14:43:49 +00:00
Ivan Molodetskikh
1107fc50ca screenshot-ui: Add screencast area indicator
It shows the screencast area during recording.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2103>
2022-01-29 14:43:49 +00:00
Ivan Molodetskikh
003eb4c4e0 screenshot-ui: Add area and screen recording
It works by passing the selected area to org.gnome.Shell.ScreencastArea.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2103>
2022-01-29 14:43:49 +00:00
Ivan Molodetskikh
6d0c2ae697 status/remote-access: Add menu for stopping screencasts
This is specifically for stopping the screenshot UI screencasts for now.
It's possible to stop arbitrary screen recording handles, however due to
an issue with pipewiresrc, this method cannot currently work for cleanly
stopping Shell's own screen recordings. Hence the best we can do is to
handle just the screenshot UI screencasts to let them stop cleanly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2103>
2022-01-29 14:43:49 +00:00
Ivan Molodetskikh
fc0bff5e48 screenshot-ui: Add a screencast in progress property
The screen recording menu entry will use this to check if a screencast
is currently active and to stop the screencast.

Use a GObject property so we can bind to notify; specifically we'll bind
the visibility of a screencast area indicator.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2103>
2022-01-29 14:43:49 +00:00
Ivan Molodetskikh
eb60fa2908 screenshot-ui: Bind button to shot/cast
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2103>
2022-01-29 14:43:48 +00:00
Ivan Molodetskikh
497d9f32eb screenshot-ui: Add screenshot/screencast toggle
Currently does nothing. When we're in screencast mode, we hide the
screenshot preview because screencast doesn't start until the capture
button is pressed.

The window selection is currently left as is, but it should probably be
changed to something closer to a real overview, showing windows in
real-time.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2103>
2022-01-29 14:43:48 +00:00
Carlos Garnacho
d92b71d2b2 grabHelper: Drop addActor/removeActor calls
These no longer do what they meant to do, and are now unused.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2046>
2022-01-29 02:19:14 +01:00
Carlos Garnacho
1673e87de4 appDisplay: Drop grabHelper.addActor() call
This no longer does what it advertises to do, the folder dialog
is already modal and handles clicks outside to dismiss the dialog,
so this does not seem necessary either.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2046>
2022-01-29 02:19:14 +01:00
Carlos Garnacho
1dcc6d1b6b js/main: Add docs to private function
Oh, well...

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:32:42 +01:00
Carlos Garnacho
21cc534add screenshot: Port to Clutter.Grab
Stop using device/sequence grabs for corner handles. Also
make the toplevel actor reactive, so it can handle the key events
it means to.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:30 +01:00
Carlos Garnacho
21913b45af dialog: Handle key events on self
And set the dialog actor reactive. Specifically, we do not know whether
the parent actor is reactive or not, and we should not be changing that
from here, so do not use that actor to handle key events.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:30 +01:00
Carlos Garnacho
7419674bd3 js: Change main.pushModal to return the Clutter.Grab handle
All callers have been updated to keep this handle to identify their
own grab.

Also, optionally use the windowing state to determine whether
the grab is suitable for the specific uses. This removes the need
to trying to grab twice in the places where we settle for a keyboard
grab.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:30 +01:00
Carlos Garnacho
2709f6c102 popupMenu: Refactor focus and key management
With the presence of Clutter.grab(), this behaves differently enough
that needs some redoing. The larger difference is what actors are
eligible for handling events.

In the older code, a PopupMenuManager would ask the grabHelper to
capture events from all the stage, and selectively silence events
on any actor that is not the currently shown popup menu or the
"source" actor for any other popup in the group (i.e. those that
would pop up another menu).

But we don't want to just silence events, we want to emit the
correct set of crossing events when a popup menu is shown or closed,
this requires a backing ClutterGrab() on the currently shown menu.
Since the presence of a grab also affects the ability to have actors
outside the grab area to handle events, the PopupMenuManager now
must detect hovering and focus changes to other menu sources by
handling events on the grabbed popup itself.

Redo the grabbing over Main.pushModal/popModal (i.e. ClutterGrab,
plus keyboard focus restoration) and a captured event handler on
the currently shown menu, to make PopupMenuManager behave as it
is expected with this new kind of grabs.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:30 +01:00
Carlos Garnacho
63725ef0ef popupMenu: Drop unused blockSourceEvents switch
This could be used to selectively ignore events on the source
actor, but is now unused.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:30 +01:00
Carlos Garnacho
0f315a63f3 grabHelper: Use Clutter.grab() underneath
This is subject to further possible simplifications. Use Clutter.grab
to redirect input and focus, a fundamental difference here is that
we do redirect input to the topmost owner of the grabhelper stack,
instead of the stage. This is better behaved with the presence of
other grabs, at the cost of some behavioral changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:30 +01:00
Carlos Garnacho
3a77d78b42 loginDialog: Perform grab on the stage actor
Despite this grab happening in the dialog, we are also interested in
things happening outside of it. Move this grab to happen in the stage
itself, so the changed grab semantics don't make it impossible to
interact with parts of the login screen.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:30 +01:00
Carlos Garnacho
f2cca5cccb padOsd: Capture events on itself
This actor is setting itself modal, should also stop listening to
events from above it, since none will be gotten.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:30 +01:00
Carlos Garnacho
5305bee94c dnd: Use Clutter.grab() for DnD grab
We still listen to an specific device or touch sequence, but we
don't grab it specifically.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:30 +01:00
Carlos Garnacho
bad385d15c lookingGlass: Use lookingGlass dialog for modal grab
We want the whole dialog to handle events while shown. To compensate
for the entry not being "grabbed", make it take focus when showing.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:29 +01:00
Carlos Garnacho
05a6b35991 overview: Propagate crossing events in cover pane
When animating the overview we temporarily cover it with an actor that
ignores events. This actor should still allow crossing events to go through
as per Mutter requirements.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:29 +01:00
Carlos Garnacho
35d293df6c overview: Grab on the stage
This is more in line with the places where we want events to be
handled (i.e. all). So make the overview take a grab on the
stage itself.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:29 +01:00
Carlos Garnacho
f4cae72d17 main: Use Clutter.grab() underneath Main.push/popModal
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:29 +01:00
Carlos Garnacho
49b9ae08d8 appDisplay: Explicitly highlight selected app icon
While the menu is popped up, we artificially keep the icon highlighted
by ensuring it's hovered, and muting events on the app icon until the
menu is popped down.

This is somewhat convoluted and won't work with Clutter.grab(), where
it will be the menu itself that is the owner of input events while
shown, so cut some corners and explicitly tell the app icon to be
highlighted.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:29 +01:00
Carlos Garnacho
876765dbe1 boxPointer: Do not mute key events while showing
We want to mute things like pointers hovering the BoxPointer while
it does open. However keyboard events should still be handled
promptly.

Since Clutter.grab() will involve different actors being grabbed
and focused, this will have some more presence, e.g. when navigating
panel menus. We want to be able to navigate outside a menu while it
is still being shown.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:29 +01:00
Carlos Garnacho
0e4cd3bc79 lookingGlass: Use Clutter.grab() for actor picking
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:29 +01:00
Carlos Garnacho
81179bbf84 authPrompt: Make actor reactive
The actor is non-reactive, but has a key event handler to handle
the Esc key on the auth prompt. Mark this actor as reactive, so
it can handle the events.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:29 +01:00
Carlos Garnacho
88d60a70a3 modalDialog: Make reactive
Some dialogs like the runDialog expect this actor to receive
key events while it is not reactive. Whatever that black magic was
it will no longer work.

Make the actor reactive, so it can simply handle key events.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:29 +01:00
Carlos Garnacho
88a8ba0869 slider: Use Clutter.grab() for implicit grab
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2045>
2022-01-29 01:16:29 +01:00
Florian Müllner
c256ca443e style: Handle sections in submenus
If a menu item in a submenu is part of a section, it should have
rounded bottom corners if both the item and the section are the
last child of its respective parent.

To express that, add a new .popup-menu-section class and use that
to undo/redo the rounding for items inside a section.

It would be possible to do without a new class with a selector like

 > StBoxLayout > .popup-menu-item:last-child:hover,
 :last-child > .popup-menu-item:last-child:hover

but that's hardly better with its heavy reliance on implementation
details.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2126>
2022-01-27 22:54:14 +00:00
Florian Müllner
1cee7e6760 overviewControls: Handle keyboard navigation
The old view selector used to handle initiating keynav into pages.
That code became inactive when non-search related functionality
was moved elsewhere, and was finally removed in commit cf41f4a527.

We still want the keynav behavior it provided, so add similar code
to overview's control manager.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2124>
2022-01-27 22:49:42 +00:00
Ivan Molodetskikh
7d43038312 screenshot-ui: Add support for disable-save-to-disk
When disable-save-to-disk is set, we only save the screenshot to the
clipboard, and therefore don't add the "open file" and "open folder"
actions to the notification.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
27bcf0da48 screenshot-ui: Use ImageContent for notification icon
StImageContent specifically, when used as a notification icon, preserves
the screenshot aspect ratio and avoids ugly scaling.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
4442ced760 screenshot-ui: Make screenshots appear in recent items
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
0b83541a3b screenshot-ui: Show a notification on capture
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
95df526996 screenshot-ui: Store screenshots to files
Screenshots are always stored to (xdg-)Pictures/Screenshots as discussed
in https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1950#note_655669

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
77eeaf6dbe screenshot-ui: Extract _saveScreenshot()
For simpler handling of screenshot/screencast.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
4e93d35037 screenshot-ui: Add tooltips to buttons
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
941774b786 screenshot-ui: Add cursor capturing option
The cursor texture, scale and position is captured separately and
overlaid on top of the preview, and on top of the final screenshot
image. This allows toggling it on and off post-factum.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
639a346c1e screenshot-ui: Add keyboard navigation
Allow switching the screenshot mode by pressing the "s", "c", or "w" key. Also
implement arrow-key navigation between monitors in the screen screenshot mode
and between windows in the window screenshot mode.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
1321bb7557 screenshot-ui: Add a check icon to selected window
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
4c198fe2c7 screenshot-ui: Add new selector icons
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
d10e626de9 screenshot-ui: Add window selection
UIWindowSelectorLayout is a stripped-down subclass of WorkspaceLayout
(we don't have to deal with windows disappearing or appearing or
changing size). UIWindowSelectorWindow is a heavily stripped-down
version of WindowPreview. UIWindowSelector is analogous to the Workspace
class.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
f3d59912ec screenshot-ui: Add area selection
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
e12689108a screenshot-ui: Bind Ctrl-C, Enter, Space to capture
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
6f42eaf17d screenshot-ui: Add capturing and screen selection
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
7245f95165 screenshot-ui: Add IconLabelButton
A button that has an icon and a subtitle label.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
df0cd3457f screenshot-ui: Add close button
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
3b4fe9af31 screenshot-ui: Add the control panel
The (currently empty) panel resides on the primary monitor.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Ivan Molodetskikh
8ebc478f0f Add scaffolding for the new screenshot UI
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
2022-01-27 22:25:42 +00:00
Jonas Dreßler
81f62e9df8 lightbox: Fix banding issues with the vignette shader
Just as https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/352
did for the MetaBackgroundActor in mutter, let's fix the vignette shader
in gnome-shell, too.

Based on a patch originally propsed by Nikita Churaev, see
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/59.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3942
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2133>
2022-01-27 22:16:50 +01:00
Jonas Dreßler
7c49ac5242 altTab: Also use getWindows() for AppSwitcher
Use our custom filtering for meta_display_get_tab_list() in AppSwitcher
to be consistent and make sure the thumbnail list also includes the
remapping done in getWindows().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2098>
2022-01-25 20:03:01 +00:00
Jonas Dreßler
c8f3db31b8 altTab: Only calculate iconSize once
Right now, _setIconSize() calculates the icon size everytime the
preferred height of AppSwitcher is calculated, which happens quite
often.

Reduce the perfomance impact by only calculating the icon size once.
This has the added benefit of preventing unexpected changes to the icon
sizes while the switcher is open.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2098>
2022-01-25 20:03:01 +00:00
Jonas Dreßler
7f65fa49db altTab: Check for reentrancy in override function of _onItemMotion()
Just like in the parent _onItemMotion() function, we should check for
reentrancy in our override.

Because the hover timeout will prevent a new selection from happening
for some time, in addition to checking for this._highlighted reentrancy,
we also need to track the item that's being hovered during the timeout.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2098>
2022-01-25 20:03:01 +00:00
Florian Müllner
1e2a10f83b shellDBus: Return error on invalid app IDs
When passing an invalid or unknown app ID to FocusApp(), we currently
open the app picker and silently fail to select the desired app.
Instead of half-working like that, make it clear that the argument
was invalid by returning an appropriate error. (It's easy to get the
ID wrong, as unlike appstream/flatpak IDs, we include the ".desktop"
suffix).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/337>
2022-01-25 20:18:35 +01:00
Daniel van Vugt
e38a416246 lightbox: GLSL requires real numbers, not integers
At least backward-compatible GLSL requires real numbers only. It's a
fatal shader compilation error to use integers in GLES and older GL
versions like that of i915.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2115
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2125>
2022-01-25 15:38:04 +00:00
Leleat
f4b75d02cc popupMenu: Center labels vertically
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2113>
2022-01-25 15:32:31 +00:00
Florian Müllner
b54111ef88 cleanup: Use logical assignments
gjs updated mozjs to a version that support assignment operators
for logical operators, so use those where appropriate.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2115>
2022-01-25 15:21:16 +00:00
Georges Basile Stavracas Neto
87927b8281 ui: Rename gnome-control-center to org.gnome.Settings
The app-id has changes since  [1].

[1] https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1153

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2123>
2022-01-21 10:44:37 -03:00
Naïm Favier
3de418ea3b loginDialog: Fix timing issue
Fix the first task of the timed login batch not returning the hold on
`_waitForItemForUser`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2116>
2022-01-20 20:40:40 +00:00
Florian Müllner
6a10f2f2f1 panel: Fix corner transition when slowed down
Both ease() and CSS durations take the slow-down factor into account,
so the corners currently end up using the square of the factor in their
transition.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2118>
2022-01-20 19:18:15 +01:00
Ivan Molodetskikh
0e4b87fe5a screencastService: Create directory if it doesn't exist
Instead of testing if the videos directory exists and using the home
directory otherwise, just try to create the target directory. This
aligns with how the screenshot UI handles the screenshots folder, and
it's convenient for putting screencasts into a subdirectory.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2102>
2022-01-14 18:42:47 +00:00
Aleksandr Mezin
12c300a7a2 extensionSystem: Ignore spurious disable-extension-version-validation change
Ignore spurious change notificatons, when the setting didn't actually change
(triggered by `dconf update`)

Workaround for https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4808

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2047>
2022-01-14 15:23:09 +00:00
Ray Strode
11401c13ed gdmUtil: Enable support for GDM's ChoiceList PAM extension
This commit hooks up support for GDM's ChoiceList PAM extension.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1978>
2022-01-13 15:31:32 -05:00
Ray Strode
051a6be121 gdm: Add AuthList control
Ultimately, we want to add support for GDM's new ChoiceList
PAM extension.  That extension allows PAM modules to present
a list of choices to the user. Before we can support that
extension, however, we need to have a list control in the
login-screen/unlock screen.  This commit adds that control.

For the most part, it's a copy-and-paste of the gdm userlist,
but with less features.  It lacks API specific to the users,
lacks the built in timed login indicator, etc. It does feature
a label heading.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1978>
2022-01-13 15:03:02 -05:00
Jonas Dreßler
7ae694990b altTab: Use this._highlighted instead of this._curApp in AppSwitcher
Thanks to the parent class (SwitcherPopup), we already have a property
for the currently highlighted item, let's use it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2097>
2022-01-12 12:25:19 +00:00
Jonas Dreßler
98e270e698 altTab: Remove override of _itemEnteredHandler()
This override function is identical to the original function, so remove
it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2097>
2022-01-12 12:25:19 +00:00
Jonas Dreßler
d8a38672f1 altTab: Also return EVENT_PROPAGATE in override of _onItemMotion()
Clutter expects a return value here, so make sure we also return
Clutter.EVENT_PROPAGATE just like the function we override does.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2097>
2022-01-12 12:25:19 +00:00
Jonas Dreßler
87101cf165 switcherPopup: Rename _onItemEnter() to _onItemMotion()
Since commit e94de67b, this is called by a motion-event handler instead
of enter-event, so let's adjust the function name.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2097>
2022-01-12 12:25:19 +00:00
Sebastian Keller
ac4412e4aa lookingGlass: Add switches for debug flags
This adds a new "Flags" tab to looking glass where several debug flags
can be toggled at run time. This includes:

ClutterDebugFlags
ClutterDrawDebugFlags
MetaDebugPaintFlags
MetaDebugTopics
MetaContext::unsafe-mode

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3968
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1994>
2022-01-11 21:39:28 +00:00
Evan Welsh
828da18b72 background: Don't override synchronous load() with an async version
Instead, override the asynchronous version to avoid conflicting with
the parent signature.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2040>
2022-01-11 21:24:26 +01:00
Robert Mader
ee41dfdb8c ControlsManager: Propagate unmap before hiding the WorkspacesDisplay
Hiding the `WorkspacesDisplay` triggers a reallocation of the
`ControlsManagerLayout` which can fail with the following error:
```
JS ERROR: TypeError: workspace is undefined
_getSpacing@resource:///org/gnome/shell/ui/workspacesView.js:229:13
vfunc_allocate@resource:///org/gnome/shell/ui/workspacesView.js:355:18
vfunc_allocate@resource:///org/gnome/shell/ui/overviewControls.js:200:33
vfunc_hide@resource:///org/gnome/shell/ui/workspacesView.js:1070:38
vfunc_unmap@resource:///org/gnome/shell/ui/overviewControls.js:672:33
hideOverview@resource:///org/gnome/shell/ui/layout.js:312:28
_hideDone@resource:///org/gnome/shell/ui/overview.js:617:32
onComplete@resource:///org/gnome/shell/ui/overview.js:390:37
_makeEaseCallback/<@resource:///org/gnome/shell/ui/environment.js:134:13
_easeActorProperty/<@resource:///org/gnome/shell/ui/environment.js:298:60
```

This can be reproduced by closing the overview with the three-finger
gesture.

Thus propagate the unmap before hiding the `WorkspacesDisplay`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2088>
2022-01-09 16:50:48 +01:00