9928 Commits

Author SHA1 Message Date
Philip Withnall
8176d6b51c messageTray: Ensure _updateDatetimeId idle callback is cancelled
If the idle callback is not explicitly removed when the notification is
destroyed, it may be invoked after destruction, and try to modify the
notification after it’s been freed.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3352>
2024-05-28 18:06:32 +00:00
Marco Trevisan (Treviño)
64edd7940d js/environment: Always use Shell.util_spawn_async functions if possible
If no child setup is provided then all the shell extensions that use
GLib.spawn_async should actually use the shell spawning utils since we
are supposed to always restore the default nofile rlimit on launched
children.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3293>
2024-05-24 22:48:53 +00:00
Marco Trevisan (Treviño)
494be30764 js/environment: Add GLib spawn async overrides warning when using child setup
Using child setup functions is unsafe in gjs code so let's warn if this
happens so that extensions using a similar codepath are warned.

This could be also part of gjs, but we provide a shell override since we
have alternatives to log about.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3293>
2024-05-24 22:48:53 +00:00
Marco Trevisan (Treviño)
26e8fb90fb js: Use Shell.util_spawn_async functions to launch external processes
As explained in previous commits, it's not safe to use JS code in child
function callbacks, so let's use the safer version of it.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6698
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3293>
2024-05-24 22:48:53 +00:00
Bilal Elmoussaoui
e6618d093d window/menu: Remove move titlebar onscreen action
A feature that works for server side decorated windows only that
only adds slightly more convenience over the regular "move" action that
is still there.
Keeping it around would complicate some cleanups in upstream Mutter
so just drop it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3332>
2024-05-24 15:21:03 +02:00
Sebastian Keller
31997fa2f9 appDisplay: Set running indicator dot offset via CSS
The offset was given as a hardcoded (physical) pixel value and did not
take scaling into account. This lead to it being shifted closer towards
the icon as the scale increased.

This now replaces the hardcoded value with a CSS property which
automatically includes the scale factor.

Further this allows simplifying some calculations that previously were
trying to counteract the hardcoded offset using margins by using the
intended offset directly.

With this the dot in the dash is also now placed at exactly the bottom
of the hover highlight, while previously there was an unintentional 1px
space.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7488
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3245>
2024-05-22 19:02:42 +00:00
Florian Müllner
6fa6dd6abb workspaceThumbnails: Update target scale when fully unexpanded
We currently only update the scale when fully expanded. In order
to fix the initial expand transition, also update the scale
when fully unexpanded.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3331>
2024-05-22 12:02:00 +00:00
Florian Müllner
2694a64ebb workspaceThumbnail: Don't rely on allocation to compute scale
We currently compute the target scale from the allocated height,
which means that it only becomes available after thumbnails have
been allocated at least once at their expanded height.

As the minimap is initially hidden, this only happens after it is
expanded for the first time, which means the corresponding transition
is not animated.

In order to allow for a fix, compute the target height ourselves
to allow the scale computation to work independently from the
expand factor.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3331>
2024-05-22 12:02:00 +00:00
Florian Müllner
e7dc0de75e authPrompt: Consume cancel key event
The auth prompt currently propagates all key presses, even the
Escape press that is used to cancel it.

On the lock screen that means that the same event that cancels
the prompt (and switches back to the clock) is *also* propagated
to the handler that activates the prompt on key press.

That handler doesn't do anything when the prompt is already visible,
which is the case when the transition to the clock is animated.

However when animations are disabled, canceling the prompt will
result in a new prompt getting created immediately, and the login
screen is stuck on the prompt.

Fix this by not propagating key events that are used to cancel
the prompt.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3317>
2024-05-22 10:11:00 +00:00
Florian Müllner
dac4f2cb86 authPrompt: Use signal handler instead of vfunc
The prompt itself may get destroyed when canceled, in which
case it is no longer possible to chain up in the vfunc.

This is usually not an issue as the prompt is only destroyed
at the end of a transition, but it results in a warning if
animations are disabled.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3317>
2024-05-22 10:11:00 +00:00
Sam Spilsbury
3d9c40783f util: Implement fixMarkup in util as opposed to messageList
We want to be able to import it in the markup unit test without
bringing in a UI dependency.

