Commit Graph

8304 Commits

Author SHA1 Message Date
Florian Müllner
c90fb27a2f shellDBus: Fix FocusApp()
The appDisplay used to be accessible via the viewSelector, but
that is gone now. Commit c09c070b15 adjusted the code, but the
replacement uses a Main.overview.appDisplay accessor that never
existed, whoops.

Fix this by exposing a new selectApp() method directly on the
overview, so we don't have to shuffle the appDisplay through
controls → overviewActor → overview.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1891>
2021-06-17 21:03:58 +00:00
Olivier Fourdan
8be5d33611 windowManager: Remove timeout on starting X11 services
With Xwayland started on demand, mutter/gnome-shell will spawn Xwayland
and GNOME settings daemon Xsettings.

Currently, gnome-shell uses a timeout of 5 seconds before canceling the
launch and declare failure to start X11 services.

While 5 seconds may seem like a lot of time, when this is executed on a
virtual machine part of a QA tests under load, this causes random
failures.

There is no good value here, we could increase the timeout but it will
always remain racy. Instead, remove the timeout, systemd itself already
has a timeout mechanism (with a much longer wait time).

Thanks to Benjamin Berg <bberg@redhat.com> for finding the root cause
and suggesting the fix.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1888>
2021-06-15 11:24:59 +02:00
Chris Mayo
8d042459ee lookingGlass: Use symbolic icons on the toolbar
Replace gtk-color-picker, a private GTK 3 icon, with
find-location-symbolic as used in GTK Inspector.

As suggested by Daniel van Vugt.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1671>
2021-06-14 18:51:30 +00:00
Harshad Gavali
177b36f82b overviewControls: Avoid hiding early AppDisplay when transitioning to Session
When transitioning from AppDisplay to Session,
AppDisplay should be visible throughout the transition.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1886>
2021-06-13 00:51:35 +02:00
Florian Müllner
5be67eb190 lookingGlass: Only pop modal after the transition
Right now we pop the modal immediately when closing, so the key-release
event of the Escape key ends up in the focus window which may consume it
for leaving fullscreen mode or similar.

We can avoid that in many cases by keeping the modal grab until the end
of the transition, as the key-release event will then likely occur while
the grab is still in place (provided animations are enabled).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1880>
2021-06-10 00:18:00 +00:00
Daniel van Vugt
1879ca741e lookingGlass: Avoid a little bit of RedBorderEffect overdraw
The left edge of the box was redrawing the bottom left corner when
the bottom edge had already done so.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1876>
2021-06-09 16:31:19 +00:00
Daniel van Vugt
d8802aafc4 lookingGlass: Paint the RedBorderEffect right edge the correct height
It was being painted one box thickness (`width`) too tall so you could
see a rendering glitch below the bottom right corner until now.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1876>
2021-06-09 16:31:19 +00:00
Florian Müllner
dc0491ade8 dbusServices/screencast: Handle pipeline failures gracefully
If parsing the pipeline fails for some reason, we currently end up
with a zombie session that leads to a stuck recording indicator in
gnome-shell.

Instead, properly tear down the session to allow mutter and gnome-shell
to correctly update their state.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1878>
2021-06-09 15:21:35 +00:00
Georges Basile Stavracas Neto
40543bdd28 portal: Own org.gnome.Shell.Portal for the access portal
org.freedesktop.impl.portal.desktop.gnome will be used for the
GNOME implementation of desktop portals in the future, so make
sure GNOME Shell's implementation of the access portal won't
conflict.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1872>
2021-06-05 21:29:52 -03:00
Georges Basile Stavracas Neto
5339b1e6a2 dnd: Immediately start drag done by pointer devices
Unlike touch screens, pointer devices (e.g. cursor, touchpad) are
basically never used to switch app grid pages, which is the main
use case for the drag threshold. This point was recently raised
as design feedback.

Immediately start drags when using pointer devices.

See https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3802#note_1124701

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1866>
2021-05-31 10:59:11 -03:00
Georges Basile Stavracas Neto
e89c6179af dnd: Factor out calculation into a variable
Another trivial cleanup. This is in preparation for next commit, that
will expand on this if clause, and will make it a bit more complicated.
Using a variable here makes it easier to read.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1866>
2021-05-30 21:32:54 -03:00
Georges Basile Stavracas Neto
88fa02147e dnd: Return Clutter.EVENT_STOP instead of true
Trivial cleanup.

