Commit graph

18251 commits

Author SHA1 Message Date
Florian Müllner
8bb752adf4 Bump version to 45.2
Update NEWS.
2023-12-01 20:43:51 +01:00
Florian Müllner
7bdcfdd98a extension-tool: Show "version-name" field if set
Now that both the website and the Extension app support the custom
"version-name" field, we should expose it in the CLI tool as well.

As a more developer-oriented tool, keep showing the automatic
version along-side the new field when both are set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3034>
(cherry picked from commit ca47e7f8e3)
2023-11-30 23:23:58 +01:00
Aryan Kaushik
9111ac79a5 extensions-app: Support "version-name" metadata field
The extensions site recently added support for a custom
"version-name" string in metadata:
gitlab.gnome.org/Infrastructure/extensions-web/-/merge_requests/154

This allows developers to control the version that is exposed to
users. As the version according to the developer is almost always
more relevant than the automatic version assigned by the website,
use it instead of the "version" field if set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2995>
(cherry picked from commit 6db55eaea6)
2023-11-30 18:46:38 +01:00
Peter Hutterer
09ab8fdcba padOsd: Fix rings and strips event handling
JS ERROR: TypeError: event.get_pad_event_details is not a function
    vfunc_captured_event@resource:///org/gnome/shell/ui/padOsd.js:824:53
    @resource:///org/gnome/shell/ui/init.js:21:20

These were renamed in mutter@97213041e8e7

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3029>
(cherry picked from commit e367a2713b)
2023-11-30 18:46:14 +01:00
Sam Hewitt
38bbc05f04 style: Fix oversights in screenshot UI css for high contrast
- fix non-working is_highcontrast if statements in drawing
- add missing hc bits for screenshot UI elements

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3030>
(cherry picked from commit ad5cffbce4)
2023-11-30 18:46:09 +01:00
Florian Müllner
8083df5e35 dbusServices/extensions: Only show dialog when loaded
After the port to ESM, an extension's `prefs.js` file is imported
asynchronously. An unintended side effect of that is that we now
show the dialog before anything can be added to the window (either
by the extension, or the fallback error UI).

The delay almost always won't be noticeable to users, but it's
bad practice and prevents extensions from using some API that
only works before the window is realized.

To address the issue, add a `loaded` signal to the dialog that allows
the caller to postpone showing the window until the UI is ready.

Close: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7201
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3025>
(cherry picked from commit 7f7ae31fa3)
2023-11-30 18:44:58 +01:00
Charles Wong
6040602d5e main: Instantiate EndSessionDialog
Using an exported `init()` function to create the object is an odd
pattern, and not having the object referenced anywhere makes it harder
to access for debugging or extensions.

Just export the `EndSessionDialog` class and instantiate it like we
do for other objects.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2997>
(cherry picked from commit 6ff08fd9bd)
2023-11-30 18:44:58 +01:00
Florian Müllner
00895e5a90 style: Stop setting slider height
Now that the slider requests a correct height, it is no longer
necessary to set it explicitly from the stylesheet.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>
(cherry picked from commit f4c9489585)
2023-11-30 18:44:58 +01:00
Florian Müllner
a2939f1ece slider: Request a size
Sliders (and level bars) currently don't request any size, so it's
up to the caller (or stylesheet) to explicitly set a size big
enough to fit the bar/handle.

That's rather unexpected, we should request the size we need ourselves.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>
(cherry picked from commit 99d49f787b)
2023-11-30 18:44:58 +01:00
Florian Müllner
be54cc7178 slider: Cache custom style properties
Custom properties are not cached by the theme node itself, so
looking them up repeatedly at every repaint is relatively
expensive.

Avoid this by caching the values ourselves at style changes.

Part-of:
<https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>
(cherry picked from commit a6706bd2ca)
2023-11-30 18:44:56 +01:00
Florian Müllner
9ffef40899 barLevel: Cache custom style properties
Custom properties are not cached by the theme node itself, so
looking them up repeatedly at every repaint is relatively
expensive.

Avoid this by caching the values ourselves at style changes.

Part-of:
<https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>
(cherry picked from commit a639fb0fc4)
2023-11-30 18:44:09 +01:00
Florian Müllner
5b494fd121 barLevel: Stop capping border-width at 1 pixel
I can't think of a reason why limiting the border to a maximum
would make any sense.

The original intention was probably to set a minimum border width
to avoid having to deal with border/no-border complexity in the code,
but as cairo accepts a line width of 0, it just works.

However limiting the size to the overall height seems reasonable,
as at that size a bigger height and different fill color can
achieve the same effect without requires special handling of
other values like the radius.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>
(cherry picked from commit 77a72cec1e)
2023-11-30 18:40:37 +01:00
Florian Müllner
3361e03cc7 status/volume: Always look up device objects
Gvc may clean its device cache after we set up the device menu,
which can lead to failed assertions when using the "old" object
to later switch the device from a callback.