https://bugzilla.gnome.org/show_bug.cgi?id=783738

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Sam Spilsbury
4711f6eee4 util: Import notifyError dynamically when needed
For unit tests, it is best not to pull in UI related code.

https://bugzilla.gnome.org/show_bug.cgi?id=783738

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>
2024-05-21 13:42:28 +00:00
Sam Hewitt
6fd0aac864 slider: Remove border drawing code add hover style
- remove all the border drawing on sliders since they are unused
- listen for hover and add hover style

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6274
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3320>
2024-05-21 13:10:49 +00:00
Sam Hewitt
43596ffca6 popupMenu: Use selected pseudoclass instead of class
- drop :focus from menuitem drawing
- update menuitem drawing function to style :selected

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7637
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3314>
2024-05-21 12:49:32 +00:00
segfault
9e6552a20d automountManager: Fix password not re-asked for TCRYPT devices
Since commit

  f881092bbc

released in cryptsetup 2.5.0, cryptsetup returns EPERM instead of EINVAL
when the TCRYPT header can't be decrypted with the provided
password and parameters.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7631
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3300>
2024-05-21 12:32:38 +00:00
Ray Strode
d8ab090d47 gdm/util: Make sure error is GError before checking it
The fingerprint device fetching code has a generic error handler,
that assumes the passed in error is GError. If it's not a
GError it will fail trying to use GError specific methods.

This commit adds some validation checking.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3319>
2024-05-20 14:38:27 +00:00
Florian Müllner
9cafdb6d27 accessDialog: Stop owning portal name
We no longer provide a portal implementation, so there's no need
for owning the name. Right now only the gnome portal consumes
the API, and that accesses it under "org.gnome.Shell".

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3326>
2024-05-20 13:34:45 +00:00
Sebastian Keller
658beda9a9 status/keyboard: Use '+' to separate variant when launching tecla
The code was not changed when switching from gkbd-keyboard-display which
was using tab to separate layout and variant. Tecla uses '+' instead.

This fix was suggested by Neil Mayhew.

Fixes: 04aaa4b67 ("keyboard: Spawn "tecla" to show keyboard map")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7638
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3324>
2024-05-19 20:24:54 +02:00
Jonas Dreßler
2a8ea4886e overviewControls: Allocate a bit more space for the dash
We want the dash to show the larger icons as often as possible, and giving
it a height of 16% instead of 15% helps with that on common screen
resolutions.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3278>
2024-05-14 18:24:07 +00:00
Jonas Dreßler
bdb0fc6b14 appDisplay: Don't add row and column spacing to the pagePadding
We use the pagePadding to adjust for the large indicators that we add on the
left and right of the appGrid.

While the original padding needs to be applied to the padding for the
indicators (as it was in super.vfunc_style_changed already), there's no
reason to add an extra row and column spacing to the pagePadding on all
sides, so remove that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3278>
2024-05-14 18:24:07 +00:00
Jonas Dreßler
9bf550da88 overviewControls: Set expandFraction for ws thumbnails to 0 when hidden
We multiply the spacing around the workspace thumbnails with the
expandFraction so that it grows with the animation to show/hide them. We
shouldn't factor in the extra spacing to accomodate for the thumbnails in
case they're hidden though, so make sure expandFraction is set to 0 after
the thumbnails got hidden.

This fixes the spacing when a user never uses workspaces (and the workspace
thumbnails are never shown), and also the first transition from
hidden->shown for the thumbnails, which currently starts at 100% scale (ie.
pops into existence).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3278>
2024-05-14 18:24:07 +00:00
Jonas Dreßler
57d0691c3a overviewControls: Reduce spacing around the workspaces minimap
With a previous commit we've made the overall dynamic spacing dynamic, but
the spacing is now a bit much when it comes to the space between search and
workspaces minimap, just as workspaces minimap and large workspaces.

The  minimap should somewhat "squeeze into the empty space" here, so
reduce the spacings above and below it a bit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3278>
2024-05-14 18:24:07 +00:00
Jonas Dreßler
b58119d5c6 overview: Make the spacing dynamic depending on screen height
The HTML/CSS sizing prototype that was done back in the day for GNOME 40 has
a dynamic spacing depending on the height of the monitor. Let's try to
follow that more closely and make the spacing dependent on screen height.

