9947 Commits

Author SHA1 Message Date
Philip Withnall
554af00a6d breakManager: Activate wellbeing settings on clicking notification
Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8305
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3685>
2025-04-28 15:52:14 +00:00
Sebastian Keller
0e304100ab loginManager: Use signal argument to detect preparing for sleep
The DBus PreparingForSleep property on org.freedesktop.login1.Manager
does not trigger PropertyChanged signals, leading to wrong values due to
gdbus caching. In most cases it would have always been false.

Additionally it was not included in the XML interface description file
included in gnome-shell. So it was actually undefined.

Since this property is used in _calculateUserStateFromLogind() to
determine that a user is not active when closing the lid on a laptop,
the user was considered still active.

Fix this by storing the "start" argument from the PrepareForSleep signal
instead of trying to read from the property.

Fixes: 6a43b6f55 ("timeLimitsManager: Store screen time state on suspend/resume")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8185
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3679>
2025-04-28 15:52:14 +00:00
Sebastian Keller
7fc7724e85 slider: Align handle size with with pixel grid
Since the handle radius is used to calculate the width and height of the
slider, having the calculated size be a non-integer value can cause the
following widgets in a box-like container to be unaligned with the pixel
grid, which can lead to blurriness or other visual issues.

This for example could be observed with the interface font set to
"Cantarell 12", which results in a handle radius of 8.278. In quick
settings when showing two consecutive sliders, the second slider then
gets rendered at a non-integer vertical offset.

Further having a non-integer size for a StDrawingArea can cause the
texture to get slightly squished or stretched as the size of the cairo
surface is rounded to the nearest pixel, but rendered using the
unrounded actor size.

This commit changes the border radius rather than ceiling the preferred
width/height so that the handle size always matches the width or height
of the widget and there are no visual gaps caused by a partially filled
pixel.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3648>
2025-04-28 15:52:14 +00:00
Sebastian Keller
ad0d94a233 slider: Use correct handle size when calculating rightmost position
Using the ceiled radius for calculating the rightmost position the
handle can take on the slider was resulting in a small gap when the size
was not an integer value since the radius used when drawing the handle
is not ceiled.

This effectively reverts 38da479e which seems to have been the wrong fix
for the problem it was trying to solve. The problem presumably had been
caused by not considering the border that the handle still had at that
time.

The border issue was then later fixed by 3ddae9d8, without reverting
38da479e. Then in 6fd0aac8 support for drawing borders on the slider got
dropped, including the changes from 3ddae9d8, leaving us with just the
changes from 38da479e but now without borders on the handle.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8187
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3648>
2025-04-28 15:52:14 +00:00
7f0d4d91b9 API changes for GNOME 48 2025-04-28 15:48:54 +00:00
c47b061e59 Fixes label scaling problem that causes giant labels to appear 2025-04-07 13:52:58 +00:00
69e1602a94 sync adjustment to current active workspace
In case the workspace context has changed
2025-04-07 13:52:58 +00:00
05033e0c51 Remove realm search provider. It sux. 2025-04-07 13:52:58 +00:00
661e293434 Replace window realm frame decorations with nicer label decorations 2025-04-07 13:52:58 +00:00
caf601b2a8 COGL API changes 2025-04-07 13:52:58 +00:00
a0c4fedee5 1) fix restacking log warning 2) use connectObject API 2025-04-07 13:52:58 +00:00
ac7335af65 Update indicator on current-realm property change
...even if WorkspaceContext does not change.
2025-04-07 13:52:58 +00:00
c254a7391c don't use deprecated clutter container api 2025-04-07 13:52:58 +00:00
22cb8cd311 Convert to use ESM modules
See: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1499
2025-04-07 13:52:58 +00:00
9a32a113b2 Refactor how workspaces are tracked upon workspace context change. 2025-04-07 13:52:55 +00:00
b92df61f50 Change to use Promise API instead of callbacks 2025-04-07 13:51:03 +00:00
2d3d55634f Use connectObject() and adopt to style in search.js 2025-04-07 13:51:03 +00:00
a48171ffd0 Avoid negative page values 2025-04-07 13:51:03 +00:00
a5e83b2d55 Map windows to realms by calling realmsd pid lookup method 2025-04-07 13:49:08 +00:00
b5d28b2e9a Don't display label on full-screen windows 2025-04-07 13:46:36 +00:00
34eb77db93 Ensure that Main.overview._overview exists before accessing it. 2025-04-07 13:46:36 +00:00
f675f95c67 Citadel changes to gnome-shell 2025-04-07 13:46:32 +00:00
Florian Müllner
e6e9822d8c screenshot: Close overview/calendar when activating notification
While the notifications are transient, they still appear in the
message list while the banner is shown, and can be activated
there.