Clutter.EVENT_STOP is more semantic, and this 'true' is inconsistent
with the 'return Clutter.EVENT_PROPAGATE;' a few lines above.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1866>
2021-05-30 21:27:51 -03:00
Georges Basile Stavracas Neto
dfae3281b9 workspaceAnimation: Allow long swipes in session
As per design feedback, allow long swipes in the session too.

See https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3802#note_1124701

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1865>
2021-05-30 12:02:12 -03:00
Georges Basile Stavracas Neto
e9119c625d workspaceThumbnail: Destroy thumbnails on destruction
Often, when using multiple monitors, the thumbnails box may be
destroyed before the 'hidden' signal of the Overview is emitted,
which leaves a bunch of lingering signal connections to the
workspace manager.

Call this._destroyThumbnails() in the _onDestroy handler, which
disconnects from workspace manager. This fixes the some of the log
spam that GNOME Shell produces with backtraces of destroyed actors.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1860>
2021-05-25 12:43:32 -03:00
Olivier Fourdan
d9239e2cee windowManager: Ignore error without systemd
On systems/setups not using systemd, a failure to start gsd-xsettings
with NOT_SUPPORTED does not denote a failure to start Xwayland, just
that we're not using systemd.

In that case, we should just ignore the error, otherwise it will prevent
Xwayland to start on such systems/setups without systemd.

Thanks to Rose Kunkel (@rosekunkel) for spotting the issue/suggesting
the fix.

Fixes: 019229c40e - windowManager: Return failure to start X11 services
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4284
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1850>
2021-05-18 14:31:28 +00:00
Jonas Ådahl
08fb067d24 js: Get idle monitor from backend
Its ownership has moved from dangeling to owned by the backend, which
has reflected the API is accessible by. Adapt to this change.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1838>
2021-05-18 13:42:52 +00:00
Georges Basile Stavracas Neto
0ed1a363a3 workspacesView: Queue relayout when overview adjustment value change
The overview adjustment quite significantly impacts the layout of
SecondaryMonitorDisplay(), and this needs to be accounted for by queueing
a relayout.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1845>
2021-05-12 18:08:55 +00:00
Georges Basile Stavracas Neto
81210f5846 workspacesView: Don't update secondary monitor thumbnails box if hidden
And save quite a few C/JS trampolines. Since the thumbnails box may not
have up-to-date properties, call _updateThumbnailParams() right after
showing the thumbnails box.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1845>
2021-05-12 18:08:55 +00:00
Georges Basile Stavracas Neto
a63c44ba2c workspacesView: Increase secondary monitor workspace scale
The current value, 70%, may end up leaving too much unused space on
secondary monitors. The new value of 80% is completely based on trial
and error, but seems to work slightly better.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1845>
2021-05-12 18:08:55 +00:00
Florian Müllner
803b944ffd appDisplay: Add :gesture-modes property
Both the main app grid and folders got a swipe tracker, which is
active in both OVERVIEW and POPUP mode. The result is that two
trackers fight over the same events, and everybody loses.

Address this by adding a :gesture-modes property that determines
the allowed modes for the associated swipe tracker.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1844>
2021-05-12 01:02:19 +02:00
Carlos Garnacho
6fc93b78bc appDisplay: Improve app grid interaction for touch devices
Currently, handling of touch devices in the app grid is a bit awkward,
paging by dragging the view can only happen if started from the gaps
between icons, trying to drag from an icon will trigger DnD, and popping
up the menu takes over it all.

Instead, have the app grid actions play this game of rock-paper-scissors:
- Fast swipes on icons trigger scrolling, beats DnD and menu
- Slower press-and-drag on icons trigger DnD, beats scrolling and menu
- Long press triggers menu, beats scrolling, is beaten by DnD

This allows quick swipes to handle navigation, while still allowing the
fine grained operations. DnD, when triggered, dismisses the menu, if
shown.

