Commit graph

16290 commits

Author SHA1 Message Date
Florian Müllner
87f944a1d4 Bump version to 41.5
Update NEWS.
2022-03-20 15:10:40 +01:00
Jonas Dreßler
b9e04b5337 workspace: Force creating new layout when there's no allocation yet
Commit ba23279f1f was aimed at fixing a
bug where the layout is frozen so early that we don't have an existing
one to re-use, because no allocation cycle happened yet. It tried to fix
that by forcing the creation of a layout when needsLayout === true,
this turned out to be a bit too much, as it also forced creating a new
layout when the layout was frozen after closing a window (which would
set needsLayout to true).

To fix this regression and still avoid reintroducing the bug the
previous commit fixed, tighten the check a bit and only force creating
the new layout when there's no allocation yet. This makes freezing the
layout after closing a window work again.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2236>
(cherry picked from commit b17f00cfb1)
2022-03-20 14:10:10 +01:00
Jonas Dreßler
e5bc135efd workspaceAnimation: Get time outside of the animation-complete callback
We want to use the current event time for activating the workspace, and
this time is only available when calling global.get_current_time() or
Clutter.get_current_event_time() from the context of an event handler.

So instead of trying to get that time when the animation has finished
from the onComplete() handler, get it before and store it as a variable
to use in the onComplete() handler later.

This fixes an error message when switching workspaces using the swipe
gesture where MetaWorkspace complains about the 0-timestamp we pass it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2233>
(cherry picked from commit aa9edc37a5)
2022-03-20 14:09:56 +01:00
Ivan Molodetskikh
ce25624407 windowManager: Change unfullscreen mode to NORMAL
The unfullscreen action doesn't make sense in other modes. In the
overview in particular it also prevents clicking on the top bar items on
a workspace with a fullscreen client.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2227>
(cherry picked from commit 4bc195e797)
2022-03-20 14:09:31 +01:00
Sebastian Keller
e028db0440 workspace: Scale slots to current workspace size when layout is frozen
The transition from the overview freezes the workspace layout at the
start of the animation, which means that the calculated window slots
remain the same while the workspace itslef grows. This causes the
windows to appear slightly shrunk in comparison to the workspace and
shifted to the top left. This is especially noticeable during the
beginning of the animation when there is more weight on the slots than
the original window position and if there are not that many open
windows.

Unfreezing the layout for this transition is not possible, because it
would cause issues with newly opened windows abruptly changing the
layout when the animation happens after starting a new app.

This change instead tries to scale the frozen layout to the current
workspace size. While this is not entirely correct, because this scales
the spacing between the slots as well, it is still more accurate than
the completely unscaled slots.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4616
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1980>
(cherry picked from commit 6d3df381b3)
2022-03-20 14:08:39 +01:00
Jonas Dreßler
d20013318f workspace: Don't freeze the layout when there's no layout yet
On some touchpads/laptops, the swipe gesture to open the overview can be
performed so fast, that it starts and ends in between two frames. Now
when this happens, and the gesture ended with too little movement to
confidently say the user intended to open the overview, we'll close the
overview again.

While closing the overview, we freeze the layout of the Workspace in
order to avoid changes to windows messing with the animation. This means
that in the case described above, we freeze the layout even before the
first frame of the opening animation happens. No frames being drawn also
means no allocations happening, and since we create this._layout in
vfunc_allocate(), this means that on the first allocation cycle of the
overview we'll see this._layoutFrozen = true, but will also not have
a this._layout nor this._windowSlots.

This creates an annoying visual glitch where for a split second all
the windows disappear (overview is visible but no WindowPreviews get
allocated).

To fix this, force creating a layout on the first allocation cycle, even
if the layout is currently frozen.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2203>
(cherry picked from commit ba23279f1f)
2022-03-20 14:08:26 +01:00
Daniel van Vugt
d4f4c8eafe st: Generate shadows from the silhouette of the source texture
As first mentioned in commit 672171093, the CSS spec defines shadow
colors independently from the colors casting the shadow. It's not
a physical light simulation so a shadow is allowed to be a different
color from texture casting it.