The expected behavior in that case is that we close the calendar
popup and/or leave the overview.

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

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3667>
2025-03-16 13:44:03 +00:00
Florian Müllner
2bff2e5a00 status/bluetooth: Disconnect device signals on destroy
Devices may outlive the corresponding menu item, for example on
shutdown. Make sure that signals are disconnected correctly in
that case to avoid warnings.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8223
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3669>
2025-03-16 02:27:58 +01:00
Daniel van Vugt
52c2b0e507 keyboard: Silence 'Need keyval or commitString' error
Because it's not an error if the key has a GUI action that is not
a key or commit.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7483
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3664>
2025-03-14 16:51:04 +00:00
Philip Withnall
7183e75f05 timeLimitsManager: Remove a redundant fallback value
This code was originally copied from `lightbox.js`, where the fallback
is potentially useful because the duration is provided as an argument.
The `timeLimitsManager` uses a constant as the duration, though, so the
fallback is just confusing.

Spotted in https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3655#note_2369352

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3655>
2025-03-05 12:06:07 +00:00
Philip Withnall
5d1157cdfa breakManager: Switch from lightbox to a Clutter effect for fading out
From some testing on a full session with break reminders enabled, it
seems that it’s possible to break the stacking order of the lightbox
actor if the user continues to interact with the session while it’s
visible (for example, while they’re supposed to be taking a movement
break).

Rather than try and work out what’s going on with the lightbox here, it
seems more robust to switch to using a Clutter effect, like we did with
the screen time UI (in `timeLimitsManager`). Then the effect can be
applied to the main UI group, and doesn’t depend on a separate actor
being placed in the right place in the scene graph.

So, remove the lightbox, and instead add a
`ClutterBrightnessSaturationEffect`, and use its brightness property to
fade the screen slightly while in breaks.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3655>
2025-03-05 12:06:07 +00:00
Philip Withnall
e950697156 breakManager: Allow break to be taken or delayed when overdue
This makes the buttons on the ‘break overdue’ notification match those
on the ‘time to take a break’ notification. This makes more sense than
showing no buttons on the former, because it leads on from the ‘time to
take a break’ notification after a short wait.

By adding a ‘Take’ button it gives the user a path to acknowledge that
they are starting to take their break, rather than having to let the
session idle.

The ‘break overdue’ notification wasn’t on the original design[1], which is
probably why its buttons got overlooked.

[1]: https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/wellbeing/wellbeing.png

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3656>
2025-03-04 18:42:41 +00:00
Peng Wu
c4a487bf96 ibusCandidatePopup: Fix set-cursor-location-relative signal handling
Fixes: 6982f2daae ("ibus-candidate-popup: Scale coordinates from IBus")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8228
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3659>
2025-03-04 16:49:14 +00:00
Philip Withnall
f8024a5447 timeLimitsManager: Hold inhibitor for sleep to allow saving screen time data
This avoids the race between systemd emitting the `prepare-for-sleep`
signal, gnome-shell then starting to write the screen time data to disk,
and systemd suspending the hardware.

