18666 Commits

Author SHA1 Message Date
Carlos Garnacho
cfc0d42c7a keyboard: Add/document "height" optional property
This will allow OSK descriptions to declare "tall" keys. May be
used in combination with the "start" property added in previous
commits, in case a gap needs to be explicitly left.

No OSK description uses this yet.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:34:21 +01:00
Carlos Garnacho
d1aa2acef1 keyboard: Add/document "leftOffset" optional property on OSK keys
This optional property defines the offset the a key should have
relative to the previous key (on its left) or the start of the
column if it is the first key. If this property is not
present, the key will be placed with no relative offset.

This for example allows keymaps to explicitly define the padding
of the rows that are not "full" relative to other rows, without
guesswork in the code. It is used for this purpose in the
keymaps/levels/rows that needed it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:34:21 +01:00
Carlos Garnacho
a93858b862 keyboard: Simplify key width handling
We do not need to store the key width in the Key object
itself when constructing the layout, and can attach it
to the grid from the model data right away.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>
2024-02-29 16:34:21 +01:00
Sebastian Keller
7a409bfffc keyboard: Delete selected text on backspace
Previously backspace would only ever remove a single character left of
the cursor, regardless of selection.

This requires the application to correctly set the anchor position in
text_input::set_surrounding_text(), which currently only gtk4 seems to
do. When there is no selection or on other applications that always set
cursor = anchor, like gtk3 does, the behavior is not changed and still
only deletes one character.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2746>
2024-02-29 14:56:16 +00:00
Sebastian Keller
484a237002 keyboard: Fix deleting the previous word
Since mutter@33088d59 the cursor we receive from mutter already is a
character index while the code here still treated it like a byte offset.

Further the code to detect the previous word position was treating the
cursor parameter already like a character index, while passing the
cursor that was prior to that commit a byte offset.

The function also had some unreachable and redundant code paths. The
pos < 0 case can never be reached due to the max(). Also the regex
already ensures that all whitespace is considered, so the code to remove
spaces not actually do anything except when deleting the first word in
the text, in which it would cause the first character to not get
deleted.

Also it was not handling characters with more than 2 bytes correctly. In
the presence of these JS string functions, such as search(), can not be
considered to operate on character indices anymore but rather the number
of UTF-16 byte pairs. Issues with this can be avoided by using
iterators, which unlike anything else iterate on characters, not byte
pairs and by not using the results returned by JS string functions for
anything but JS strings.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2746>
2024-02-29 14:56:16 +00:00
Marco Trevisan (Treviño)
7552875dbc gdm/util: Reduce the fprintd proxy wait timeout
Given that this may lead to the shell to hang on gdm startup, and that
we expect the service to be up and running quickly, we can safely set a
5 seconds timeout instead of using the longer GLib proxy defaults.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:12:03 +01:00
Marco Trevisan (Treviño)
fa25156a6c gdm/util: Use fully async call to setup the fingerprint device proxy
Since fingerprint service can now be started also if a conversation has
already began, we can also initialize the proxy asynchronously, without
the risk that the service won't be started early enough.

As per this, remove the usage of FprintDeviceProxy wrapper completely
since it's just not giving us anything here.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:12:03 +01:00
Marco Trevisan (Treviño)
ce03df5761 gdm/utils: Pass cancellable to the FPrint Device proxy and avoid signals
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:12:03 +01:00
Marco Trevisan (Treviño)
885f1391ab gdm/util: Only start fingerprint service synchronously when it's default
On ShellUserVerifier construction we used to start fprintd in a sync
fashion all the times, however in case the daemon had startup failures
or was hanging for whatever reason (like due to devices probing, given
that fprintd synchronously wait for them all to be initialized) we used
to just fail, leaving gdm or the lockscreen in a not usable state.

While this could be prevented with a try/catch statement, there's no
much point to wait for fprintd if that's not the default authentication
service, and so:
 - If we use gdm-fingerprint as default auth method, use a sync call to
   initialize it and in case of failures, just continue with fallback
   authentication mechanism (password)

 - Otherwise, asynchronously initialize fprintd and continue with the
   ShellUserVerifier without fingerprint support until we got a reply.
   In case the service fails to deliver us a result, we don't give up
   but we will try doing that at each authentication via
   _checkForFingerprintReader().
   In case all works properly, as per the previous commit, once the
   initialization is done, we'll start the fingerprint PAM gdm service.