This means we only care about the shape of the source where alpha
values of zero are adjacent to alpha values of non-zero. And all such
non-zero pixels should be treated as fully opaque for the purpose of
shadow generation. While this would be wrong for a physical light
simulation it does allow us to cast shadows around semi-translucent
shapes and better support CSS.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4477
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1918>
(cherry picked from commit 918c063693)
2022-03-20 14:07:40 +01:00
Florian Müllner
d003a8603b dash: Fix drag placeholder position in RTL
The position corresponds to a child index, which means it must
be mirrored when starting to count from the right.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2219>
(cherry picked from commit 4735193456)
2022-03-20 14:06:14 +01:00
Jonas Dreßler
38f5557222 overview: Don't expect time argument from drag-end signal
We actually don't get a time from the xdndHandler when it emits
drag-end, so we fail right now when calling
workspaceManager.get_workspace_by_index(time).

Fix it by getting the time ourselves instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2211>
(cherry picked from commit bb1ec88dfa)
2022-03-20 14:05:51 +01:00
Florian Müllner
de8c23189b workspaceAnimation: Fix warning on restacking
Only workspace groups that are associated with a workspace have a
background. As a result, when restacking window previews we end up
passing `undefined` to clutter_actor_set_child_above_sibling()
instead of null, triggering a warning.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2209>
(cherry picked from commit 5d1b9a429e)
2022-03-20 14:05:51 +01:00
Xiaoguang Wang
08d707fbd6 network: Get dbus path from NMDevice
In the NetworkManager new version the NMDevice.get_path returns pci
path, we need to use NM prototype to get device dbus path.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2194>
(cherry picked from commit 8655814329)
2022-03-20 14:05:25 +01:00
Sebastian Keller
67c88ea6cb workspacesView: Disable workspace switching while in search
WorkspacesDisplay connects to key-press-event on the stage to switch
workspaces when page up or down is pressed and nothing else intercepts
these keys. This means that it is still possible to switch workspaces
while they are hidden behind the search.

So only allow these keybinding while the WorkspacesDisplay is reactive
which gets updated by ControlsManager depending on whether there is an
active search or not. Also set it as initially reactive, because
otherwise the keybindings would only work after performing an initial
search.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2204>
(cherry picked from commit 23047b6d80)
2022-03-20 14:05:25 +01:00
Jonas Dreßler
37639a2075 st/scroll-view: Don't queue redraw in update_fade_effect()
ClutterEffects are responsible for queueing redraws when their
properties change (and StScrollViewFade is a good citizen already), also
Clutter itself should queue a redraw when adding/removing an effect.