The race isn’t so much of an issue if the suspend succeeds (if
gnome-shell loses, the data will still get written out when the machine
resumes), but it’s slightly problematic if the machine loses power while
suspended, as that means the latest screen time data is lost.

Includes significant suggestions from Florian Müllner.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3643>
2025-03-03 15:15:25 +00:00
Philip Withnall
6a43b6f551 timeLimitsManager: Store screen time state on suspend/resume
There are two main changes in this commit:
 * Listen to the `prepare-for-sleep` signal from `LoginManager`, which
   is emitted just before suspending and just after resuming. When the
   signal is received, update the user’s screen time state (active or
   inactive), add a transition if necessary, and save the screen time
   history if necessary.
 * Factor the `preparingForSleep` property of `LoginManager` into the
   user’s screen time state, meaning that the user will be considered
   inactive between the system going for suspend and coming back from
   resume.

The rest of the changes in the commit are boilerplate to allow for this
functionality to be unit tested.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8185
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3643>
2025-03-03 15:15:24 +00:00
Philip Withnall
9dd5f7a8a8 timeLimitsManager: Fix a typo (bad encoding) in a link in a doc comment
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3643>
2025-03-03 15:15:24 +00:00
Philip Withnall
2415b4f005 loginManager: Expose systemd’s PreparingForSleep property
This will be used in upcoming commits to save the screen time state just
before the system goes to sleep.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8185
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3643>
2025-03-03 15:15:24 +00:00
Marco Trevisan (Treviño)
7e0658ce6e authList: Expand the list items to use all the available space
So they look as expected and as any other item in the auth prompt

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3647>
2025-02-26 16:11:58 +00:00
Alessandro Astone
65d38939e2 shell/network-agent: Do not query keyring in greeter mode
When trying to connect to a network from gdm, it doesn't make sense to query
secrets from the gdm user since it's a system user.

Furthermore, gdm runs an isolated dbus-session per gnome-shell instance
(for multi-seat setups). Instead, gnome-keyring-daemon is started by systemd
and so it registers on the _main_ dbus session of the gdm user session.
Then, gnome-shell tries to dbus-activate another gnome-keyring-daemon on its
isolated bus, but gnome-keyring-daemon refuses to start as it sees another
instance already running, exposed at $XDG_RUNTIME_DIR/keyring/control.
After a 25s timeout, gnome-shell aborts the request without ever prompting
for a new password.

Because it is both problematic and pointless to query secrets in this case,
let's avoid it altogether and just prompt the user for the network password.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3646>
2025-02-26 16:06:05 +00:00
Florian Müllner
c0e3dfd166 data: Add "System" default folder
The "Utilities" folder is potentially getting quite crowded,
so set up an additional "System" folder. It will be populated
in a follow-up commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3642>
2025-02-26 13:09:16 +00:00
Sebastian Wick
11d05c4aea Adjust to MetaCursor changes 2025-02-18 22:20:41 +01:00
Florian Müllner
2c714645d3 main: Don't set stage key focus to stage itself
Moving the key focus to the stage should be done by unsetting
the key focus, not by setting it to the stage itself.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3633>
2025-02-14 20:23:48 +01:00
Florian Müllner
a8d4c679eb searchController: Adjust to Clutter.Stage.get_key_focus() change
The method is now a plain getter of the `key-focus` property,
so handle the case where it returns null.

See https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4256

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3633>
2025-02-14 20:22:59 +01:00
Florian Müllner
852a0a89ac appDisplay: Filter apps in default folder
We currently create the default folder with the corresponding
app list, regardless of whether the apps are actually part of
the default install or not.

This matters when a user explicitly install such an app later,
as it will be hidden away in the folder rather than appended
to the app grid as expected.

To avoid that, only add currently-installed apps to the folder
when creating it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3632>
2025-02-13 19:59:17 +00:00
Florian Müllner
38c6293f4f data: Generate dash/app-grid defaults from text files
Defining default apps as serialized GVariants isn't very human-friendly,
which likely contributes to the fact that the lists are in parts horribly
outdated (Books! Cheese! Screenshot! gedit!).