Fixes #5168

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:12:02 +01:00
Marco Trevisan (Treviño)
efb52899f5 js/gdm/util: Rename fingerprint device into devicePath
It's just the dbus object path, so let's not be confused by that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:10:44 +01:00
Marco Trevisan (Treviño)
d5ca108a65 gdm/util: Start fingerprint verification once it's available
If fingerprint service is not replying fast enough to our async request,
authentication is started but the fingerprint service is never started.

So, in case the fingerprint type information is received after that the
authentication has been started, let's start the service.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:10:44 +01:00
Marco Trevisan (Treviño)
0d24563296 gdm/util: Do not handle fingerprint async errors in call
It's better to do this at caller level so that we have more control of
what to do on errors.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:10:44 +01:00
Marco Trevisan (Treviño)
ea3731de38 gdm/util: Only initialize fingerprint and smart card managers if needed
There's no point to initialize the fprint proxy and the smartcard
manager if they are disabled in authentication settings, so just avoid
initializing them, but at the same time this implies tracking of user
changes and so:
 - If a new service has been enabled, we initialize it
 - If a service has been disabled we destroy it and reset the
   authentication if such service was currently active

In both cases we do update the default service.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:10:43 +01:00
Marco Trevisan (Treviño)
9f3a9f8f2c gdm/util: Do not use gjs GDBus proxy wrapper for fprint manager
It only adds more complexity, while we can handle it all manually quite
easier now.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:10:23 +01:00
Marco Trevisan (Treviño)
dc4f0f9053 gdm/util: Restart auth if default service changed
If a default service changed while the previous one was active we need to
reset the authentication so that we set back to the expected one.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:10:23 +01:00
Marco Trevisan (Treviño)
9af029e968 gdm/util: Keep track of started services that are currently active
If we have a late activation of a service backend we may need to check
whether it has been already started, and in case it has not, we can try
loading it.

So rely on gdm to see what service has been started, instead of handling
it manually on our side only.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:10:23 +01:00
Marco Trevisan (Treviño)
f1c0f65075 gdm/util: Early initialize all internal properties
These may be used later by methods called by constructors, so ensure
that they're all defined early.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2267>
2024-02-28 22:10:22 +01:00
Florian Müllner
290e705c89 windowMenu: Pass missing argument when starting grab op
The function now requires an additional position-hint argument.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3214>
2024-02-28 16:00:11 +00:00
Florian Müllner
be0800ea17 panel: Pass position hint when starting window drag
Since mutter@4b1e24fcc, starting a drag op requires an additional
argument, pass it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3214>
2024-02-28 16:00:11 +00:00
Daniel van Vugt
d09509b2cb theme: Don't give login-dialog another background-color
Its parent `lockDialogGroup` has exactly the same background-color
set in the same file. Giving them both the same wasted render time on
overdraw, and caused multi-layer blending artifacts (slight flickering
of the grey background) when the login dialog fades in/out.

While the flicker can also be fixed using `set_offscreen_redirect`,
there's no point adding that overhead when the extra layer doesn't need
to be painted. Removing it halves the average render time of the login
animation.

Closes: https://bugs.launchpad.net/bugs/2036388
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3207>
2024-02-28 14:55:39 +00:00
Sam Hewitt
e46b137b42 style: Restore missing insensitive menuitem style
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3213>
2024-02-28 14:38:27 +00:00
Julian Sparber
bb73bf548c FdoNotificationDaemon: Emit ActivationToken before ActionInvoked signal
Two years ago FDO notifications spec gained the ability to pass an
activation token (often called startup id) let's finally implement it.

