9914 Commits

Author SHA1 Message Date
Daniel Rusek
b3c16a48ca appDisplay: Fix Fonts desktop file name
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3532>
2024-11-06 19:24:44 +00:00
Bilal Elmoussaoui
d92f8daf62 magnifier: Use the new get_client_content_rect API
As we have removed is_client_decorated from Mutter in the last release.
Instead of re-adding it and re-exposing SSD/CSD differences and making
gnome-shell deal with that, we created a new API that does exactly what
is_client_decorated was used for, so switch to using that.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3522>
2024-11-06 11:03:24 +00:00
Pablo Correa Gómez
152faae6f9 data: Add X-GNOME-Shell-Utilities.directory file to allow showing real name
Instead of having the name of the directory be X-GNOME-Utilities. This
also allows translating the name to the user's language. The name is
chose to be different to X-GNOME-Utilities from GNOME Menus.

In the process, also remove the categories. The menu definition from
gnome-menus is not used, and it's not a category that apps list
themselves, so it's completely unused anyway.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3526>
2024-11-04 20:46:29 +01:00
Bilal Elmoussaoui
715b47bddc Adapt to renamed Clutter threading functions
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3501>
2024-10-30 08:38:41 +01:00
Bilal Elmoussaoui
fd8d923a34 Adapt to exposed CoglSnippetHook
It was exposed few cycles back, so get rid of the duplicated type.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3519>
2024-10-21 12:03:23 +02:00
Lukáš Tyrychtr
3bd68fcfd7 bluetooth: When the placeholder is shown, announce it when reaching the toggle
Previously, the menu would be just empty, without any indication why.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3485>
2024-10-16 16:47:09 +00:00
Lukáš Tyrychtr
4b04fc49b5 bluetooth: Name the device items for a11y
By doing that, they're finally announced by a screen reader.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3485>
2024-10-16 16:47:09 +00:00
Sam Hewitt
8d065b558e style: Clean up dialogs stylesheet to fix layout issues
- remove unnecessary dialog type-specific padding, spacing and margin definitions that led to layout to problems
- bump the size of user avatar in authentication dialog
- nest css classes in the sass to better reflect the structure of dialog elements
- sync style of audio device selector with switcher-popup style
- sync text and padding styles with other elements
- fix incorrect button order in audio selection dialog

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7876
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3473>
2024-10-16 16:41:40 +00:00
Florian Müllner
74dcf99ea5 extensionSystem: Split out loadExtensionMetadata()
There is no need for sharing the functionality, but moving
the code into extensionUtils allows adding unit tests for it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3379>
2024-10-16 16:16:08 +00:00
Florian Müllner
0188c453b9 extensionUtils: Include arrays and objects in serialization
We currently only handle simple types when (de)serializing,
which means we miss keys like "shell-version" and "session-modes".

While there is no immediate use for those, handing arrays and
objects will allow to support the newly added "donate" metadata
in the Extensions app in the future.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3379>
2024-10-16 16:16:08 +00:00
Bilal Elmoussaoui
aa0f2c4915 Use NULL for nick/blurb in GObject params
As they are only used by gstreamer for gst-inspect & other tools.
Projects like Mutter/gtk have completely dropped them as well, so follow
their path

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3505>
2024-10-16 10:19:41 +00:00
Guacamolie
91a9409b1d js: Update Meta.KeyHandlerFunc arguments
The Meta keybinding API now exposes the Clutter event to GJS, which was
previously hidden due to it being a gpointer. Since this moves the
binding argument one argument to the right on the GJS side, any code
that was using the binding argument needs to be updated.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3502>
2024-10-15 17:12:45 +00:00
Florian Müllner
8694f891ad windowMenu: Add context to screenshot action
The string "Take Screenshot" is used both by the action in the
window menu and the screenshot/recording toggle in the UI.

However in some languages, it would be best to use different
strings for the two use cases.

Address this by adding context to the window menu string, so
it can be differentiated from the string in the screenshot UI.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7979
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3503>
2024-10-15 16:02:24 +00:00
Florian Müllner
fb58ceb4c5 status/keyboard: Always released held keyboard after activating source
As the keyboard is released asynchronously after setting the ibus
engine, there's a possibility that the `this._reloading` property
changed in the meantime.

To ensure that `holdKeyboard()` and `releaseKeyboard()` are correctly
paired, record the condition in a local variable so that it maintains
its value in the callback.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3476>
2024-10-15 15:06:36 +00:00
Florian Müllner
0a3c12f8d6 status/keyboard: Fix execution order when activating source
When commit ce89b15bb123d made the code async, it did not only
delay releasing the keyboard until after the engine has been
updated, but also the following code that updates the current
input source.

