Commit Graph

9401 Commits

Author SHA1 Message Date
Khalid Abu Shawarib
405b549a05 slider: Reverse handle direction in RTL
Rework slider handle to reverse directions when the slider is
Right-to-Left.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5107
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2943>
2023-09-15 20:52:14 +03:00
Khalid Abu Shawarib
c777425d39 barLevel: Reverse direction in RTL
Rework drawing and calculations to reverse the bar direction
when the bar is Right-to-Left.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2943>
2023-09-15 20:52:14 +03:00
Florian Müllner
ba46a1cf54 extensionSystem: Update immediately after major upgrades
Currently we periodically check for updated extensions, prepare
an update and perform it at the next login.

This is largely due to the fact that once an extension has been
loaded, its code is cached and reloading it would only make it
*appear* as updated, while in reality still running the old code.

Of course this only applies *once* we have loaded extensions.

Before that, it's possible to download and install updates, and
only then initialize extensions with their latest version.

The trade-off is that network requests, data download and extraction may
introduce a significant delay before extensions
are enabled. Most extensions modify the UI one way or another,
so that delay would likely be noticeable by the user.

Assuming that users are usually happy enough with the current
extension version, that trade-off doesn't seem worthwhile.

However there is an exception: After a major version update,
extensions are likely disabled as out-of-date, or at least
more likely to break (when the version check is disabled).

In that case delaying extension initialization to download
and install updates looks like the better trade-off, so do
that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2951>
2023-09-15 12:54:41 +00:00
xiaofan
050d0e10c7 ibusManager: Add missing environment variables required to launch ibus-daemon
IBus requires XAUTHORITY and XDG_RUNTIME_DIR to be able to spawn its XIM
implementation correctly. Using launch context to get environment can correctly
launch on non-systemd setups.

Closes: #6998

Signed-off-by: xiaofan <xiaofan@iscas.ac.cn>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2947>
2023-09-14 16:02:29 +00:00
Florian Müllner
ee11ecac46 main: Remove transitions from child adjustments
When commit 4d963c432b introduced the global workspace adjustment,
it mostly copied the adjustment handling from the overview that it
set out to replace.

That includes cancelling ongoing transitions when the number of
workspaces changed. However that missed that transitions don't
happen on the main adjustment, but on the "child" adjustments
returned from `createWorkspacesAdjustment()`.

Address this by tracking all child adjustments, and cancel transitions
there as well when necessary. Use weak refs to not
interfere with garbage collection, in case an extension creates
its own child adjustment.

Fixes: 4d963c432b ("main: Introduce global workspaces adjustment")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7000
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2949>
2023-09-14 16:46:31 +02:00
Hollow Man
8a5a25e6d3 js: Fix calendar scroll
Update to Clutter.Event getter methods in Clutter.Actor vfuncs
as the old way no longer works

Related to https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2872

Signed-off-by: Hollow Man <hollowman@opensuse.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2946>
2023-09-09 14:05:27 +02:00
Carlos Garnacho
bc3b890e75 keyboard: Only reset to the default level on unlocked latched levels
Reportedly, non-alphanumeric key levels were able to stick by
happenstance, and let the user press multiple keys until explicitly
switching to a different mode. Reportedly, this broke, switching to
the default level after the first key press on the additional levels.

Since we have this information in the OSK key models (each level has
a "mode" field to either default/latched/locked), retrieve this
information for them for each level, and only reset to the default
level if on one of those latched levels, and the relevant key was not
locked through long-press.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5763
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2945>
2023-09-08 19:42:38 +00:00
Carlos Garnacho
08f3ad3835 keyboard: Reset latched levels on string commit on all situations
The _commitAction() paths have early returns, which made resetting the
latched mode inconsistent depending on the paths taken to commit the
string. This made latched modes not return to normal on e.g. Shell
entries.

Make this happen outside the function, and after the only calling
point, so that the level is correctly reset on all situations.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2945>
2023-09-08 19:42:38 +00:00
Florian Müllner
671df28a50 screenshot: Only handle mode-switch shortcut when supported
We currently handle the 'v' key to switch between recording- and
screenshot mode regardless of whether screen recordings are
supported.

This is clearly wrong, don't do that.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2944>
2023-09-07 18:23:29 +02:00
Florian Müllner
521525948e screenshot: Do not wrongly enable window button
The window button is disabled when
 - there are no windows
 - we are in screen-recording mode
 - the session mode doesn't allow windows