Make sure this doesn't happen by looking up the ID again from
the callback.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7173
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3011>
(cherry picked from commit 7a04d92bc0)
2023-11-30 18:39:41 +01:00
Julian Sparber
d967fedea3 st/viewport: Set adjustment properties all at once
This ensures that that property changes are notified all at the same
time and only after all were set. If we notify too early handlers
may act on a "broken" viewport.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3023>
(cherry picked from commit 5b8347f90b)
2023-11-30 18:39:23 +01:00
Julian Sparber
34e0b57a29 st/adjustment: Ensure changed signal emission is compressed
The docs say that `st_adjustment_set_values()` emits the `changed`
signal only once but it's actually emitted for each changed property,
this uses the `dispatch_properties_changed` vfunc to emit the `changed`
signal only per call to `st_adjustment_set_values()`. As a positive
side effect this also makes it possible to use `g_object_freeze/thaw_notify`
to compress the `changed` signal emission when using the setters for
properties.

This also fixes the wrong emission of the `changed` signal in
`st_adjustment_set_values()` when only the `value` property is changed.

Side note: the code is heavily inspired by GtkAdjustment

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3023>
(cherry picked from commit 78eb5f2a68)
2023-11-30 18:39:17 +01:00
Florian Müllner
1fdcd6d5f8 shellDBus: Await Eval() result
The Eval() method currently evaluates the provided string, and
returns the result immediately. This isn't useful when a promise
is returned, which has become much more likely now that accessing
any module requires import().

Simply await the result, to handle both sync and async code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3021>
(cherry picked from commit f2601e6888)
2023-11-30 18:39:06 +01:00
Jonas Dreßler
8a9d23b95e st/scroll-view: Hide scroll bar from layout when its hidden
We hide scrollbars with POLICY_AUTOMATIC when the content of the scroll
view fits completely inside the view without having to scroll. In this case
it seems like a good idea to give the content the full available size
without subtracting scroll bars from that size.

So subtract the scroll bar from the size we give to the child only when
the scroll bar is actually visible, when it's invisible subtract 0 instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2190>
(cherry picked from commit 65e56183b1)
2023-11-30 18:38:15 +01:00
Jonas Dreßler
c2a825ef0b st/scroll-view: Allocate the scrollbars 0-size instead of not painting them
StScrollView applies the policy of whether to show or hide the scroll
bar,
and with the AUTOMATIC policy the scroll bar should be hidden as soon as
the
content of the scroll view is small enough to fit without scrolling.

Now we only know about the final size of the content when we're inside
st_scroll_view_allocate(), so that's where we can decide whether the
scroll
bar should be visible or not. Clutter really doesn't like calling
clutter_actor_show/hide() in the middle of an allocation cycle though,
so
what we do instead is saving the state into priv->vscrollbar_visible,
and
then just not painting the scroll bar based on that in a paint() vfunc
override.

This approach is not great for several reasons, it means we also have to
override pick() and finally it means the paint volume of the scroll bar
is
incorrect.

While the greatest solution to this would be to just hide/show the
scroll
bar inside the allocate() function as it is possible in gtk, we have an
established pattern for this kind of case too: We usually allocate a
0-sized
rect for the thing we want to hide, so let's do that instead.

A nice side effect is that we can conveniently drop another paint() and
pick() vfunc override.

Part-of:
<https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2190>
(cherry picked from commit a59a992daa)
2023-11-30 18:37:32 +01:00
Sebastian Keller
071d59fbab main: Move g_setenv() calls before calls that may start threads
setenv() is not thread-safe and must happen before starting threads. The
g_setenv() calls in main() happened after meta_context_configure(),
which will start a thread via meta_profiler_new() which in its init
calls g_bus_get().

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6974
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3018>
(cherry picked from commit 8d7dc098b1)
2023-11-30 18:36:37 +01:00
Sebastian Keller
f43301212d searchController: Use ClutterText::cursor_position instead of position
The deprecated position property has been removed in mutter commit
31849868 in favor of the otherwise identical cursor_position property.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7186
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3015>
(cherry picked from commit ee5819f870)
2023-11-30 18:36:11 +01:00
Sebastian Keller
96b3d1890c keyboard: Fix backspace not getting released after deleting preedit
When deleting is toggled while a preedit string is present, this causes
_toggleDelete() to use keyvalPress(). After the entire preedit string
has been deleted, _toggleDelete() will no longer hit the code path that
would call keyvalRelease() due to hasPreedit() now being false.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7171
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3009>
(cherry picked from commit 4722dd0d32)
2023-11-30 18:35:37 +01:00
Barnabás Pőcze
9a0e2b58ac st/texture-cache: Always close GdkPixbufLoader before disposal
As per the warning emitted when destroying without closing first

  GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed.
  You must explicitly end the data stream to the loader before dropping the last reference.

