Commit Graph

15940 Commits

Author SHA1 Message Date
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
Florian Müllner
3f2db31d7e shell/app: Keep cancellable after cancelled proxy request
When a GTK app is started, we create a corresponding GtkApplication
proxy to monitor the app's busy state. If the app is stopped before
the proxy request finishes, we cancel the cancellable before clearing
the running state.

Usually we clear the cancellable once it is no longer needed, namely
when we got the proxy. However when the request was cancelled, the
cancellable has already been cleared, and if there's a cancellable,
it belongs to another request (because the window was added again,
for example when moving between monitors).

Leave that cancellable alone in that case, so we can cancel the
second request as well if necessary to avoid a crash when trying
to set the proxy on a cleared running state.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1885>
2021-06-14 20:37:26 +02: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
Hugo Carvalho
303fc944d0 Update Portuguese translation
(cherry picked from commit 3e5c7ce5f76fd16e38065c6f4db49fc2676809cf)
2021-06-09 18:28:34 +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
Jordi Mas
bed0f43967 Update Catalan translation 2021-06-08 19:42:52 +02: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
Daniel van Vugt
a21058e6c9 st/icon: Rebuild shadows when the texture dimensions change
Not when the main actor dimensions change. So now the shadows don't get
constantly regenerated during the overview animation. In my case this
reduces the render time of the overview animation (tapping Super) by
approximately 10% with 2 windows, or 20% with 10 windows.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1869>
2021-06-03 20:27:57 +08:00
Cheng-Chia Tseng
c9558c9afa Update Chinese (Taiwan) translation
(cherry picked from commit e8eabad6ab0e99d893875fa7edad3f9de28b0841)
2021-06-03 02:10:33 +00: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
Florian Müllner
55fcb3aa00 build: Fix manpage generation at dist time
The AsciiDoc API only exposes the capabilities of asciidoc, but not
the related a2x tool. Fix generating the manpages by shelling out
to the command line tool instead.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1859>
2021-05-25 18:45:53 +00:00
Leleat
f8cd01c6dc extension-tool: Always print extension location after its creation
The extension location was only printed, if there was no handler for
the newly created extension. This is confusing for new extension
developers. So always print the extension location.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1856>
2021-05-25 18:30:25 +00: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
Florian Müllner
e6089c83e2 extensions-app: Enable hardware acceleration
GTK4 will make use of it if it's available, so allow it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1854>
2021-05-19 18:23:56 +02:00
Gustavo Noronha Silva
404ca91941 calendar-server: Fix double-free detection abort
app_notify_events_added uses an intermediate builder to construct an
array that is then added to the main variant using g_variant_builder_add
which should clear the intermediate, but doesn't due to the way it is
passed: by value, rather than as a pointer.

This was debugged with the help of Eduardo Habkost, who believes it
works on x86 due to big structs being passed as pointers.

Fixed: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3440
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1848>
2021-05-18 23:06:50 +00: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
Quentin PAGÈS
3c6fd75ab7 Update Occitan translation
(cherry picked from commit 2c07918169e6f201a5d87d0a5bc44c1d751cf1aa)
2021-05-16 08:22:59 +00:00
Florian Müllner
cd7572f269 Bump mutter requirement 2021-05-14 17:16:35 +02:00
Florian Müllner
fe466fafce Post-release version bump 2021-05-14 16:54:06 +02:00
Florian Müllner
8e644ec39b Tag release 40.1
Update NEWS.
2021-05-13 16:46:39 +02:00
Quentin PAGÈS
65a35a9c36 Update Occitan translation 2021-05-13 13:47:12 +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
Carlos Garnacho
279db3f168 st/button: Consider touch sequences for ::pressed state
We do notify on the ::pressed property after touch begin/end and
recording the event sequence, but we do not return the correct value
if the button was triggered via touch.

Consider the event sequence also in the ::pressed getter, so the
button is considered pressed.

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
Florian Müllner
3eda672929 st/scroll-view-fade: Add :extend-fade-area property
Since commit f60a469a34, everything outside the fade area is painted
fully transparent. That is required for the fade effect during app
grid navigation, to prevent unfaded parts of surrounding pages
becoming visible on wide-screen displays.

However in most other cases, that behavior is the exact opposite
of what we want: Elements outside the fade area (like scroll bars)
should never fade.

In order to fix the regular case, hide the new behavior behind a
property.

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

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
Quentin PAGÈS
a08355931f Update Occitan translation 2021-05-09 18:47:57 +00:00
Jordi Mas
78f82348a2 Update Catalan translation 2021-05-07 18:57:46 +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
bad94ab350 overview: Increase margin-top of the dash slightly
Now that we made window previews overlap the edges of the wallpaper
underneath them, the app icons of those windows are getting quite close
to the dash and there is almost no more spacing.

Let's make it look a little bit better and slightly increase the
margin-top of the dash so that the workspaces move a few more pixels
away from the dash.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1813>
2021-05-04 14:16:46 +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