Commit Graph

7771 Commits

Author SHA1 Message Date
Florian Müllner
82da51d5a1 authPrompt: Hide password when insensitive
The purpose of password peeking is to spot and correct errors;
the latter isn't possible when the entry is non-editable, so
we can hide the password again while authentication is ongoing.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3138
2020-09-21 22:51:48 +02:00
Georges Basile Stavracas Neto
5014d7e9fc appDisplay: Disconnect from parental controls on destroy
BaseAppView not disconnecting from the 'app-filter-changed'
signal means parental controls may trigger callbacks on
a destroyed grid, which tries to access destroyed icons,
which spams the journal with stack traces.

Disconnect from parental controls when BaseAppView is destroyed.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1441
2020-09-16 14:57:02 -03:00
Daniel García Moreno
92d3c6e051 appDisplay: Don't iterate over all pages in page manager
In getAppPosition it's not needed to continue looking for an app in the
page manager if the app is found in a page.

This patch breaks the search loop just after the first ocurrence is
found.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1434
2020-09-15 09:33:53 +00:00
Florian Müllner
386d25e6f8 dbusServices/screencast: Add recordings to recent items
This is useful functionality that got lost when replacing the built-in
recorder with an external screencast service; bring it back.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3171
2020-09-14 21:15:13 +00:00
Florian Müllner
b2d6c11ec3 systemActions: Filter out empty (folded) terms
We split the search string into words using whitespace, while
GLib.tokenize_and_fold() splits on any non-alphanumeric characters.

That is, a valid search term like ',' will be tokenized as [], so
the original non-empty terms may get mapped to an empty array.

And as [].every() returns true for any condition[0], we end up
matching *all* system actions in that case. We want the exact
opposite and not return any results, so handle that case explicitly.