However the last condition is only taken into account when
opening the dialog, but not when switching from recording-
to screenshot mode.

Address this by updating the button's sensitivity in a separate
function, so the different conditions are considered consistently.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2944>
2023-09-07 18:23:29 +02:00
Florian Müllner
d8014090fd workspaceThumbnail: Expose maxThumbnailScale as property
Some extensions want to modify the value of the MAX_THUMBNAIL_SCALE
constant. That is no longer possible, as exports are always read-only
from the outside.

Make this possible again by exposing the scale as a property on the
object itself, so extensions can override it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2939>
2023-09-06 11:35:10 +00:00
Florian Müllner
2bc4215d1d status/backgroundApps: Filter out unknown apps
While extremely rare, flatpak apps are not guaranteed to provide
a .desktop file.

We don't have anything to represent the app in that case, but at
least we shouldn't break when trying to access properties on null,
so filter out these entries.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2938>
2023-09-05 16:06:24 +00:00
aliriza
d94f7dae1d appDisplay: Add Pardus apps to default folder list
Those are distro-specific apps like YaST on Suse.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2875>
2023-09-02 16:55:36 +00:00
Lukáš Tyrychtr
c97825e832 popupMenu: Allow to use the up and down arrows to wrap around
This aligns the keyboard navigation behavior with similar menus in
other desktop environments and with GTK itself.

It allows the users to move in the menu using already known patterns
and makes the operation quicker in some cases, especially as many
users don't know about the tab and shift+tab behavior.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2525>
2023-09-01 21:50:12 +00:00
Florian Müllner
c7208df8b3 panel: Switch workspaces when scrolling over activities
The activities button now shows workspace indicators instead
of a label. Adding the ability to switch workspaces without
entering the overview seems like a logical extension.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2933>
2023-09-01 15:07:22 +00:00
Florian Müllner
56103edc0e status/bluetooth: Show immediate feedback on toggle
Since commit 6a23e8ee0f, we use the adapter state (that includes
transitional state) to indicate progress when a state change takes
a long time.

However on many systems, the delay happens on the rfkill side,
before a change request even reaches the adapter.

Address this by temporarily overriding the adapter-state with the
expected transitional state, until an actual adapter state change
occurs.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2815>
2023-09-01 11:37:04 +00:00
Florian Müllner
8c57eab5e6 status/bluetooth: Only show when rfkill is available
We currently show the bluetooth toggle when Bluetooth can be
toggled via rfkill, or when there is a powered adapter.

While the latter condition is obvious - if there is a working
Bluetooth adapter, then Bluetooth is available - it does impose
a problem: We rely on rfkill for turning Bluetooth off, so if
rfkill is missing, the toggle is stuck.

We could handle that case and power off the adapter ourselves
when necessary, but then the toggle would just disappear when
turned off.

Instead, only show the toggle when rfkill is available, so we
can assume that turning Bluetooth on and off will work.

This is also consistent with Settings, which shows Bluetooth
as unavailable in this case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2815>
2023-09-01 11:37:04 +00:00
Florian Müllner
f1317f07db environment: Add Meta.Rectangle compatibility
Meta.Rectangle was replaced by Mtk.Rectangle. Mutter defines a
typedef for compatibility, but it turns out that gjs fails to
pick it up.

Work around that by adding a small compatibility function
that prints a deprecation warning and returns the expected
Mtk.Rectangle.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2930>
2023-08-31 22:05:32 +00:00
Florian Müllner
d9bc474dea layout: Fix missing switch to MTK
This bit was missed, probably because it uses the cairo type
instead of Meta.Rectangle.

Fixes 80237b1082
Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6970

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2930>
2023-08-31 22:05:32 +00:00
Florian Müllner
8538a42943 windowMenu: Use NONE ornament by default
We now hide ornaments by default. As some of the items in the
window menu can be checked, that means that they will now shift
horizontally, and no longer align with other menu items when
checked.

That's quite bad, and as the items in question don't form a
distinctive group/section, adding back the spacing only to
those two items would still look fairly awkward.

So revert back to the previous behavior for this particular menu,
and default to the NONE ornament.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2926>
2023-08-31 21:35:23 +00:00
Florian Müllner
3a393738ea status/network: Don't show OWE networks as secure
The OWE protocol is used by public networks to provide some
form of encryption, but without authentication. That makes
them more secure than unencrypted public networks, but still
significantly less secure than "proper" encryption types like
WPA.