One result is that the current source is now initialized later,
which breaks any code that relies on the source being set.

This affects the login screen in particular (which uses different
`InputSourceSettings` than the regular session): It fails to come
up entirely if the OSK is enabled.

To fix the issue, use a .then() callback to release the keyboard,
instead of blocking all following code with await.

Fixes: ce89b15bb1 ("ibusManager: Use async await instead of callbacks")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7912
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3476>
2024-10-15 15:06:36 +00:00
Sundeep Mediratta
5309f747fa slider: Consider text direction when handling arrow keys
Currently the right arrow key always increases the slider value,
even in RTL locales where the slider itself increases leftwards.

Fix that, so that the arrow keys always correspond to the
direction of the slider.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3500>
2024-10-12 11:06:24 +00:00
Marco Trevisan (Treviño)
368a685717 extensionSystem: Catch and log session update errors
If sessionUpdated() fails we get a js failure but not information about
where the actual problem was, so catch for error properly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3495>
2024-10-03 18:07:47 +02:00
Andrew Zaech
7fe05f6bc9 popupSwitchMenuItem: Emit correct switch state with toggled signal
The toggled signal was incorrectly emitting the pspec instead of the switch state.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3493>
2024-09-29 22:43:15 +00:00
Lukáš Tyrychtr
9fc5396742 quick-toggle: Make the subtitle the a11y description of the toggle
By doing that, more info is read by default, like the
connected bluetooth device and likely more.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3484>
2024-09-24 12:08:47 +02:00
Alice Mikhaylenko
8887c67503 padOsd: Don't hardcode blue color
Missed this one, since it's not set from CSS.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3480>
2024-09-23 11:23:47 +00:00
Lukáš Tyrychtr
25a2a0156e quick-slider: Do not allow focusing the icon when it's not reactive
This hides a disabled unlabeled button from the focus order in the display
brightness status indicator, and may be others.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3481>
2024-09-23 12:43:02 +02:00
Lukáš Tyrychtr
bd81a94d2c quick-slider: Label the menu opening button
One less unlabeled button, that's good.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3477>
2024-09-20 15:30:40 +02:00
Marco Trevisan (Treviño)
c67ea8e771 gdm: Actually wait for pending messages being notified on failures
We had code to ensure that all the queued messages sent by a PAM module
were shown by waiting some time to give the user time to read them, but
due to a typo this code never executed.

Fixes commit dd97a2589b8b686f273550f3e9e6ce370b25c10d

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3466>
2024-09-10 22:47:55 +00:00
Alessandro Bono
31509e55ca locatePointer: Mark the animation as required
When the accessibility option "Reduce Animation" is turned on, the
accessibility option "Locate Pointer" stops to work. This is because
the animation is not marked as required. Mark it as such.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7472
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2986>
2024-09-06 13:01:39 +00:00
Alessandro Bono
fc7e2bc65b ripples: Allow to specify whether the ripple is required
The ripples are used both for the "Hot Corner" animation and for the
"Locate Pointer" animation. The latter one is an accessibility feature
and should always work, even when animations are disabled. Take this
into account.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2986>
2024-09-06 13:01:39 +00:00
Alessandro Bono
8c7965f048 environment: Allow marking animations as required
There are cases when we want to mark an animation as required. For
example, we want the "Locate Pointer" animation to work even when
the animation as marked as disabled. Take this into account when
easing an actor.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2986>
2024-09-06 13:01:39 +00:00
Alessandro Bono
27878aa096 animationUtils: Allow marking animations as required
There are cases when we want to mark an animation as required. For
example, we want the "Locate Pointer" animation to work even when
the animation is marked as disabled. Take this into account when
adjusting the animation time.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2986>
2024-09-06 13:01:39 +00:00
Alessandro Bono
a52a931fb1 environment: Adjust optional delay parameter
All timing parameters should take the `slow-down-factor` and
`enable-animations` settings into account, but the delay parameter
of property/adjustment animations was forgotten.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2986>
2024-09-06 13:01:39 +00:00
Alessandro Bono
91ae7de3ad environment: Make more explicit what are the default values
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2986>
2024-09-06 13:01:39 +00:00
Sundeep Mediratta
39a3da654d ibusManager: Simplify code and logic for setEngine()
Reword names, functions and refactor code to make code execution logic
simpler to understand.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3439>
2024-09-05 13:09:38 +02:00
Sundeep Mediratta
961ca226bd keyboard: Replace oskCompletion setter with public method
The underlying value only changes asynchronously, which makes a
setter a bit awkward, so replace it with a public async function.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3439>
2024-09-05 13:09:38 +02:00
Sundeep Mediratta
2975afaf1d ibusManager: Change return value of setCompletionEnabled()
The return value currently indicates whether the request was
successful, namely `setCompletionEnabled(false)` will return
`true` if completions were successfully disabled.