[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3169
2020-09-14 21:10:58 +00:00
Florian Müllner
59ade00b94 systemActions: Flatten folded search terms
GLib.str_tokenize_and_fold() returns an array rather than a string
(the "tokenize" bit), so flatten the folded search terms like we
do for keywords.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3169
2020-09-14 21:10:58 +00:00
Florian Müllner
8ddaa851a4 aggregateMenu: Move remote-access indicator to the front
It's best to not mix transient indicators with (probably) permanently
visible items, so move the remote-access indicator (which also handles
screencasts now) to the position of the old screen recorder icon.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1438
2020-09-14 17:13:27 +02:00
Florian Müllner
7f402c1c6b workspace: Cap scaled floating size to target layout size
A window preview's floating geometry is scaled down according to the
workspace's allocation, while the layout geometry is computed directly
for the available space.

For previews that maintain their real size in the layout geometry,
that scaling leads to a distracting size bounce when transitioning
between both layouts.

Address that by not allowing the scaled floating size to drop below
that layout size (which is at most equal to the unscaled floating size).

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2968
2020-09-05 16:12:08 +00:00
Carlos Garnacho
497f10178c systemActions: Use PanelOrientationManaged to manage autorotation
Track this new org.gnome.Mutter.DisplayConfig property, so the
autorotation UI is shown/hidden according to both accelerometer
availability and touch-mode.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1311
2020-09-05 07:24:54 +00:00
Mitar
f7bcde6325 altTab: Support cycle-group cycling only over windows in the workspace
This is consistent with the filtering done for switch-group when
org.gnome.shell.app-switcher current-workspace-only is set to true.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3116
2020-09-04 19:48:33 +02:00
Daniel van Vugt
206d1fa650 dash: Hide the tooltip when an item is clicked
So that when the 'Show Applications' button is clicked the icons don't
fly *through* the tooltip.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1423
2020-09-03 15:25:19 +00:00
Florian Müllner
b3f35912be dbusServices/screencast: Save under resolved file path
... instead of using the original template as file name.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3097
2020-09-02 16:28:48 +02:00
Florian Müllner
69e81e4511 Revert "appDisplay: Add drop shadow to icons"
The shadows are hardly visible in the darkened overview, but have
a noticeable impact on performance.

This reverts commit 4e195d789a.
2020-09-02 11:12:47 +02:00
Georges Basile Stavracas Neto
998e3e62ad appDisplay: Connect to GSettings after reading key
As per GSettings documentation, it is necessary to read a particular
key at least once before being able to connect to the corresponding
'changed::' signal.

Read the 'app-picker-layout' key before connecting to the changed
signal.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1428
2020-09-01 17:12:56 -03:00
Georges Basile Stavracas Neto
95645e155e appDisplay: Only emit layout-changed when not updating pages
It is wasteful to emit layout-changed when updating pages, because
the caller (AppDisplay) already has an updated state by the time
this is called.

Only emit 'layout-changed' if the GSettings notification doesn't
come from AppDisplay updating the pages.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1428
2020-09-01 16:45:54 -03:00
Georges Basile Stavracas Neto
f1bc87bf6d appDisplay: Redisplay on layout changes
This was an overlook from e1ea1d2954.

We never connected to the 'layout-changed' signal, which means
changing the GSettings externally wouldn't trigger a redisplay.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1428
2020-09-01 16:45:54 -03:00
Florian Müllner
4e195d789a appDisplay: Add drop shadow to icons
The shadow is barely visible on dark backgrounds, but it's not
wrong to be consistent with Settings, Software and GNOME Classic.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3123
2020-08-31 21:04:39 +02:00
Florian Müllner
ba804de15e status/bluetooth: Fix label for >1 connected devices
Eeeks, we want two strings here, not one with embedded double quotes.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3073
2020-08-24 15:37:08 +00:00
Zephaniah E. Loss-Cutler-Hull
093603b35e unlockDialog: Defend against absence of blur effect
widget.get_effect(...) can return null while locking the screen, resulting
in a TypeError. In this situation the screen ends up black with a cursor
but never going to sleep, and moving the mouse brings the old screen
contents up but does not allow unlocking.

unlockDialog.js assumes that widget.get_effect will return non-null,
but other places such as getWindowDimmer in windowManager.js go out of
their way to be more careful.

[smcv: Add commit message, remove hard tabs, add missing semicolon]

Resolves: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3071
Bug-Debian: https://bugs.debian.org/968440
2020-08-24 17:27:14 +02:00
Joonas Henriksson
b1f4ac10da
calendar: Vertically center align week numbers
The labels were previously aligned by using top-padding, which was
relative to font-size, and therefore didn't always align the text
correctly when font scaling was enabled.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1415
2020-08-21 21:40:22 +03:00
Björn Daase
2fc6384bca *: Fix spelling mistakes found by codespell
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1416
2020-08-21 18:25:09 +00:00
Will Thompson
1c0be1a36b polkitAgent: Add missing space to log string
In my journal, I have:

> JS LOG: polkitAuthenticationAgent: Received 2identities that can be
> used for authentication. Only considering one.

There should be a space after the number.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1413
2020-08-18 13:58:20 +00:00
Andre Moreira Magalhaes
00437750ed authPrompt: Properly get oVirt service name
Commit 809f820cd moved the definition of OVIRT_SERVICE_NAME to
'js/gdm/oVirt.js' but missed updating one occurrence. This
commit fixes it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1414
2020-08-18 13:31:23 +00:00
Georges Basile Stavracas Neto
7fcaf63291 appDisplay: Cache app ids in FolderView
Instead of reading a GSettings and building the app ids list
every single time FolderView needs to check for something,
cache it before redisplay and reuse this cached list everywhere.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1409
2020-08-13 23:28:51 +00:00
Florian Müllner
990c171bed networkAgent: Add missing Uint8Array => string conversion
When promisifying async operations in commit 764527c8c, the
finish function for read_line_async() was sneakily changed from
read_line_finish_utf8() to read_line_finish().

That is, the call returns a Uint8Array now that requires an
explicit conversion to string.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1407
2020-08-13 23:00:21 +00:00
Florian Müllner
112b139a9e cleanup: Remove old compatibility code
Since gjs moved to mozjs60, return values of int8_t arrays can
no longer be treated as strings. We originally made the conversion
conditional to keep working with the (then) stable gjs release.

That was two years ago and we require a more recent gjs nowadays,
so there's no good reason for keeping the old code path.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1407
2020-08-13 23:00:21 +00:00
Georges Basile Stavracas Neto
f541562acc iconGrid: Properly remove pages
When the last item of an IconGridLayout page is removed,
the page itself is removed too. However, the indexes of
items of next pages are not updated, which mess up the
layout manager state.

Update the page index of the items at forward pages when
removing a page.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1406
2020-08-13 18:15:11 -03:00
Florian Müllner
0dc1e1e99a perf: Add basic run tests
While the performance framework was originally written to collect
performance metrics, driving the shell by an automated script is
also useful to ensure that basic functionality is working.

Add such a basic test, initially checking top bar menus, notifications
and the overview.

Eventually it would be nice to separate the automatic scripting from
gathering performance metrics, but IMHO that can wait until we switch
from gjs' custom imports system to ES modules.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1396
2020-08-12 15:43:39 +00:00
Florian Müllner
cf1d09b482 environment: Mark transitions as "work"
global.run_at_leisure() is used from automated scripts to schedule
a callback when the shell is idle. However since we moved away from
Tweener, animations are no longer taken into account; fix this by
marking transitions as "work" if the convenience ease() functions
are used.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1396
2020-08-12 15:43:38 +00:00
Florian Müllner
a436226266 scripting: Switch to standard async/await pattern
The original scripting framework was based on SpiderMonkey's
pre-standard generators, and was simply translated to the
corresponding standard syntax when updating it to work with
recent JS versions.

We can do even better by using the standard async/await pattern
instead of generators/yield.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1396
2020-08-12 15:43:38 +00:00
Florian Müllner
9d6ccb6072 dbusServices/screencast: Quote filename in pipeline
Otherwise Gst fails to parse the pipeline string if the filename
contains spaces, as all words following the first are interpreted
as additional Gst elements.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1403
2020-08-11 11:50:44 +00:00
Michael Catanzaro
6d38bc69ca endSessionDialog: default to not installing updates on low battery
If the user's battery power is low, we should not check the checkbox to
install updates by default. Rationale: if the user's battery is not low,
it's very unlikely to run out during a normal system upgrade. Low
battery is defined as any level below 30%, matching our battery status
indicator.

We'll also change the battery warning to only display when battery is
actually low. However, we will still always warn on battery for full
system upgrades, since these are expected to take a long time.

Future improvement: it would be nice to make the checkbox insensitive
when on low power. However, I don't think we currently have a proper
style for insensitive checkboxes. I was unable to make it look good.

Lastly, note that I did not test this on a laptop. I tested this by
mocking the return values of _isDischargingBattery() and
_isBatteryLow().

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2717
2020-08-10 23:55:14 +00:00
Florian Müllner
263320696e status/system: Add separate 'Restart' item
A side effect of removing the action buttons in favor of a regular
submenu is that we are a lot less constrained by size. So instead
of lumping "Restart" in with "Power Off", make it a separate menu
item.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2202
2020-08-10 15:36:26 +00:00
Florian Müllner
e6153bb578 status/system: Swap power- and user-related items in session menu
Quoting Allan:
"It's been niggling me that log out is closest to hand,
as opposed to suspend"

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2202
2020-08-10 15:36:26 +00:00
Florian Müllner
c723a1b72a status/system: Use new indentation style
... before moving stuff around.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2202
2020-08-10 15:36:26 +00:00
Florian Müllner
0b56416d30 sytemActions: Add separate 'restart' action
In order to split restart and power-off in the system menu, we need
to separate the underlying actions as well.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2202
2020-08-10 15:36:26 +00:00
Florian Müllner
0c5716b018 systemActions: Reindent properties
... so we can add another property using the new coding style
without making surrounding code terribly inconsistent.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2202
2020-08-10 15:36:26 +00:00
Florian Müllner
1fa1333e13 endSessionDialog: Remove "Restart" option from shutdown dialog
Restart will be exposed as a separate action instead of being part
of the shutdown dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2202
2020-08-10 15:36:26 +00:00
Florian Müllner
6edd3c4b93 endSessionDialog: Support updates in restart dialog
We will split off restart from the existing shutdown dialog, and
instead offer it as a separate menu item in the session submenu.
But before doing that, make sure that the existing restart dialog
exposes the same feature set as power off.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2202
2020-08-10 15:36:26 +00:00
Florian Müllner
72a8522a10 endSessionDialog: Reindent dialog configs
We are about to make some changes, so make them conform to the
new indentation style first.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2202
2020-08-10 15:36:26 +00:00
Emre Uyguroglu
6b78f58a75 keyboard: Fix missing icons in Keypad
This is more fallout from commit 57669bca1b.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3007
2020-08-09 15:59:34 +02:00
Hans de Goede
c2b70101f2 endSessionDialog: Support rebooting into the bootloader menu aka ("Boot Options")
This implements the "Alt" behavior for the "Reboot" button as outlined in
the design here: https://wiki.gnome.org/Design/OS/BootOptions

Note I've tried implemeting this with the AltSwitcher class from
js/ui/status/system.js first, but that puts the button in a St.Bin()
which causes the button to think it is the only button on the dialog
and makes it have rounded corners on both of its bottom corners.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/199
2020-08-06 15:14:45 +02:00
Hans de Goede
9d4a3a614d endSessionDialog: Immediately add buttons to the dialog
Immediately add buttons to the dialog instead of first building an
array of button-info structs.

This is a preparation patch for adding support changing the "Reboot"
button into a "Boot Options" button when Alt is pressed.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/199
2020-08-06 15:14:45 +02:00
Hans de Goede
2af7264cff LoginManager: Add canRebootToBootLoaderMenu and setRebootToBootLoaderMenu methods
Add wrappers for the new logind Manager CanRebootToBootLoaderMenu and
SetRebootToBootLoaderMenu dbus methods.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/199
2020-08-06 15:14:42 +02:00
Olivier Fourdan
3541a57570 cleanup: remove controversial naming
Replace "whitelist" and "blacklist" with "allow" and "deny" in variable
naming, which better represents the purpose of those variables.

There is no functional change.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1393
2020-08-04 13:24:50 +02:00
Jonas Dreßler
b83c93ad62 appDisplay: Return false in acceptDrop when not accepting the drop
Fix what is probably a copy-paste error and return false instead of a
CONTINUE DragMotionResult which is only meant for dragMotion events, not
drop events. This makes sure we don't create a folder when dropping an
app over the drag leeways of another icon.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1389
2020-08-03 21:48:44 +00:00
Florian Müllner
c9708b140c status/network: Use D-Bus to launch Settings panels
For more obscure network configurations, we need to launch the
corresponding Settings panel with additional parameters, so we
cannot simply launch the .desktop file.

However we can do better than spawning a command line: Control center
exposes an application action we can use instead, so the process is
launched with the appropriate activation environment and startup
notification support.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1385
2020-08-03 16:17:40 +00:00
Andre Moreira Magalhaes
dd846f1ba2 rfkill: Always sync state on construction
This fixes an issue where the indicator can be out of sync until the
RfkillManager (used by it) properties change.

The problem is that multiple instances of the indicator will use
the same RfkillManager instance (getRfkillManager() returns a singleton)
that only guarantees to emit the changed signal in two scenarios:
when the D-Bus proxy connects and when the proxy properties change.

If by the time an indicator is instantiated the RfkillManager's D-Bus
proxy is already connected, that indicator would only sync its state
when the RfkillManager properties change.

Let's fix that by always syncing the state on construction - in the worst
case scenario the RfkillManager's D-Bus proxy won't have connected yet
and the indicator state will be temporarily out of sync but once it gets
connected the indicator will sync again with the correct state.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1386
2020-08-02 19:57:11 +00:00
Benjamin Berg
01a927f388 windowManager: Wait for X11 services using systemd
To do this, we now wait for the start/stop job to complete. We also have
two targets in gnome-session to ensure that everything is working as
expected.

In order to start the services, we simply request the
gnome-session-x11-services-ready.target unit, and wait for it to become
available. To stop, we use the gnome-session-x11-services.target unit
which should stop all services in a way that is entirely race free.

This requires both gnome-session and gnome-settings-daemon changes to
work (which are in the corresponding merge requests).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/895
2020-07-31 13:53:31 +00:00
Jonas Ådahl
2b0731ab81 Move screencasting into a separate service process
Move the screencasting into a separate D-Bus service process, using
PipeWire instead of Clutter API. The service is implemented in
Javascript using the dbusService.js helper, and implements the same API
as was done by screencast.js and the corresponding C code.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1372
2020-07-31 10:51:12 +02:00