8867 Commits

Author SHA1 Message Date
Bilal Elmoussaoui
d911b6689c ui/background: Update default bg color
To match system_base_color from the theme
See
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3367#note_2137704
for context

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3367>
2024-06-12 16:09:43 +00:00
Bilal Elmoussaoui
4b3bbc50ff cleanup: Prefer using Color struct constructor
Instead of Color.from_pixel or Color.new as both would be removed
to simplify the Color API

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3367>
2024-06-12 16:09:43 +00:00
Jonas Dreßler
c576f82bdf overviewControls: Make sure thumbnails expandFraction is bound to visibility
We set the expand-fraction property of the workspace thumbnails on changes
to their should-show property. The should-show property defaults to true, and
the expand-fraction property defaults to 1. The should-show property gets
updated in the constructor of the ThumbnailsBox though, and it might become
false (that is the case when starting up the shell) during construction.

In this case we're not yet listening to "notify::should-show" in the
ControlsManager, and therefore forget to update the expand-fraction
accordingly. Fix that and ensure the expandFraction is always set to the value
we expect after hiding or showing the thumbnails (we call _updateThumbnailsBox()
from _update(), which we call in the constructor).

This should be the proper fix for the problem that 9bf550da8 (which caused
the workspace thumbnails to never show) originally tried to fix.

Fixes: 9bf550da88 ("overviewControls: Set expandFraction for ws thumbnails to 0 when hidden")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7668
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3323>
2024-06-08 02:40:38 +00:00
Carlos Garnacho
5c69bb067f keyboard: Disable unredirection when the OSK is shown
The OSK might be wanted over fullscreen windows triggering
unredirection, and the unredirection should be temporarily
overridden in that case.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7692
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3356>
2024-06-05 15:26:02 +00:00
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
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 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
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
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
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
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
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
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
Sebastian Keller
8616ec00a0 magnifier: Stop using Clutter.StaticColor
This was removed from mutter in commit 72c2d8913. Instead of manually
creating a white color, we can just rely on ClutterTextureNode creating
one for us when passing null.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7480
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3237>
2024-03-13 22:01:39 +00:00
Julian Sparber
fd58294ec3 messageTray: Ensure that a notification is removed from Source correctly
We need to make sure that we always emit the `notification-removed`
signal on the source object when a notification is removed or
destroyed.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7463
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3229>
2024-03-13 11:21:35 +00:00
Jonas Dreßler
a64424864b Revert "main: Only restore key focus on pop when modal actor is still focused"
This one caused a regression and now keys appear to get stuck while raising
the screenShield, so revert it. Hopefully we can fix the original problem in
a better way next cycle by tracking key focus changes internally in
ClutterGrab.

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

This reverts commit 4d544d7b5614cd33bf60c1b610f8b81546955fbb.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3231>
2024-03-08 19:45:20 +00:00
Aleksandr Mezin
e1db7e368f messageList: Fix TypeError in Message.useBodyMarkup setter
Setting `useBodyMarkup` to `true` fails with:

    JS ERROR: TypeError: this.setBody is not a function
    set useBodyMarkup@resource:///org/gnome/shell/ui/messageList.js:585:14

Fixes: f0e863f529 "messageList: Use GObject properties for Message"
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3232>
2024-03-08 19:36:50 +00:00
Jonas Dreßler
fc58f6f053 keyboard: Don't fall back to next model after we found a valid one
The fallback for creating models is to try the next one in case the current
one can not be created, until we fall all the way back to the US layout.

Obviously we shouldn't fall back in case creating the model actually worked,
so break out of the loop and then use the new model.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3230>
2024-03-07 12:02:10 +00:00