This all could probably be nicer with a more stateful gesture framework,
we're not there yet though.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3849
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1774>
2021-05-11 16:13:49 +00:00
Carlos Garnacho
91a7978711 grabHelper: Propagate events while this._ignoreUntilRelease
Let these events to be handled as usual, so that the grabbing actor
can handle input differently (e.g. trigger DnD) while the grabHelper
is active.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1774>
2021-05-11 16:13:49 +00:00
Carlos Garnacho
ecead8c727 dnd: Add timeoutThreshold setting
This setting (by default, 0) sets a time threshold in order to allow
DnD. If the drag is shorter than this threshold, DnD will be cancelled,
and event handling left to the next handlers.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1774>
2021-05-11 16:13:49 +00:00
Sebastian Keller
0a7507c617 altTab: Avoid allocation cycle when showing CyclerHighlight
CyclerHighlight was showing and resizing one of its child widgets when
its own allocation was changed, queuing another relayout, resulting in
allocation cycle warnings. Avoid this by updating the size of the
highlight when the frame rect of window has changes rather than the size
of the CyclerHighlight actor itself.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4167
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1842>
2021-05-11 17:36:29 +02:00
Leleat
5423179844 switcherPopups: Correct selection with arrows and scrolling using RTL
The switcherPopups use _next() and _previous() to get the items
in the text direction. I. e. with LTR _next() gets the right item;
on RTL it gets the left item. This doesn't work well with RTL when using
the arrow keys since the text direction doesn't matter in those cases.
Pressing Left Arrow should still move left regardless of text direction.
So use the opposite methods.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1835>
2021-05-11 14:09:33 +00:00
Olivier Fourdan
019229c40e windowManager: Return failure to start X11 services
If for some reason the xserver failed to start, mutter/gnome-shell
should not attempt to connect to the X11 display otherwise it will
lock up in XCB.

An indication of such a premature failure of the xserver is when the X11
services fail to start.

Return the status so that the caller can cancel the connection in time
and avoid the lockup of mutter/gnome-shell in case of failure.

This, however, makes the X11 services a critical component to start
Xwayland, meaning that a failure to start those services for any other
reason than the xserver failing to start would still prevent Xwayland
and therefore X11 clients to run in Wayland. This is however a lesser
issue than mutter/gnome-shell locking up.

This basically reverts commit a96753f0 - "windowManager: X11 can work
without gsd-xsettings".

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1837>
2021-05-11 14:05:40 +00:00
Florian Müllner
0ccdb4746f appDisplay: Extend faded edges beyond fade area
Now that the fade effect was reverted to the old behavior by default,
the app grid must opt-in extend faded edges beyond the regular fade
area.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1831>
2021-05-11 13:21:40 +00:00
Nishal Kulkarni
2b2a71832a windowManager: Hide overview on using hotkey
Change behavior on pressing Super+Number in Activities/Overview mode
so that the overview mode is hidden and application can be used.

This makes it consistent with clicking icon in the dash.

Closes: #4212
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1839>
2021-05-11 12:50:01 +00:00
Sebastian Keller
234024c4f4 workspace: Update WorkspaceLayout workarea on changes
Previously the workarea was only set on construction and then never
updated. As a result the preferred width and height as well as the
allocation were based on an outdated workarea size when it changed after
construction. This for example was happening during the startup
animation, for which the WorkspaceLayout is constructed before the panel
is shown. This caused the workspace in the overview to be slightly
smaller when it is first shown and the overview closing animation to
not expand the workspace to the correct size the first time it is
closed.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1771>
2021-05-11 02:36:54 +02:00
Jonas Dreßler
954131c1c8 overview: Sync grabs after running startup animation
In the nested session the startup animation sometimes fails, weirdly
that always happens to me when running a freshly built gnome-shell the
first time. The reason it fails is that mutter fails to aquire a pointer
grab from the xserver, XIGrabDevice() is unsuccessful.

A simple workaround for this race condition in the xserver is to just
grab the devices a bit later, that is after the startups animation
instead of before it.

This was also tested with disabled animations, and seems to work just as
well in that case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1812>
2021-05-04 16:18:30 +00:00
Sebastian Keller
e7780623fe dnd: Don't use transformed size to calculate parent scale when restoring
Some drag actor parents might change their width to 0 after the drag
actor has been removed. If the drag is now canceled and the drag actor
is animated to return to the current parent position and scale, this
scale can not be determined and falls back to 1.0. This might be wrong
and can result in the drag actor being too large/small at the end of the
return animation.

To avoid this calculate the scale of the parent by recursively
calculating the product of its parents individual scales.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1790>
2021-05-04 15:45:58 +00:00
Jonas Dreßler
4e83aaf850 workspace: Extend clip when animating from window picker to app grid
We want to clip the Workspace actor in the appGrid state of the overview
in order to make sure windows that overflow the monitor don't spill out.
So far we had commit b1970b95b8 for that.

Now since the last commit, window previews always slightly overflow the
allocation with their icons. That means a part of the window icon gets
clipped away as soon as the transition to the appGrid starts, which
looks weird.