However the only caller that uses the value uses it to indicate
whether completions were enabled.

Given that nothing else uses the value, change the meaning to
match the caller, and indicate whether completions are enabled
after the call returns.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3439>
2024-09-05 13:09:38 +02:00
Sundeep Mediratta
ce89b15bb1 ibusManager: Use async await instead of callbacks
Code that uses async/await is often easier to follow than callbacks, in
particular as part of the code is already async.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3439>
2024-09-05 13:09:38 +02:00
Thore Sommer
cdf0e5fc6e status/network: Add user permissions to new wifi connections
When creating a new NM connection they are by default system connections. A
user cannot create them if they don't have the correct polkit permissions
(org.freedesktop.NetworkManager.settings.modify.system).

If a user tried to add a new connection in the drop down menu, then they got
no password prompt and NM logged the following:
[...] audit: op="connection-add-activate" pid=1872 uid=1000 result="fail" \
reason="Insufficient privileges"

This change adds the current user to the user permissions for the new
connection, if the user has no permissions to modify the system connections,
which copies the behavior of GNOME Settings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3462>
2024-09-02 21:01:35 +00:00
Alessandro Bono
5445b705f1 authPrompt: Allow to set a custom ShellUserVerifer
Move ShellUserVerifier creation to its own function so that
extensions can easily override it.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7828
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3446>
2024-09-02 10:43:24 +00:00
Jonas Ådahl
6982f2daae ibus-candidate-popup: Scale coordinates from IBus
The coordinates are effectively in the windowing system coordinate
space, which when scaling Xwayland, we need to scale these. Do this with
the Meta.Window.protocol_to_stage() function on the focused window,
which handles it correctly for the corresponding windowing system and
configuration.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3458>
2024-08-30 20:14:55 +00:00
Dylan McCall
babf69f6ba quick-settings: Handle interrupted menu animations
If the menu is closed while it is being opened, we should skip the next
animation in the chain. Similarly, if a menu is opened while it is being
closed, we should continue the animation from the previous state instead
of resetting height to 0.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5843
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2481>
2024-08-28 17:25:57 -07:00
Daniel Sheeler
24cd7af920 dash: Show move cursor on app icon dnd to dash
Previously, the 'copy' drag and drop cursor was displayed when dragging
an application icon to the dash (which adds the app to favorites),
but the operation is really a move, so ensure the 'move'
dnd cursor is used.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7819
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3453>
2024-08-27 14:46:50 +00:00
Alessandro Bono
e5d9a0fec8 loginDialog: Don't assume this._user is always defined
There are cases where this._user might be null when a session
is opened. This is because the user is not selected via GDM but
it is set through PAM. This happens when logging with smart card
or with credential managers, for example.

Given the session-id of the opened session, look for the owner.
This fixes the following error:
```
gnome-shell[153293]: TypeError: this._user is null

                     Stack trace:
                     _findConflictingSession@resource:///org/gnome/shell/gdm/loginDialog.js:1219:26
                     _onSessionOpened@resource:///org/gnome/shell/gdm/loginDialog.js:1254:51
                     @resource:///org/gnome/shell/ui/init.js:21:20
```

Fixes: df84854d9 ("loginDialog: On login, allow logout a conflicting session")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7526
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3448>
2024-08-20 12:38:41 +02:00
Alessandro Bono
647747fbd6 loginDialog: Get username directly from the conflicting session
The conflicting session is owned by the same user per definition.
Use the Name property of the conflicting session to get the
username instead of assuming that `this._user` is defined and
passing the username around.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3448>
2024-08-20 12:38:41 +02:00
Alessandro Bono
f1223c6852 loginDialog: Catch possible errors when session is opened
Since commit df84854d9073c457d79d7c2e6a5750428c52ff01 the function
_onSessionOpened() is now async. This means that if an error occurs
we get the following warning:
```
gnome-shell[1014]: Unhandled promise rejection. To suppress this
warning, add an error handler to your promise chain with .catch()
or a try-catch block around your await expression. Stack trace of
the failed promise:
_onSessionOpened@resource:///org/gnome/shell/gdm/loginDialog.js:1166:27 @resource:///org/gnome/shell/ui/init.js:21:20
```