For the sizing prototype, see
https://gitlab.gnome.org/Teams/Design/os-mockups/-/tree/master/overview/sizing-prototype

This also allows removing of a bit of manually added spacing at the top of
the dash.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3278>
2024-05-14 18:24:07 +00:00
Jonas Dreßler
64e5721dd8 overviewControls: Rename appGridBox to workspacesBox
The naming of the appGridBox is quite confusing, as it actually
describes the box of the workspaces strip, but in the appGrid state of
the overview. Change that name and call it workspacesBox instead, which
seems to make more sense here.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3278>
2024-05-14 18:24:07 +00:00
Jonas Dreßler
f9e988abcb overviewControls: Add spacing around workspaces and appGrid
Adjust the origin of the appDisplayBox slightly further downwards and
include spacing around the workspaces and the appGrid.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3278>
2024-05-14 18:24:07 +00:00
Sam Hewitt
6fee2c24e3 style: New window-icon class to split it from icon-dropshadow
- new class for window icons in window picker
- move HC specific styles to this new class

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/507
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3310>
2024-05-13 13:11:51 -02:30
Gregor Niehl
6a4cb2ce78 swipeTracker: Allow touchpad gestures with >3 fingers
Make it easier to switch workspaces by also allowing swipes with 4 or more
fingers. This is consistent with how we behave for touchscreen swipes too.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3275>
2024-05-12 12:37:42 +02:00
Florian Müllner
a94b80b2d4 messageList: Only apply special styling to symbolic icons
The styling introduced in commit 8fed0b83d was only intended
for symbolics, it looks weird when applied to full-color icons.

So instead of using the GIcon type, apply the special styling
based on the new StIcon:is-symbolic property.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7620
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3296>
2024-05-09 17:47:32 +00:00
Florian Müllner
fe24de3ef2 unlockDialog: Bind source titles
After the recent notification changes, the title may still be null
when the source is originally added. Handle that case and make sure
we pick up later title changes by setting up a property binding.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3308>
2024-05-09 14:03:34 +02:00
Florian Müllner
2c43225575 messageTray: Notify count when adding a notification
Adding a notification clearly constitutes a count change, but
the notify call was accidentally dropped during the overhaul
of the notification API.