Fix that bug in the transition by slightly extending the clip downwards
when animating between the window picker and the app grid state. The
extra height we extend the clip by is controlled by the overviewState,
which means we extend the clip by the full icon overlap in the window
picker state, but don't extend the clip at all when in the app grid
state.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1813>
2021-05-04 14:16:46 +00:00
Jonas Dreßler
fcc80407ea workspace: Make window preview overlays overflow the allocation
We want to use as much space as possible for showing window previews in
the overview, and the title and close buttons of those windows are only
visible on hover, so we can show them above anything if we want.

On both primary monitors and secondary monitors, there's a certain free
space available towards the bottom edge of the monitor (on the primary
monitor we show the dash there, and secondary monitors just scale down
the Workspaces). We can make use of this by checking how much free space
there is available from the bottom edge of our allocation to the bottom
edge of the monitor, and then aligning the window previews to make full
use of this space.

So stop adding any padding to the edges of the Workspace, which will
make the windows a lot larger and completely fill the Workspaces
allocation.

The left, top and right monitor edges should always be far enough away
to accomodate the close button and hover scale-up of the window. Only
with the bottom edge of the monitor we have to be a bit more careful
(the overflowing height of the window title is quite big), so there we
check if enough free space is available. If there isn't enough free
space, we simply apply a bit of bottom padding again and shift the
window up.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1813>
2021-05-04 14:16:46 +00:00
Jonas Dreßler
7f90a46f8c workspacesView: Clip the SecondaryMonitorDisplay instead of the view
Make the SecondaryMonitorDisplay a bit more similar to the
ControlsManager container on the primary monitor, and clip that widget
instead of the WorkspacesViews on secondary monitors.

This will allow us to overpaint the WorkspacesView allocation and paint
the WindowPreview overlays like the title and close button outside the
allocation with the next commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1813>
2021-05-04 14:16:46 +00:00
Jonas Dreßler
51bf7ec176 screencastService: Improve the gstreamer pipeline for recording
The current gstreamer pipeline performs quite bad on slower machines and
is dropping lots of frames, improve the pipeline by changing a few
things:

- Use threads for videoconvert and improve speed of videoconvert by
disabling some unneeded things
- Add a queue before the encoding step, this allows the encoder to work
at its own pace and will lead to a lot more stability
- Remove the fixed quantizer and only set a max quantizer, this helps
quite a bit with performance
- Change the deadline parameter of vp8enc to 1: This makes the encoder
go into real time mode, which will make it a lot faster
- Set cpu-used to 16, the maximum possible value.
- Set static-threshold to 1000, static-threshold is the motion detection
threshold, and while a value of 100 is recommended for screencasting in
the gstreamer documentation (see [1]), using 1000 appears to perform a
lot better and still outputs fairly good quality
- Set a larger buffer size than the default size, this seems to get a
bit more stability during high load scenarios

All in all, those changes make the pipeline drop no more frames when
recording at 30 FPS and 2K screen resolution. That was tested on a
fairly recent mobile core-i5 processor.

Also, because we now have two %T replacement strings for the number of
threads, we need to switch to replaceAll(). For that to work, we have to
put the %T matching expression into quotes.

[1] https://gstreamer.freedesktop.org/documentation/vpx/GstVPXEnc.html?gi-language=c#GstVPXEnc:static-threshold

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1633>
2021-05-04 13:45:57 +00:00
Simon Schneegans
a8a79c0333 extensionsService: Log error if preferences dialog failed to open
This is helpful for continuous integration checks to see whether the
preferences dialog of an extension can be opened successfully.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1830>
2021-05-01 21:07:36 +00:00
Sebastian Keller
79acae4176 dnd: Don't try to restore to parent location if parent got destroyed
The original parent of a dragged actor might have been destroyed after
the drag has been started. When the drag is canceled and _dragOrigParent
is set, the code is trying to get the current position and size of it
when restoring. With a destroyed parent this however would result in a
crash.

This could happen for example when starting a drag on a window preview
while the overview is hiding and then releasing it once the transition
is done.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1817>
2021-04-29 18:25:56 +00:00
Sebastian Keller
0e917c3dbf workspaceThumbnail: Only create thumbnails once
`ThumbnailsBox` listens for the `showing` signal from the `Overview` to
create its thumbnails and destroys them on the `hide` signal. Since the
`showing` signal can be emitted multiple times when switching between
the shown and hidden state without ever fully completing the transition,
this will cause `_createThumbnails` to be called multiple times, each
time adding another set of workspaces.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3819
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1828>
2021-04-29 17:58:45 +00:00
Sebastian Keller
77023135ac overviewControls: Stop transitions when starting a gesture
When starting a gesture to open the overview while a transition to hide
the overview is running, Overview._shown will be first set to false when
starting the transition and then to true by the gesture before the
`onComplete` callback is called. The `onComplete` callback in this case
is `Overview._hideDone()` which starts a transition to show the overview
again which also emits the `showing` signal. Since the gesture emits a
`showing` signal as well, this results in two consecutive `showing`
signals without a `hiding` signal in between.