closing it is necessary.

Create the GdkPixbufLoader after loading the file contents so that
the loader is guaranteed to be closed before it is destroyed.
(`gdk_pixbuf_loader_write()` closes it on failure.)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3008>
(cherry picked from commit 3e7027821d)
2023-11-30 18:35:06 +01:00
Carlos Garnacho
9cd1346e4b networkAgent: Fetch environment from launch context before spawn_async()
This will fetch the right environment for the launched application,
without using GNOME Shell's environment.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2993>
(cherry picked from commit a93465ed69)
2023-11-30 18:34:18 +01:00
Carlos Garnacho
2969a77041 misc: Fetch environment from launch context before spawn_async()
This will fetch the right environment for the launched application,
without using GNOME Shell's environment.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2993>
(cherry picked from commit 7b1223a254)
2023-11-30 18:34:08 +01:00
Sebastian Keller
39b774a5fc search: Allow grid using search providers to specify maximum of results
When GridSearchResults::_getMaxDisplayedResults() is called after the
first character has been entered in the search, GridSearchResults has
no children yet. _getMaxDisplayedResults() tries to determine the
maximum number of search results based on how often the largest child
would fit into the allocated size or -1 (i.e. no limit) if there are no
children. So for the initial search there is no limit and in the app
search all matching apps get added as possible results, which due to the
search term being only a single character is almost all installed apps.
This now causes allocation to be run for all these results, despite the
vast majority of them never being visible, which on slower machines can
cause noticeable delays before the search results are displayed.

This now adds the ability for search providers to specify a maximum
number of results that gets used instead of -1 when specified. By being
provider specific this means extensions implementing their own providers
will not be affected by this.

Further this sets the maximum for the app search provider to 6 as per
the current designs.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7155
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3004>
(cherry picked from commit 9153876764)
2023-11-30 18:32:22 +01:00
Sebastian Keller
36a07fed64 popupMenu: Only connect to notify::key-focus when needed
PopupMenuManager was connecting to notify::key-focus on the stage on
construction, but only ever reacting to it when one of its menus was
open. Given that every single app icon and text entry creates a
PopupMenuManager this was causing a lot of these handlers to be created.
Every single handler meant calling into JS code only for the vast
majority of them to determine that they would not do anything.

Additionally these handlers were leaked for the whole lifetime of the
stage due to never getting disconnected.

This now only connects the handler when a menu is open and disconnects
again when it is closed, significantly reducing the number of active
handlers at a time.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7143
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3001>
(cherry picked from commit f1b7af2ab0)
2023-11-30 18:32:16 +01:00
Florian Müllner
0ffc092942 config: Add missing semicolon
The .in file isn't valid javascript, so it's excluded from eslint
and style issues like this can slip through.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3005>
(cherry picked from commit 5fa08fe533)
2023-11-30 18:32:05 +01:00
Dušan Kazik
5808dac617 Update Slovak translation 2023-11-27 13:43:08 +00:00
Ngọc Quân Trần
5cdff101d5 Update Vietnamese translation 2023-11-11 06:55:29 +00:00
Ngọc Quân Trần
cf682750c3 Update Vietnamese translation 2023-11-11 06:48:00 +00:00
Ekaterine Papava
5be28326cb Update Georgian translation 2023-11-05 22:39:05 +00:00
Florian Müllner
a7c169c6c2 Bump version to 45.1
Update NEWS.
2023-11-01 00:18:29 +01:00
Florian Müllner
b13cce579e Revert "screencastService: Add dmabuf/GL pipeline"
The pipeline contains a GST plugin that pops up an unclosable
window. That's utterly confusing, so back out of the change
until this is figured out.

This reverts commit b916ced2e6.
Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6763
2023-10-31 22:45:56 +00:00
Sebastian Keller
9bdca96abf Revert "shell/window-tracker: Exclude screen recorder window"
This reverts commit 575ba13b9b.

That commit did not actually prevent the "Unknown" application from
showing up in the dash or app switcher when the recorder was running,
but it introduced a problem with Proton which also uses gstreamer OpenGL
elements in its transcoder. This was causing the overview to get stuck
while the transcoder was running due to the app for the
"OpenGL Renderer" window being null.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7042
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3000>
(cherry picked from commit bf742c3926)
2023-10-31 22:45:56 +00:00
Sebastian Keller
38bf547ce7 calendar: Emit selected-date-changed before rebuilding the calendar
If the cursor was placed on one of the widgets that get removed when
rebuilding the calendar due to a month change, destroying the hovered
widget will trigger a repick. This repick can then trigger an allocation
while not all buttons of the calendar are present.