Follow the suggestion and add a try-catch block in order to reveal
what the error is. In the catch phase, reset the faded AuthPrompt
otherwise we can't retry with another user.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3448>
2024-08-20 12:38:41 +02:00
Bilal Elmoussaoui
6e57d42d26 st: Adapt to Cally merge inside of Clutter
ClutterActor has now a get_accessible_type that replaces
the StWidget one, switch to using that

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3433>
2024-08-08 01:07:25 +00:00
Sam Hewitt
a32f735ec0 style: Use unlinked rounded buttons for notifications
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3427>
2024-08-02 13:37:44 -02:30
Sam Hewitt
ff4b9fdb08 style: Use unlinked rounded buttons for notifications
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3383>
2024-08-02 15:16:46 +00:00
Florian Müllner
105abab1e4 js: Remove modelines
We already include an .editorconfig that is supported by many
editors, including emacs, so no need to repeat an emacs-specific
modeline in every source file.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3431>
2024-07-30 18:20:55 +00:00
Julian Sparber
7a874334ef overview: Drop unused ShellInfo object
This object isn't used anymore and it's really easy to create a new
system notification via the appropriate notification source.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3387>
2024-07-29 14:57:42 +00:00
Julian Sparber
ab4f80b8ae appFavorites: Display its own notification for every pin/unpin
Show a notification for each user action instead of updating the
notification currently displayed when the user pins or unpins.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3387>
2024-07-29 14:57:42 +00:00
Tuomas Nurmi
a21558d67f status/network: Fix enterprise network connecting from panel
Use the right variable. A static WirelessNetwork._securityTypes
variable does exist, but the correct variable when checking
autoconnect possibility is this._securityType; this._securityTypes
is undefined, causing clicking an enterprise network name in panel
network selector do nothing instead of properly opening GNOME
Settings panel.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3426>
2024-07-29 16:27:26 +02:00
Will Thompson
3d06134545 Make startup animation use async functions throughout
During session startup, we have the following chain:

    LayoutManager._prepareStartupAnimation()
    `- LayoutManager._startupAnimation()
       `- LayoutManager._startupAnimationComplete()       (a)
       | or
       `- LayoutManager._startupAnimationGreeter()        (b)
       | or
       `- LayoutManager._startupAnimationSession()        (c)
          `- Overview.runStartupAnimation()               (d)
             `- OverviewActor.runStartupAnimation()       (e)
                `- ControlsManager.runStartupAnimation()  (f)

Branch (b) calls LayoutManager._startupAnimationComplete() once the
animation is complete. Branch (c) does the same, except that
ControlsManager.runStartupAnimation() is an async function that awaits
LayoutManager.ensureAllocation().

LayoutManager._prepareStartupAnimation() is an `async` function, and its
caller catches & logs any error it raises.

Previously, ControlsManager.runStartupAnimation() – (f) in the above
diagram – was declared `async`, because it uses `await` internally, but
also accepted a callback, which was called on successful completion of
the function and the animation it triggers.

If an exception is raised during execution of the function, its callback
would never be called, and because the promise it implicitly returns is
discarded, the exception would never be logged either. And, stepping a
few levels up the call stack, the callback that
LayoutManager._startupAnimationSession() (c) provided would never be
called, and so LayoutManager._startupAnimationComplete() would never be
called, meaning the cover pane that prevents input would never be
removed and the session would be unusable.

Remove the callback parameter from ControlsManager.runStartupAnimation()
(f), and instead make it resolve in the case where the callback would
previously have been called.

Remove the callback parameter from OverviewActor.runStartupAnimation()
(e) – it is just a wrapper around ControlsManager.runStartupAnimation().

Adjust Overview.runStartupAnimation() (d) accordingly: rather than
passing a callback to OverviewActor.runStartupAnimation(), await its
return and then proceed. There is a slight behaviour change here:
previously, in the branch where this._syncGrab() is false, the callback
would be called before calling this.hide(), whereas now this.hide() is
called before the async function returns.

Adjust LayoutManager._startupAnimationSession() and its siblings to be
async, rather than each calling _startupAnimationComplete() directly.
Finally, in _prepareStartupAnimation()  await _startupAnimation() either
succeeding or failing, and in either case call
_startupAnimationComplete(), removing the cover pane that prevents all
input.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3428>
2024-07-28 18:49:59 +01:00
Florian Müllner
1403747863 build: Add option to disable portal-helper
The portal login window uses WebKit, which is a security-sensitive
component that not all vendors want to support.

Support that case with a build option, and update the captive
portal handler to use the user's default browser if the portal-helper
is disabled.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3408>
2024-07-25 01:51:17 +00:00