Users of Clutter should never have to queue redraws themselves (unless
they're implementing a custom ClutterEffect or ClutterContent), so don't
queue a redraw here.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2189>
(cherry picked from commit 8f4427f87b)
2022-03-20 14:02:26 +01:00
Jonas Dreßler
95b586fc64 st/scroll-view: Only update fade effect on CSS changes if CSS sets it
The fade effect can also be added to the scroll view programatically
instead of using CSS via the st_scroll_view_update_fade_effect() API.

We make use of this API in the appDisplay, but since commit ba547ec1d
the fade margins get overridden to 0.0 from the ::style-changed handler.
Fix this by only setting the fade margins when CSS actually defines a
custom vfade/hfade offset.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5079
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2189>
(cherry picked from commit 0b9b13942a)
2022-03-20 14:02:26 +01:00
Jonas Dreßler
5d1bc79538 dash: Subtract vertical margins from availHeight
The vertical margins are part of this._maxHeight, so we need to subtract
it in order to propery limit icon sizes when the available height is too
small.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2191>
(cherry picked from commit 2607880bf6)
2022-03-20 14:02:26 +01:00
Jonas Dreßler
a16824fa14 overviewControls: Factor in margin-bottom for dash startup animation
We set a margin-bottom on the dash to give it some margin towards the
monitor edge, we need to factor in this margin when moving it outside of
the monitor for our animation.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2191>
(cherry picked from commit b9abf6fcf5)
2022-03-20 14:02:26 +01:00
Balázs Úr
f38bce4e37 Update Hungarian translation 2022-03-13 00:02:19 +00:00
Florian Müllner
67da8310fc st/theme-node: Add missing precondition checks
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4851

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2207>


(cherry picked from commit 574594ec22)
2022-02-23 17:58:59 +00:00
Changwoo Ryu
96c60d48f7 Update Korean translation 2022-02-19 13:22:26 +00:00
Florian Müllner
637a9a4dd8 Bump version to 41.4
Update NEWS.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2186>
2022-02-15 18:22:11 +01:00
Jonas Dreßler
6303592c88 st/label: Compare shadow spec before invalidating shadow on style change
Just like with the last commit for StEntry, check whether the text
shadow actually changed before invalidating the pipeline on style
changes of StLabel.

(cherry picked from commit 09903b6426)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Jonas Dreßler
7d4163702f st/entry: Compare shadow spec before invalidating shadow on style change
Instead of doing a lot of useless work every time we receive the
style-changed signal, only invalidate our text shadow pipeline in case
the shadow actually changed.

(cherry picked from commit ba774e1fa2)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Jonas Dreßler
ccf5025e6d st/shadow: Add a fast path to comparisons
We do this in most places in St, it's consistent to do it here, too.

(cherry picked from commit 3b4a1fcd51)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Jonas Dreßler
8093913271 st/label: Invalidate text shadow on style changes to ClutterText
Just like with the last commit, listen to some ClutterText property
changes to catch style changes that were trigerred by
_st_set_text_from_style() and invalidate the shadow spec on changes.

(cherry picked from commit 8b3e1e01f6)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Jonas Dreßler
6185ba5316 st/entry: Invalidate text shadow on style changes to ClutterText
We update a few properties of ClutterText when the CSS changes via
_st_set_text_from_style() (which we call when receiving the
style-changed signal).

Right now we simply invalidate the text shadow every time we receive the
style-changed signal, but we're going to change that with the next
commits. To ensure the shadow still gets invalidated on CSS changed that
might affect the shadow, listen to a bunch of property changes that will
get notified when any property that affects the shadow changes.

(cherry picked from commit 898334f31d)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Jonas Dreßler
cd4e0c0570 st/entry: Invalidate shadow on cursor position/size changes
When text shadows are used, the cursor indicating the current position
also casts a shadow.

This means we have to regenerate the shadow texture after the cursor
position changed, so invalidate the shadow in that case.

(cherry picked from commit 2bb36db9e8)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Carlos Garnacho
13e19163ce popupMenu: Avoid open state reentrancy in dummy menus
Dummy menus may emit ::open-state-changed multiple times for
the same state. Avoid doing that so that the PopupMenuManager
is happy not having to handle reentrancy.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5064
(cherry picked from commit 89db7bbb12)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Florian Müllner
20a86c87d3 ibusManager: Fix version in log message
Whoops, we the log message complaints about minor.minor instead
of minor.micro.

(cherry picked from commit 615155f424)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Razze
1c1bc37a19 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.

(cherry picked from commit 55a37ac992)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Florian Müllner
f3b33aa37d 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

(cherry picked from commit 78c7d5ba0c)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Florian Müllner
e72b005698 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

(cherry picked from commit 5628849a40)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Mohammed Sadiq
8b5b97c27d osk: Remove a duplicate key from Malayalam
The same key has been included as the first item on the third row

(cherry picked from commit 9f76d121cc)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Florian Müllner
7d3dd5acb4 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

(cherry picked from commit 35466b0e0a)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Florian Müllner
92abe9409a 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

(cherry picked from commit 0cbab09044)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Milan Crha
6acfed92c1 calendar-server: Read timezone from the calendar, not its timezone cache
The calendar's timezone cache holds only timezones already received
or added to the calendar, thus when asking it for a timezone for "the first
time", it returns NULL and a wrong timezone is used instead.
The get_timezone() does not do any I/O when the timezone is already cached
on the client side, thus it's fine to use it.

This could exhibit with non-recurring events, which use custom time zones,
in which case the event is shown in a wrong time.

(cherry picked from commit 42b3b85460)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Daniel van Vugt
e28ed7ddc4 workspace: Fix a signal leak in WorkspaceBackground
(cherry picked from commit ed7fe756ef)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
kyte
2e3f5f2ad7 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.

(cherry picked from commit 1260e35093)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Florian Müllner
25049bd163 overviewControls: Handle keyboard navigation
The old view selector used to handle initiating keynav into pages.
That code became inactive when non-search related functionality
was moved elsewhere, and was finally removed in commit cf41f4a527.

We still want the keynav behavior it provided, so add similar code
to overview's control manager.

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

(cherry picked from commit 1cee7e6760)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Jonas Dreßler
89398a16ff lightbox: Fix banding issues with the vignette shader
Just as https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/352
did for the MetaBackgroundActor in mutter, let's fix the vignette shader
in gnome-shell, too.

Based on a patch originally propsed by Nikita Churaev, see
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/59.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3942
(cherry picked from commit 81f62e9df8)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Florian Müllner
4de185eedb shell/app: Do not try to activate OR windows
Since https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2029,
we track all windows, including OR ones. While this means that we can
now assume that any window can be matched to an app, it also means
we have to be more careful to not perform an unsupported action like
focus or raise on an OR window.

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

(cherry picked from commit f9037f5889)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Jonas Dreßler
aef826b2b4 altTab: Also use getWindows() for AppSwitcher
Use our custom filtering for meta_display_get_tab_list() in AppSwitcher
to be consistent and make sure the thumbnail list also includes the
remapping done in getWindows().

(cherry picked from commit 7c49ac5242)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Jonas Dreßler
1b53e8c90a altTab: Only calculate iconSize once
Right now, _setIconSize() calculates the icon size everytime the
preferred height of AppSwitcher is calculated, which happens quite
often.

Reduce the perfomance impact by only calculating the icon size once.
This has the added benefit of preventing unexpected changes to the icon
sizes while the switcher is open.

(cherry picked from commit c8f3db31b8)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Jonas Dreßler
cdb65ebfa8 altTab: Check for reentrancy in override function of _onItemMotion()
Just like in the parent _onItemMotion() function, we should check for
reentrancy in our override.

Because the hover timeout will prevent a new selection from happening
for some time, in addition to checking for this._highlighted reentrancy,
we also need to track the item that's being hovered during the timeout.

(cherry picked from commit 7f65fa49db)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Florian Müllner
a290d3905a shellDBus: Return error on invalid app IDs
When passing an invalid or unknown app ID to FocusApp(), we currently
open the app picker and silently fail to select the desired app.
Instead of half-working like that, make it clear that the argument
was invalid by returning an appropriate error. (It's easy to get the
ID wrong, as unlike appstream/flatpak IDs, we include the ".desktop"
suffix).

(cherry picked from commit 1e2a10f83b)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Daniel van Vugt
06ad30f54c lightbox: GLSL requires real numbers, not integers
At least backward-compatible GLSL requires real numbers only. It's a
fatal shader compilation error to use integers in GLES and older GL
versions like that of i915.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2115
(cherry picked from commit e38a416246)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Leleat
bb9441c1d2 popupMenu: Center labels vertically
(cherry picked from commit f4b75d02cc)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Florian Müllner
385be314fc extensions-tool: Request missing attribute
g_file_enumerator_iterate() requires an enumerator that was created
with standard::file.

(cherry picked from commit 869560e054)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Naïm Favier
be9ca09ef0 loginDialog: Fix timing issue
Fix the first task of the timed login batch not returning the hold on
`_waitForItemForUser`.

(cherry picked from commit 3de418ea3b)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Florian Müllner
d06a4617cb panel: Fix corner transition when slowed down
Both ease() and CSS durations take the slow-down factor into account,
so the corners currently end up using the square of the factor in their
transition.

(cherry picked from commit 6a10f2f2f1)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00
Aleksandr Mezin
9e8dc494f9 extensionSystem: Ignore spurious disable-extension-version-validation change
Ignore spurious change notificatons, when the setting didn't actually change
(triggered by `dconf update`)

Workaround for https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4808

(cherry picked from commit 12c300a7a2)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
2022-02-14 15:51:37 +01:00