Commit Graph

8594 Commits

Author SHA1 Message Date
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