The are not shown as secure by Settings' network panel, so we
shouldn't do so either.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2927>
2023-08-31 11:54:51 +00:00
Florian Müllner
3c6c8a40ae status/network: Use connection name with hidden AP
When connected to an OWE transition network, NetworkManager
reports the connected API with a hidden SSID.

Handle this by using the active connection's name before
ultimately falling back to the device name.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2927>
2023-08-31 11:54:51 +00:00
Florian Müllner
0bfc6bd0c0 status/network: Consider active connection for network's active state
We currently show a network as connected when it includes the
device's active access point.

However when connected to an OWE transition network, the public
AP redirects to a hidden AP that we ignore. To handle that case,
also consider a network active when it includes the currently
active connection.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2927>
2023-08-31 11:54:51 +00:00
Florian Müllner
fa4d4af4c6 screenshot: Export captureScreenshot() function
It is needed by the corresponding item in the window menu.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2928>
2023-08-31 09:35:42 +00:00
Bilal Elmoussaoui
80237b1082 Adapt to the new Mtk library
As we plan to slowly phase out Cairo where possible in libmutter
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3128

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2873>
2023-08-31 03:44:32 +00:00
kramo
bd5aa95ecb appDisplay: Replace EOG with Loupe in 'Utilities' folder
Loupe replaced EOG in core apps, update the 'Utilities' folder
accordingly.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2916>
2023-08-29 22:03:56 +00:00
Florian Müllner
a6d8e7ab6f extensionBase: Use UUID as fallback gettext domain
Nowadays we can set up translations automatically, but only when
the domain is provided with the metadata.

This can be a problem, for example our extension templates use
the automatic translation handling that we recommend, but as a
result the code will throw an error unless `gettext-domain` is
added to the metadata.

Binding a text domain is cheap enough to not care about unnecessary
or duplicated calls, so add a final fallback to the UUID when no
domain was provided as parameter or in the metadata.

There is already a precedent with the `gnome-extensions pack` command
that falls back to the UUID when no explicit gettext domain was
included in the metadata.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2888>
2023-08-29 21:21:51 +00:00
Carlos Garnacho
7095ef05e1 workspacesView: Skip relayouts during destruction
The WorkspacesView may be scheduled to be destroyed during
relayout, and despite that go through the allocate() vfunc.
When that happens, the ::destroy handler is called early,
so the WorkspacesView clears this._workspaces in result.
When vfunc_allocate() is called, various paths rely on the
workspaces array being still populated, which is not the
case.

The existing check at vfunc_allocate() for the WorkspacesView
having no children is insufficient, since children are destroyed
as a result, not beforehand.

This results in the following warnings when going out of
overview:

JS ERROR: TypeError: workspace is undefined
_getSpacing@resource:///org/gnome/shell/ui/workspacesView.js:218:13
vfunc_allocate@resource:///org/gnome/shell/ui/workspacesView.js:344:18
vfunc_allocate@resource:///org/gnome/shell/ui/overviewControls.js:223:33
removeWindow@resource:///org/gnome/shell/ui/workspace.js:856:29
addWindow/<.destroyId<@resource:///org/gnome/shell/ui/workspace.js:808:22
_updateWorkspacesViews@resource:///org/gnome/shell/ui/workspacesView.js:1023:38
prepareToEnterOverview@resource:///org/gnome/shell/ui/workspacesView.js:990:14
prepareToEnterOverview@resource:///org/gnome/shell/ui/overviewControls.js:740:33
gestureBegin@resource:///org/gnome/shell/ui/overviewControls.js:802:14
_gestureBegin@resource:///org/gnome/shell/ui/overview.js:409:33
_beginGesture@resource:///org/gnome/shell/ui/swipeTracker.js:601:14
_handleEvent@resource:///org/gnome/shell/ui/swipeTracker.js:173:26
@resource:///org/gnome/shell/ui/init.js:21:20

This always happens through the _updateWorkspacesViews() paths, so there
is a new WorkspacesView taking over and the one being destroyed should
silently go away.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6935
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2918>
2023-08-29 18:35:26 +00:00
Stuart Hayhurst
215282a320 osdWindow: Allow label and level to be null
Allow passing 'null' to setLevel and setLabel, so 'null' and 'undefined'
behave the same way.