See: https://gitlab.freedesktop.org/xdg/xdg-specs/-/commit/b9a470004d

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/358
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3199>
2024-02-28 13:51:18 +00:00
Julian Sparber
7d6f465a47 GTKNotificationDaemon: Use ShellApp methods to activate apps
`ShellApp` gained the ability to activated actions and it sets the correct
platform data. Therefore drop the current implementation in favor for it.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7409
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5239
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3198>
2024-02-28 11:35:38 +01:00
Julian Sparber
3abf7e4662 status/backgroundApps: Use ShellApp.activate_action() to quit apps
`ShellApp` gained the ability to activated actions, therefore drop the current
implementation in favor for it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3198>
2024-02-28 11:28:06 +01:00
Julian Sparber
d6779f34da status/network: Use ShellApp.activate_action() to launch settings panel
`ShellApp` gained the ability to activated actions and sets the correct
platform data, therefore drop the current implementation in favor for it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3198>
2024-02-28 11:28:06 +01:00
Julian Sparber
90e9f56f79 shell/global: Don't force active workspace for launch context
Since the launch context may also be used to activate an action on an
running application with an already existing window, which we don't
necessarily want to move to a different workspace, don't set a workspace
for the launch context. If no active window exists for an application
then it will be place on the currently active workspace anyways.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3198>
2024-02-28 11:28:06 +01:00
Julian Sparber
54bc3aa4f5 shell/app: Add method to activate an action via FDO DBus activation
There are multiple different places where we activate an app action,
but none set the correct activation token. Therefore this adds an async
method to to call `ActivateAction` on `org.freedesktop.Appliaction`
with the correct activation token/startup id as platform data.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3198>
2024-02-28 11:27:40 +01:00
Jürgen Benvenuti
fbc8c28c0e Update German translation 2024-02-26 19:58:23 +00:00
Florian Müllner
6f250dd4dc ci: Rebase image to F40
After the main image was rebased, let's do the same for our
JS tooling.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3208>
2024-02-25 22:06:46 +00:00
Florian Müllner
36754d0479 ci: Don't install entire Development group
With dependencies, the group pulls in about 150 packages. We only
need a tiny tiny subset of that, so only specify what we really
need to not blow up the image size unnecessarily.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3208>
2024-02-25 22:06:46 +00:00
Florian Müllner
19592e0a67 ci: Bump mutter image
The image was rebased to f40, pull that in.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3208>
2024-02-25 22:06:46 +00:00
Guillaume Bernard
b199f466a5 Update French translation 2024-02-25 10:18:15 +00:00
Chao-Hsiung Liao
2311d766f6 Update Chinese (Taiwan) translation 2024-02-25 10:04:30 +00:00
Asier Sarasua Garmendia
1bafac4fde Update Basque translation 2024-02-25 06:42:13 +00:00
Rūdolfs Mazurs
d8014d35a7 Update Latvian translation 2024-02-24 19:44:10 +00:00
Baurzhan Muftakhidinov
51087d7016 Update Kazakh translation 2024-02-24 17:17:43 +00:00
Quentin PAGÈS
d16cd1ede2 Update Occitan translation 2024-02-24 17:04:35 +00:00
Bruce Cowan
bd992f7dca Update British English translation 2024-02-24 16:01:21 +00:00
Brage Fuglseth
22c5415f8a Update Norwegian Bokmål translation 2024-02-24 13:35:25 +00:00
Jordi Mas i Hernandez
eb0269148f Update Catalan translation 2024-02-23 08:37:06 +00:00
Fran Dieguez
7860746a04 Update Galician translation 2024-02-22 18:08:52 +00:00
Luming Zh
477b3ff0bb Update Chinese (China) translation 2024-02-22 15:19:43 +00:00
Kukuh Syafaat
d8787f5e77 Update Indonesian translation 2024-02-22 13:48:48 +00:00
Irénée THIRION
5afd7f405b Update French translation 2024-02-22 09:31:55 +00:00
Vasil Pupkin
3df6372055 Update Belarusian translation 2024-02-22 00:30:54 +00:00
Sabri Ünal
ade0b7902c Update Turkish translation 2024-02-21 17:25:13 +00:00
Florian Müllner
a1dd5d5e1e shell: Remove left-over function declaration
The function itself was removed in commit 4b80cbe1cd9e back
in 2016.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3206>
2024-02-21 16:10:40 +01:00
Florian Müllner
9af81e44bc notificationDaemon: Fix auto-closing FDO notifications
We auto-close FDO notifications when the sender leaves the bus,
given that the protocol was created without persistency in mind
and any action will become invalid.

However that broke when moving the public-facing implementation
into a separate service, as we now track the (always running)
service instead of the original sender.

Fix that by forwarding the sender to the internal implementation
via a private hint, just like we already do for the PID.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3204>
2024-02-20 21:09:32 +01:00
Florian Müllner
f0b1cf5f8d notificationDaemon: Namespace private sender-pid hint
The hint is a private implementation detail between the public
and internal services, not something anybody else should set
(*cough* libnotify *cough*).

Prefix the name to hopefully make that clearer.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3204>
2024-02-20 21:09:32 +01:00
Bilal Elmoussaoui
8b6e1fe896 plugin: Stop overriding xevent_filter
The vfunc was used to register profiling hooks for glx.swapComplete
as we have sysprof nowadays and as that code path is x11 specific
anyways, let us drop it

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3201>
2024-02-20 13:51:30 +00:00