Instead, generate the lists at build time from simple text files, which
should be much easier to update.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3632>
2025-02-13 19:59:17 +00:00
Keyu Tao
33354c718f windowPreview: Adjust WindowPreview stack when stackAbove overlay shown
When there are 3 or more windows in WorkspaceLayout, showing or hiding
window preview overlay in some certain orders could cause
inconsistencies in windows' vertical arrangement.

Let's take window A, B, C as an example. Initially, A is above B and B
is above C in workspace layout like this: A -> B -> C.

After opening activities, user could:

1. Move cursor to B preview, which would move B above all in layout:
   B -> A -> C
2. Move cursor from B to C preview. When C's showOverlay() is called
   before B's hideOverlay(), _restack() would move C above all and don't
   change B's arrangement:
   C -> B -> A
3. Finally, move cursor away from C's preview:
   B -> A -> C

In this case, when user closes Activities, they would see window
stacking wrong for a while.

This commit adds some extra logic in _restack, checking the
_stackAbove's _stackAbove when this._stackAbove._overlayShown is true.
Though it's still not guaranteed to be always consistent as there could
be several WindowPreview with _overlayShown as true if pointer moves
really fast, this helps avoid glitches in many cases.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4638.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3460>
2025-02-13 12:38:19 +00:00
Florian Müllner
5115236703 loginManager: Get user proxy for UID
Using the user object at `/org/freedesktop/login1/User/self` is
convenient, but has the caveat that login1 does not emit the
`PropertiesChanged` signal for the object.

That is indeed logical, as for signal emissions there is no
sender that can be used to resolve `self`.

The new TimeLimitsManager depends on change notifications for
user properties, so stop using the `self` shorthand and instead
create the User proxy for the user's UID.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8185
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3636>
2025-02-13 11:31:34 +00:00
Florian Müllner
a719b7039e loginManager: Create session proxy asynchronously
Most of the function is already asynchronous, except for the
initialization of the returned proxy. gjs' D-Bus wrapper gained
some convenience API a while ago that makes this trivial enough,
so use it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3636>
2025-02-13 11:31:34 +00:00
Sebastian Wick
a7cc1e626a keyboard: Rely on tecla to figure out the current layout
Tecla shows the current layout, and keeps track of layout changes, if no
arguments are passed to it. This is exactly the behavior we want for the
"Show Keyboard Layout" button.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3635>
2025-02-13 03:58:23 +00:00
Julian Sparber
ef4af961bf messageList: Floor preferred height of LabelExpanderLayout
This fixes the flickering when expanding/collapsing an expandable
message inside a NotificationMessageGroup.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3012>
2025-02-11 11:30:29 +00:00
Julian Sparber
b4113b1ee2 messageList: Highlight expanded group
The new design requires that other messages and groups are faded when the user
has a group expanded. This introduces a new GLSL shader to provide the
desired effect. The new shader is used for the already existing scroll
fade and the previous one is removed. The two fades need to work together to
ensure that resulting fade looks good.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3012>
2025-02-11 11:30:29 +00:00
Julian Sparber
a795dfb2ff messageList: Center expanded notification group in view
Ensure that when the user expends a group, it is scrolled to and centered
in the in the `MessageListView`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3012>
2025-02-11 11:30:29 +00:00
Julian Sparber
aac7c125ce messageTray: Increase max messages per source to 10
After introducing message grouping by source we can safely show much
more messages per source.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3012>
2025-02-11 11:30:29 +00:00
Julian Sparber
47de83a922 messageList: Make notification groups expandable/collapsible
This implements the new expand/collapse feature for notification groups
according to the new notification designs [1].

[1] 9e2bed6f37/notifications-calendar/notifications-grouping.png

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3012>
2025-02-11 11:30:29 +00:00