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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
When NetworkManager detects limited connectivity, we currently
pop up the portal helper window immediately. This can both be
disruptive when it happens unexpectedly, and unnoticeable
when it happens during screen lock.
In any case, it seems better to not pop up a window without
explicit user action, so instead show a notification that
launches the portal window when activated.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7688
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3408>
VA-API low-power encoder profiles (such as vah264lpenc) reduce power consumption by relying entirely on fixed-function hardware blocks.
Use vah264lpenc over vah264enc by default, in order to save on energy and 3D engine capacity.
Signed-off-by: José Relvas <josemonsantorelvas@gmail.com>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3416>
Mutter has a new tool for interacting with mutter with features we don't
expose to users yet. It can be exported as a dbus service but it is not
done so by default. This adds an easy way to do so without having to
remember some JS snippet.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3425>
When an app folder is opened it would do so without grabbing the
keyboard focus, so one could not navigate with the arrow keys without
pressing Tab. This adds the focus parameter to popup()'s grab, which
sets the key focus to the elements of the folder when it is opened.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3338>
The AppFolderDialog would lose keyboard focus after editing the title
(likely due to the folder entry grabbing key focus). This commit adds
navigate_focus() to _showFolderLabel() to send key focus back to the
dialog's elements after editing the title.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3338>
In commit e69da36095d5093c1c7bec7a9c96c079c0b837f9, Florian Müllner
wrote:
> We currently complete the animation using an onComplete handler,
> which only runs if the corresponding transition was stopped when
> finished.
>
> While it is unexpected that the transition is interrupted, it can
> apparently happen under some circumstances (like VMs with qlx).
> The consequences of that are pretty bad, mainly due to the cover
> pane that prevents input during the animation not getting removed.
>
> Address this by always completing the animation when the transition
> is stopped, regardless of whether it completed or not.
There are effectively four branches of the startup animation:
1. if Meta.is_restart() is true, no animation is run on startup; I
believe this is the X11-only case of restarting the shell
mid-session.
2. if Main.sessionMode.isGreeter is true, just the panel is eased onto
the screen; this is the GDM case.
3. if Main.sessionMode.hasOverview is true, then a whole sequence of
animations are run; this is the normal session case.
4. otherwise, the whole UI zooms in to full size, and from full
transparency to full opacity; this is the Initial Setup case.
The fix above handles cases 2 and 4, but not 3. This patch applies the
same fix to case 3, so that the callback is always called on session
startup even if the transition is interrupted.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3422>
All styling currently happens on the ScrollView child, which
means that instead of a scrollbar inside the dialog to move
the content, we have a scrollbar next to the dialog that moves
the dialog as a whole.
Fix this by simply moving the style classes to the up-most parent.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3414>