Fixes: 34f05b075b ("messageTray: Let the tray decide whether to show a
banner")

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3308>
2024-05-09 13:47:24 +02:00
Simon McVittie
50a011a19d screencast: Correct expected bus name for streams
Previously, this only worked because GDBusConnection was not filtering
signals by their sender correctly (GNOME/glib#3268).

Thanks: Alicia Boya García
Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3303>
2024-05-07 13:54:19 +01:00
Florian Müllner
0d571e9191 ctrlAltTab: Ignore DOCK windows without app
The fallback path broke when we removed support for window icons.

Nowadays we track all windows, and as a result should always have an
associated app (although not necessarily backed by a .desktop file),
so this shouldn't make a difference in practice. Not to mention that
external docks (like cairo-dock) are extremely rare themselves now.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3295>
2024-05-02 19:12:46 +02:00
Sebastian Keller
80a37bcf53 js: Update for Gio/GioUnix split
GLib 2.79.2 split out the platform specific Gio APIs into a separate
GIRs, while still keeping a copy in the Gio GIR. gjs then added warnings
about the APIs being moved.

This bumps the Gio(Unix) version requirement to 2.79.2 and switches to
using the new GioUnix GIR.

See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3892
See: https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/918
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7539
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3288>
2024-04-29 16:48:07 +02:00
pesader
ccdd46c0d9 unlockDialog: Also center the time in 12h format
Since the time string uses a space to pad single-digit numbers, the
centered label looks off-center. Fix this by applying the trim()
function to get rid of whitespaces.

The drawback of this approach is that the label will change position
slightly when the time changes, but for the lockscreen that's okay.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6193
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3290>
2024-04-28 18:20:32 -03:00
Marco Trevisan (Treviño)
3a34c16eca workspaceAnimation: Do not create clones for override redirect windows
Override redirect windows manage their own positioning and size alone
and are always sticky, so we're not covering them either with the
animation MonitorsGroup, and thus there's no need to clone them or we'd
end up having two windows painted.

This was causing the shell tray icon window actors (that have no opacity
by default but that are override redirect) to show up during the
animation as their clone animation is not 0.

The other option would be hide them during the animation phase, but
there's no need for this.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3285>
2024-04-26 18:31:48 +00:00
Sebastian Keller
b7079b8f2f portalHelper: Fix handling of invalid TLS certificates
WebKitGTK 6.0 moved allow_tls_certificate_for_host() from WebContext to
NetworkSession. This was not adjusted here when the portal helper was
switched from 4.0 to 6.0.

2d1b53b211

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7597
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3284>
2024-04-25 19:33:09 +02:00
Florian Müllner
817ae50692 altTab: Use more appropriate fallback icon
'icon-missing' is not an actual icon name. It somewhat works
because an invalid icon name will fallback to the correct
'image-missing', however for apps the generic app icon is
a better fallback.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3248>
2024-04-24 14:22:48 +00:00
Jamie Gravendeel
448df5c58e general: Remove periods from single sentences
This is done to align with the HIG rule about periods in single sentence
strings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3280>
2024-04-24 13:58:01 +02:00
Monster
779dfb6600 dateMenu: Better align strings with the HIG
Turn the button labels to title case, make the strings shorter, make the
weather string consistent with the world clocks string.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3254>
2024-04-24 10:59:20 +00:00
Monster
79360d155f close-dialog: Fix strings to comply with HIG
Moved title text to title case, removed periods in title and subtitle

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3224>
2024-04-21 14:38:55 +00:00
Florian Müllner
df50c2dfc6 cleanup: Replace deprecated String.prototype.substr()
The method is documented as deprecated:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr

Switch to the non-deprecated substring() method.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3234>
2024-04-19 17:38:37 +00:00
Florian Müllner
193b6c129e cleanup: Don't use substring to check prefix
String.prototype.startsWith() is more idiomatic in that case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3234>
2024-04-19 17:38:37 +00:00
Julian Sparber
8df0ccd090 messageTray: Don't show expand button for notification banner
Currently we expand banners on hover, it's odd that there is also an
expand button the user doesn't have to click.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7479
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3249>
2024-04-19 13:13:41 +00:00
Robert Mader
cbcc5b479a Revert "screencastService: Use 'screen' encoder profile for openH264"
Unfortunately it turned out that this change does increase frame skips
in the recorded files on several tested devices, greatly outweighing
any small visual benefit it might have.

This reverts commit 490ecc536ab6b2f9320592930be5aae473297934.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3268>
2024-04-15 20:23:42 +02:00
Totto16
d1d43a871d modalDialog: Remove timestamp parameter from close() invocations
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3253>
2024-04-10 11:10:11 +00:00
Totto16
72223977c2 modalDialog: Finish cleanup in close()
timestamp is unused and removed after cleanup in commit 3574c5246a29dc2ad5b9dbc629e4e7647fbc41bf, this fixes this in the missed parts

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3253>
2024-04-10 11:10:11 +00:00
Robert Mader
490ecc536a screencastService: Use 'screen' encoder profile for openH264
There are "camera" and "screen", the former being the default. Using the
later should slightly increase image quality.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3259>
2024-04-02 11:20:36 +02:00
Sebastian Keller
7f476e051c notificationDaemon: Use correct property name to enable markup
The property is named useBodyMarkup, not bannerMarkup. This was causing
markup to be disabled for FDO notifications.

Fixes: cc60ce7f94 ("notification: Stop using 'update()' from MessageTray.Notification")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7495
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3247>
2024-03-19 13:14:04 +01:00
Joan Torres
b33f82b583 loginDialog: Improve conflicting session notification message
This makes it less confusing.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3235>
2024-03-16 16:33:50 +00:00
Sebastian Keller
04fd3a4277 keyboard: Specify anchor when deleting characters via timeout
6e80f858c dropped the second cursor argument used as anchor when calling
the delete function from the timeout. This was causing the early check
that was trying to detect when deleting from the beginning of the text
to fail, because anchor was now undefined.

Fixes: 6e80f858c ("keyboard: Move backspace key handling to KeyboardController")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7484
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3239>
2024-03-15 11:52:37 +01:00