Fixes a regression introduced by a42f7c23, which caused parts of old
notifications to persist into new notifications, or elements being
incorrectly made visible

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2917>
2023-08-28 17:16:11 +00:00
Florian Müllner
4386bc49d9 iconGrid: Export zoomOutActor()
It's used in the search view when launching a search in the
corresponding app.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2911>
2023-08-25 16:21:03 +00:00
Carlos Garnacho
7501f3cd11 windowManager: Drop AppSwitchAction
This gesture to switch the focused app was already a bit of a
compromise solution at the time it was added, its clunky way to
work (3fg long press, then taps with a 4th finger to switch
application) was pretty much picking up the remains of our
limited wiggle room (sticking to 3fg/4fg global gestures, since
2fg are application domain).

But then directional 3fg gestures took prevalence, and made it
easier to switch between applications. This small gesture remained
a bit of an easter egg, largely unused and unknown.

Fast forward to today, and it's being noticed in a bad way. The
changes to event handling and delivery to actions has made this
gesture take prevalence over the wee-bit-more-popular 3fg swipe
gestures, making those never become active and never trigger.

While a gesture framework is being investigated that might
help handle these situations (or, in a less undefined manner),
this doesn't seem like a case worth going out of our way to
hack around until that is in place. We can remove this, and make
all WM interactions go through the 3fg directional gestures.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2729
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2910>
2023-08-25 00:42:27 +02:00
Florian Müllner
610b72d43a dash: Move getAppFromSource() into static method
This is a small helper function that is used by the DND handling
in the dash and its items.

It turns out that some extensions used to override it, which is
no longer possible: We don't export it, and if we did, it would
be read-only.

To make the function available again, expose it as static method
on the dash itself.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2903>
2023-08-20 01:30:55 +00:00
Florian Müllner
93b89ce0c5 panel: Add extension hook to add quick settings items
Quick Settings has become a popular extension point, but adding
items anywhere but the end has become harder since the indicator
setup was made async.

Address this with an addExternalIndicator() method that adds
indicator and quick settings items at reasonable positions.

At the same time, adjust the indicator setup to take eventually
added external items into account.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2894>
2023-08-20 01:54:09 +02:00
Florian Müllner
96bf9e700f quickSettings: Add getFirstItem() method
We will need some more access to the menu's underlying grid to
provide extension API for adding additional quick items.

Expose a new getFirstItem() method that (surprise!) returns the
first item.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2894>
2023-08-20 01:54:09 +02:00
Florian Müllner
30a36c970b quickSettings: Add insertItemBefore() method
The QuickSettings menu currently only support appending items
at the end. Extensions can get around that limitation by accessing
the private grid property to move the item afterwards, but we don't
allow this in our own code.

Expose a new insertItemBefore() method that allows adding an item
before an existing one.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2894>
2023-08-20 01:54:09 +02:00
Georges Basile Stavracas Neto
ca503774b2 panel: Add workspaces indicators in activities button
After removing the app name and icon, the next natural step that
was requested from the design team is to add workspaces indicators
to the top bar, where currently the Activities button is placed.

In addition to that, this is desired because there are known issues
with using "Activities" as a label for the overview. A more
comprehensive rationale for that can be found at [1].

Add an workspaces indicator replacing the Activities label in the
activities button.

The WorkspaceIndicators class controls how many workspaces dots
exists, their expansion, and the width multiplier. The WorkspaceDot
class takes the expansion and the multiplier, and applies it
internally so that we can get perfectly rounded dots at all
times without using CSS hacks.

The width multipliers are hardcoded, and defined by the design
team. We can revisit them later if necessary. Special care is
taken to not let these width multipliers result in fractional
widths.

When the number of workspaces changes, WorkspaceIndicators adds
new dot to the end, and animate them. When removing, scale the dot
out, then destroy it.

This does not work with workspace grids, but that's not supported
by GNOME Shell anyway, so no effort is made to cover this use case.

The button continues to have "Activities" as its accessible name,
but the label actor is removed.

Also adjust the padding of the activities pill, so it better wraps
the new indicators.

[1] https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/227

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2902>
2023-08-19 15:54:04 +00:00
Marco Trevisan (Treviño)
b5960af2fc layout: Export PressureBarrier
It's an utility function that extensions can use to create pointer barriers,
so export it to allow wider usage

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2900>
2023-08-18 03:47:51 +00:00
Marco Trevisan (Treviño)
49464e3c7a init: Include the error stack in the context termination error message
If a failure happened during initialization the shell does not provide
any debug information, and so only the error is shown without a stack
trace.

Since this information is provided, pass it as the error message.