This breaks the `searchControler` which adds a key press handler to
start the search on `showing` and removes it on `hiding`. So every time
this happens a new handler that will never be removed is added,
resulting in the first key press being repeated.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4004
Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3819
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1828>
2021-04-29 17:58:45 +00:00
Leleat
fd0da9606f appMenu: Only show Open Windows, if there are at least 2 windows
It doesn't make sense to show the 'Open Windows' in the app menu,
if the app only has 1 open window to switch between. Hide the
window section in that case.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1827>
2021-04-29 12:22:38 +02:00
Sebastian Keller
401b584384 appDisplay: Don't use symbolic icon at full size for system actions
When attempting to account for scaling in e65e5ede the icon_size of the
StIcon was set to the target size, overriding the icon-size set in the
'system-action-icon' CSS, which was only half the size. The intent of
that commit however was not to scale up the symbolic icon, but the
circle around it. Do this by manually applying the scaling factor.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1777>
2021-04-29 09:42:40 +00:00
Florian Müllner
dedfdb6d0b dbusServices/screensaver: Disable auto-shutdown
For the screensaver service, it is quite normal that a consumer only
subscribes to the "ActiveChanged" signal without calling any methods.

The result is that we don't know about the consumer, and shut down
the service anyway after we hit the timeout.

If this happens, we break functionality like gnome-settings-daemon's
screen blanking on idle.

Fix this by simply disabling auto-shutdown for the service, which
also reflects the expectation that the screen saver service is
always running in a GNOME session.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1824>
2021-04-28 18:12:13 +00:00
Benjamin Berg
724291de7f gdm: Remove pending fingerprint verification failure
It can happen that we get a problem report and a verification failure at
the same time. For fingerprint, a problem report can result in an
internal verification failure to be queued.

Remove this queued failure again if we got a failure already from GDM
directly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1821>
2021-04-28 17:23:01 +00:00
Ray Strode
588dd6d80a gdm: Only disconnect verification signals when not going to retry
At the moment a failure in a background service can lead to the
various verification signals getting disconnected, even though
we still need them for a foreground service.

This commit changes the code to only disconnect when we've run
out of tries.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1821>
2021-04-28 17:23:01 +00:00
Ray Strode
8cfd4c969b gdm: Flip canRetry boolean to doneTrying on verification failure
This commit flips a boolean in the verification failed handler
to make things easier to read.

It also moves the retry logic to the bottom where it makes more
logical sense.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1821>
2021-04-28 17:23:01 +00:00
Ray Strode
a97c4b8945 authPrompt: Don't fail auth prompt until user is out of retries
At the moment we set the state of the auth prompt to failed any
time the user fails an attempt. But verification is still going
on until the user exhausts all attempts, so that's wrong.

This commit changes it to only set the state to failed when the
user is out of tries.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1821>
2021-04-28 17:23:01 +00:00
Ray Strode
a56d508d69 authPrompt: Don't clear querying service unless querying service fails
At the moment we treat a failure in any service as a signal to stop
tracking users responses to service questions.

This commit makes sure we don't stop waiting for answers if a background
service fails.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1821>
2021-04-28 17:23:01 +00:00
Leleat
4e35ca8e26 windowPreview: Make St.Label use single line mode
When a windowPreview is hovered or selected, it will show its window's
title as a caption. That title may contain Newline characters which will
effect the windowPreview size. Make the caption's St.Label use single
line mode to prevent that.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1822>
2021-04-28 14:29:19 +02:00
Sebastian Keller
380d61dc43 screenshot: Ignore events in SelectArea after making a selection
The grab and actor are only removed after the selection rectangle has
finished fading out. During this time it was possible to still change
the position of the selection rectangle.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2761
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1825>
2021-04-28 11:40:19 +00:00
Sebastian Keller
548e18ad7e screenshot: Only select area on button release after a button down
On Wayland it is possible to trigger area selection with a button
already being down. SelectArea would then react to the subsequent button
release without ever having seen a corresponding button down first,
leaving the start coordinates of the selection rectangle uninitialized.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2761
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1825>
2021-04-28 11:40:19 +00:00