If the last allocation before selected-date-changed is emitted was from
such an incomplete state, DateMenuButton will still freeze the layout in
this state in its signal handler.

What freezing the layout in DateMenuButton is supposed to do is to
prevent size changes of the menu when changing days, but for this the
layout needs to be frozen before potentially rebuilding calendar. This
change ensures that by emitting the signal earlier.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5411
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5469
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2989>
(cherry picked from commit 23bcff3348)
2023-10-31 22:45:56 +00:00
Alessandro Bono
ae5e8fa924 screenShield: Use duration 0 when not animating
Instead of using a special branch for the not animate case, just use
the same path with duration 0.

Since commit ee09c5c853 we are sure that
duration 0 is always preserved.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2987>
(cherry picked from commit b4676f0e9e)
2023-10-31 22:45:56 +00:00
Alessandro Bono
7d2014da71 popupMenu: Use duration 0 when not animating
Instead of using a special branch for the not animate case, just use
the same path with duration 0.

Since commit ee09c5c853 we are sure that
duration 0 is always preserved.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2987>
(cherry picked from commit 46219b1101)
2023-10-31 22:45:56 +00:00
Alessandro Bono
ef7a14c69d messageTray: Use duration 0 when not animating
Instead of using a special branch for the not animate case, just use
the same path with duration 0.

Since commit ee09c5c853 we are sure that
duration 0 is always preserved.

In the not animate case, we now call this._updateState(). This was not
happening before.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2987>
(cherry picked from commit 1571171a21)
2023-10-31 22:45:56 +00:00
Alessandro Bono
902c373249 messageList: Use duration 0 when not animating
Instead of using a special branch for the not animate case, just use
the same path with duration 0.

Since commit ee09c5c853 we are sure that
duration 0 is always preserved.

In the not animate case, we now call this._actionBin.hide(). This was not
happening before.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2987>
(cherry picked from commit be49c8efc2)
2023-10-31 22:45:56 +00:00
Martin Zurowietz
0226bd273d js: Export variables and classes for Workspace Matrix extension
Most of these were "var" before the port to ESM (!1499). Here they
are exported again.

References !1499

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2978>
(cherry picked from commit 7d835bf455)
2023-10-31 22:45:56 +00:00
Georges Basile Stavracas Neto
9068666077 style: Always use light text for recording indicator
The red tone that the recording indicator uses as background doesn't
lend itself well to dark text and icon on top. Stick to a light color.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7112
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2983>
(cherry picked from commit 80f6fb79c3)
2023-10-31 22:45:56 +00:00
Florian Müllner
5de44898d9 shell/app: Adapt to focus changes in mutter
meta_window_raise_and_make_recent() now only works as advertised
for windows on the active workspace.

That results in the following unexpected behavior:
 1. open two windows of an app (say: terminal)
 2. open another app, maximize the window for best effect
 3. switch to another workspace
 4. super+tab to the first app: both windows are raised
 5. close the window; instead of moving focus to the
    2nd app window, both windows disappear because focus
    is moved to the app from 2

This was fixed with new mutter API on the main branch, but
for the stable branch it is easier to work around the issue.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2959>
2023-10-31 21:44:27 +01:00
Hugo Carvalho
92780927cd Update Portuguese translation 2023-10-26 22:09:31 +00:00
Марко Костић
acf5593bf8 Update Serbian translation 2023-10-24 04:04:29 +00:00
Efstathios Iosifidis
e1e654bb16 Update Greek translation 2023-10-16 18:59:00 +00:00
Evangelos Skarmoutsos
a3b1b13184 Update Greek translation
(cherry picked from commit 5580bd79a9)
2023-10-16 18:15:00 +00:00
Brage Fuglseth
ebf2f80360 Update Norwegian Bokmål translation 2023-10-15 19:13:33 +00:00
Brage Fuglseth
88fe5afe47 Update Norwegian Bokmål translation 2023-10-11 15:31:33 +00:00
Sundeep Mediratta
5e6ce1cce6 workspaceAnimation: Handle DESKTOP windows
Windows of type DESKTOP are currently handled like all other sticky
windows, and stick to the monitor while the animation happens in the
background.

This behavior is odd for desktop windows, which are otherwise always
kept underneath regular windows.

Instead, make them part of the background, so they keep the expected
stacking position and animate together with the workspace.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2865>
2023-10-11 13:10:18 +02:00
Florentina Mușat
e7bf451169 Update Romanian translation 2023-10-09 19:43:33 +00:00