Do not log this directly from JS so that we just use one termination
path.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2899>
2023-08-18 00:31:10 +00:00
Simon Schneegans
8d1aa7bed8 lookingGlass: Export the Inspector class
Several extensions use this class to let the
user pick application windows. Exporting this
class will make it easier for these extensions
to be ported to GNOME 45.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2898>
2023-08-17 19:32:42 +02:00
Brendan William
ae86b58d59 weather: Prevent setting Geoclue source as location name
Prior to Geoclue v2.7, the location description did not seem to ever be
set. Now, the source used to determine the location is set as the
description. This can result in the location name in dateMenu to be set
as "WiFi", "GeoIP", etc., since we relay the description as the location
name to GWeather. Instead, pass an empty string so GWeather continues
to set the location name itself.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2729>
2023-08-16 19:17:21 +00:00
Chris Heywood
f119e5282b messageList: Allow dismissal via backspace
Currently only the delete key can be used to dismiss notifications.
Some laptops don't have delete keys, resulting in needing to hit a
modifier to trigger delete.

Plus, on those keyboards that do have delete keys they're often a
little harder to strike than backspace.

https://gitlab.gnome.org/gnome/gnome-shell/-/issues/5789

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2435>
2023-08-16 14:04:47 +02:00
Florian Müllner
8619b7637d panel: Don't expand camera quick settings items
The camera indicator currently doesn't have any items, but if
we were to add one, it would almost certainly be a regular
toggle rather than a slider that needs expanding.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2891>
2023-08-15 22:33:25 +00:00
Florian Müllner
af5dd7ddd1 extensions/shared: Don't cache detected URL
The translation functions we export from extension utils must
work with all extensions, not only the first that calls one
of the functions.

That means that we are back to examining a backtrace for every
function call unless an extension defined its own translation
functions with `import.meta.url`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2887>
2023-08-14 11:46:57 +00:00
Georges Basile Stavracas Neto
f497e863fd workspaceAnimation: Sync progress with main adjustment
Create a derived workspaces adjustment using the new API, and
bind it to the 'progress' property. This is only done by the
MonitorGroup representing the primary monitor.

The progress value that WorkspaceAnimation operates on
represents the percentage within the workspaceIndices array
we are, so make sure to transform the percentage to the
correct workspace index.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2881>
2023-08-11 16:51:13 +00:00
Georges Basile Stavracas Neto
f1db3498eb workspaceAnimation: Notify 'progress' property properly
The getter of the MonitorGroup's 'progress' property sets
some values based on it, but doesn't notify the property
change.

Fix that by calling this.notify('progress') when the setter
is called.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2881>
2023-08-11 16:51:13 +00:00
Georges Basile Stavracas Neto
13f4c781d5 overviewControls: Use new workspaces adjustment API
Derive the workspaces adjustment used by OverviewControls (and
shared with WorkspacesView) from the main workspaces adjustment
using the new Main.createWorkspacesAdjustment() method.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2881>
2023-08-11 16:51:13 +00:00
Georges Basile Stavracas Neto
4d963c432b main: Introduce global workspaces adjustment
And a way to derive "sub"-adjustments from the main one.

The main and private StAdjustment properly represents
workspaces, and has all relevant properties (lower, upper,
and value) set by the workspace manager.

The main adjustment is not bound to any particular actor,
which means we cannot call the 'ease' method directly.

Consumers of this API should create adjustments using
Main.createWorkspacesAdjustment(), and this new adjustment
is bound to the actor that the consumer passed. Consumers
must not change any property of the derived adjustment other
than the 'value' property.

The 'value' property is synchronized between all adjustments
created, which guarantees that all elements that represent
workspaces can have a shared and up-to-date understanding of
where in the workspace layout we are.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2881>
2023-08-11 16:51:13 +00:00
Dallas Strouse
7e18b4d0b2 util: Export trySpawn()
It was private before, and so any users of it (including the
Background Apps menu) would fail to utilize it, making apps fail
to get told to shut down from the Background Apps menu.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2885>
2023-08-11 17:54:49 +02:00
Florian Müllner
05f5532c7d status/backgroundApps: Close after activating app
We should leave the overview and close quick settings, like we
do elsewhere when launching something.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2884>
2023-08-11 10:27:49 +00:00
Florian Müllner
8a8539ee67 js: Port Config to ESM
The Config module is shared between the main process, D-Bus
services and tests, which previously prevented it from being
ported to ESM.

The previous commit removed the last outstanding blocker, so
we can now port the last remaining module.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2880>
2023-08-10 17:42:23 +00:00