Commit Graph

7820 Commits

Author SHA1 Message Date
Carlos Garnacho
51ff9ce444 js/shellDbus: Do not forward device IDs
We already pass the device event node path for identification purposes,
we can stop doing that here.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1501>
2020-11-17 19:07:30 +01:00
Florian Müllner
8a47f1c667 cleanup: Remove empty leading/trailing lines in blocks
gjs added a new rule to its eslint ruleset that forbids "block padding",
so make sure we conform to that rule before syncing up the configuration.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1498
2020-11-16 18:04:23 +00:00
Florian Müllner
7521b9c4b2 extensionUtils: Stop using Lang.copyProperties()
It is now deprecated, so use object destructuring instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1498
2020-11-16 18:04:23 +00:00
Georges Basile Stavracas Neto
548d3b62d7 appDisplay: Expand titles on keyboard focus as well
In addition to hover, expand wrapped app titles when keyboard
focus is in as well. This gives keyboard users a chance to
read the app name.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3333

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1496
2020-11-13 23:29:14 +00:00
Georges Basile Stavracas Neto
5d27a5a42a appDisplay: Factor out function
The function to update the multiline state of the title label
will be reused by the next commit, so move it into a separate
method.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1496
2020-11-13 23:29:14 +00:00
Georges Basile Stavracas Neto
47dc3043df appDisplay: Adjust label collapse and expand times
As per design feedback, these times are too slow.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3333

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1496
2020-11-13 23:29:14 +00:00
Daniel García Moreno
8eec7ae2d8 appDisplay: don't change grid page on adaptToSize
If the adapt to size occurs after the grid page has been changed the
page is set to zero. This patch just keep the current page with the same
value that it has before.

Fix https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3388
2020-11-12 16:47:11 +01:00
Popax21
461bbcff15 modemManager: Add property getters
gjs improved its default property getter/setters, and as a result it
is no longer possible to set read-only properties.

Add proper getters (backed by private properties) to fix the resulting
errors.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3203
2020-11-03 16:35:43 +01:00
Ian Douglas Scott
c86c294d2a appDisplay: Only show add/remove favorite when shouldShowApp() is true
`shouldShowApp()` is called in `_addFavorite`, so adding a favorite when
this isn't true won't work. Also, it seems when this is false, favorites
that do exist won't be shown anyway.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3342
2020-10-30 11:20:45 -07:00
Carlos Garnacho
a9a54ba2a3 magnifier: Avoid cursor visibility changes on startup
When initializing the shell, we create the magnifier, and (normally)
let it disabled. This still toggles cursor visibility on, which is
not right since there's other considerations to take during
initialization.

Only do this after actual changes to the magnifier state, so
initialization is left unperturbed.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1486
2020-10-28 20:59:07 +01:00
Florian Müllner
709c226fc3 messageTray: Don't play sound when banners are disabled
When support for notification sounds was added, it made some sense
to keep the 'enable-sound' setting independent from 'show-banners'.

However that changed when 'show-banners' was rebranded in the UI as
"Do Not Disturb", as sounds are at least as disturbing as the banners.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2873
2020-10-27 01:12:07 +01:00
Jonas Dreßler
0b2430128a windowPreview: Handle case where window already is part of layout
We sometimes add dialogs multiple times to the WindowPreview, for
example for modal dialogs we receive both the "window-added" and the
"window-entered-monitor" signal, which means we call
WindowPreview.addDialog() twice.

We handle that fine already in the WindowPreviewLayout and return NULL
in case the window already was added, so simply handle that NULL return
value and bail out of WindowPreview.addDialog() in this case.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1482
2020-10-26 03:40:19 +00:00
Harry Míchal
d318bf539d mpris: Switch text in title and body
Most media players have a media player that shows the title of a song
and artists in the song. In those media players the title is
highlighted (bold text) and the list of artists is under the title.
Shell does the exact opposite in the player in the notification area.

Example media players: Spotify, Rhythmbox, GNOME Music

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1480
2020-10-26 04:02:14 +01:00
Florian Müllner
f5d1a2858d telepathyClient: Promisify the right class
send_message_async() is a method of TpTextChannel, not the generic
TpChannel parent class.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3226
2020-10-22 21:11:01 +02:00
Georges Basile Stavracas Neto
b244274d48 appDisplay: Don't expand title for search results
It creates quite a nasty visual inconsistency where the
search results' icon title overflows beneath the next
search section.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1477
2020-10-21 19:44:39 -03:00
Georges Basile Stavracas Neto
efd1e06fec appDisplay: Let icon labels be multiline when hovered
When hovered, remove constraints from the icon labels that
limit the number of lines. Do that inside a saved easing
state so that the allocation can ease the label.

This helps with applications with long titles.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/363

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1477
2020-10-21 19:44:39 -03:00
Georges Basile Stavracas Neto
4fcbf6c974 iconGrid: Allocate preferred sizes if bigger than child size
IconGridLayout uses the biggest minimum size to allocate its
children. Next commit will make app icons with long names show
not ellipsize on hover, and it is important that the icon itself
is able to follow that.

Use preferred size if it's bigger than the minimum size.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1477
2020-10-21 18:54:56 -03:00
Georges Basile Stavracas Neto
b3659221bd iconGrid: Trivial style cleanup
Turns out, we only needed a gentle push to get this whole
file fit in.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1477
2020-10-21 18:46:54 -03:00
Florian Müllner
5cfec80e9d audioDeviceSelection: Center-align icons
When the icon area gets allocated additional space, we want the
icons centered rather than left-aligned. This may happen in locales
with long-ish translations for the title or buttons when only a
subset of possible icons is shown.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3307
2020-10-21 03:29:18 +02:00
Jonas Dreßler
d19683a84c dnd: Get transformed size for scaling before unparenting drag actor
Commit de610a13f1ad1e7e34d4b9a81df58d4da3693059 in mutter made it
impossible to access the actors last allocation after unmapping it,
this broke the scale-up/down animation when starting a drag.

Fix that animation again by saving the actors transformed size before
unparenting (and therefore unmapping) the actor instead of afterwards.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1475
2020-10-21 01:15:21 +02:00
Jonas Ådahl
a0e87b53ff remoteAccess: Ignore all but the screen record handles on X11
We still want to show the red dot when recording the screen on X11, so
only drop the "screen-is-shared" handles when using the X11 session.

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

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1466
2020-10-13 21:45:59 +00:00
Florian Müllner
9d5165b1aa polkitAgent: Drop separate user icon style
It should use the same style as used elsewhere (like the lock screen),
so stop using a separate style class to pick up the defaults.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3252
2020-10-09 13:23:05 +00:00
Ray Strode
6758746f25 screenShield: Fix pointer motion signal handler leak
The screen shield code listens for motion events on the stage
so that it can hide the pointer until the user moves the mouse.

Unfortunately, if the user never moves the mouse, the signal
handler connection gets leaked.

This commit makes sure the connection gets disconnected when the
shield goes away.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1459
2020-10-08 09:46:12 -04:00
Ray Strode
2b44fa893f screenShield: Use identity operator when matching for motion events
The screen shield watches for motion events to know to display
the pointer when the user wiggles their mouse.

It checks for motion events by looking at the event type and
seeing if it is of type `Clutter.EventType.MOTION`.  To do this
comparison it uses the equality operator (==).  Using the equality
operator isn't considered best practice, because it can returns true
when comparing disparate types, if those types happen to be equivalent
after coersion.

From a code resiliance point of view, it's better to use the
identity operator (===), which requires both sides of the comparison
to be of the same type.

As a policy, any legacy code that gets changed or moved should be
switched away from the equality operator to the identity operator, if
appropriate.

This commit makes that change as prep work for a fix to that part of
the code.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1459
2020-10-08 09:45:51 -04:00
Daniel van Vugt
6ba3ca5f95 windowManager: Avoid calling meta_window_actor_thaw when not frozen
Because that tends to crash in:
```
g_error ("Error in freeze/thaw accounting");
```

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1431

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1453
2020-10-08 14:27:58 +08:00
Andre Moreira Magalhaes
cc9f66d784 environment: Handle @content for property transitions
When using `Actor.ease_property` if the property starts with '@' and the
duration of the transition is zero (which may happen if the actor is not
mapped even if a non-zero duration was passed to `ease_property`), the
impl will try getting the actual target object where the property should
be set.

This works fine for most cases but it currently throws an error when
passing '@content.*' properties. Fix this by handling '@content' as
a property of `actor.content` (used by MetaBackgroundActor when
showing the overview).

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1461
2020-10-07 20:49:09 -03:00
Ray Strode
b41ef2f6e3 panel: Disconnect destroy signal handler when needed
The panel corners try to match their style to the buttons closest
to them. In order to make sure the corner styles stay in sync with
their neighboring buttons, they connect to the style-changed signals
of the buttons.

In order to make sure the style-changed signal handler isn't leaked,
it gets disconnected when the button is destroyed.

Unfortunately, the destroy signal handler connection itself gets leaked!

This commit ensures the destroy signal handler gets disconnected any
time the neighboring button is re-determined.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1460
2020-10-07 17:03:52 -04:00
Joonas Henriksson
9963f7ce84 unlockDialog: Use unique unlock-dialog style class
Allows styling the unlock dialog elements individually from the GDM
login dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1421
2020-10-07 16:16:57 +00:00
Florian Müllner
6b1e2df589 extensionUtils: Adjust version check
With the new versioning scheme, the previously-minor version gets
shifted up to major, and unstable releases are marked by non-numeric
"versions" rather than uneven numbers. Reflect that in the extension
version check.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1456
2020-10-06 15:06:09 +02:00
Florian Müllner
da36506ea5 workspacesView: Work around Clutter optimization
Clutter nowadays omits reallocations when only the stage position
changed, that is when the allocation relative to the parent changed.

As a result (apart from better performance of course), workspaces
in the overview may now end up with an outdated "actual geometry"
in case the overview moved to a new primary monitor (of equal size
as the previous one).

Work around that by emitting a signal from the overview on allocation
changes, and use that to update the cached geometry.

We can revert that change once workspaces become part of the regular
overview hierarchy.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3211
2020-10-05 14:11:55 +02:00
Georges Basile Stavracas Neto
d04daf6a1c appDisplay: Protect against source icon destruction
When dragging icons out of a folder dialog, there is a very peculiar
combination of steps that may break GNOME Shell:

 1. Open an app folder dialog
 2. Start dragging an icon to outside the grid
 3. Wait until the popdown animation starts
 4. Before it finishes, drop the icon
 5. See the warnings / crash

That's caused by the source icon being destroyed after the delayed
move timer starts, and before it finishes.

Protect against the source icon being destroyed before the delayed
move timeout triggers by connecting to the 'destroy' signal and
removing the timeout on the callback. Use a single field, called
'_delayedMoveData', to store all data related to delayed moves.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:48 +00:00
Georges Basile Stavracas Neto
aaff88a6bb appDisplay: Remove icon from folder when dragging out
When dragging an icon outside of a folder dialog, there's a small delay
before the dialog pops down. If the icon is dropped during this delay,
the drag is cancelled, and the icon continues to be in the folder.

However, this behavior turned out to be problematic, and it was a common
point of failure that throwing icons outside folders wouldn't work.

Remove the icon from the folder when dragging it to outside the dialog.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3092

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:48 +00:00
Georges Basile Stavracas Neto
1acbdcc9b3 appDisplay: Allow passing callback to AppFolderDialog.popdown()
Next commit will allow removing icons from the folder, and we want to
do that effectively after the dialog pops down.

Add an optional callback to AppFolderDialog.popdown().

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:48 +00:00
Georges Basile Stavracas Neto
33bd038af2 appDisplay: Don't change opacity on destruction
At the end of BaseAppView._clearAnimateLater(), the '_grid' actor's opacity is
set to 255. As it turns out, _clearAnimateLater() is called, among others, by
vfunc_unmap(). However, unmapping is part of the destruction process, and at
the time it is called, '_grid' is already destroying, which makes GJS complain
about accessing an invalid object.

Don't change opacity on BaseAppView._clearAnimateLater(), and instead move it
to the couple of places outside vfunc_unmap() that call it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:48 +00:00
Georges Basile Stavracas Neto
59549e0b13 appDisplay: Save pages when folder apps change
After dragging an icon to inside a folder, we do not save the grid layout,
leaving the icon's position stored when it actually isn't there anymore.

Fix that by saving pages whenever folder apps change.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:48 +00:00
Georges Basile Stavracas Neto
7dafd25ef4 appDisplay: Don't emit 'apps-changed' when deleting folder
To delete a folder, FolderView needs to reset all keys under that particular
folder's GSettings path. That generates 5 'changed' signals, all of which
end up calling AppDisplay._redisplay(), which is costly.

Don't emit 'apps-changed' when deleting a folder.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:47 +00:00
Georges Basile Stavracas Neto
31591ff029 appDisplay: Only change excluded-apps when not deleting folder
It is useless to update the 'excluded-apps' list when we know we're going
to delete the folder entirely.

Only update 'excluded-apps' when not deleting the app folder.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:47 +00:00
Georges Basile Stavracas Neto
75a8697671 appDisplay: Trivial const-correctness fix
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:47 +00:00
Georges Basile Stavracas Neto
1709592811 appDisplay: Adjust folder position
If you try and drop an icon that's in the same page, but before the
drop target, it'll be one position ahead of where it should be -
because we just removed one icon before the target position.

Adjust the final position of the to-be-created folder.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:47 +00:00
Georges Basile Stavracas Neto
8d84e05a2a appDisplay: Reduce folder dialog popdown timeout
1500ms is too long of a delay, and it confuses people more than it
helps with accidental drops.

Reduce the timeout to 500ms as per design feedback.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3092

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:47 +00:00
Georges Basile Stavracas Neto
cc3519332c appDisplay: Lighten folder dialog background when dragging out
As per design feedback, make the app folder dialog background lighter when
hovering it with an icon. This gives the visual feedback to show that that
region is a target.

Use the new DIALOG_SHADE_NORMAL variable in the other places where its color
was hardcoded.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3092

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:47 +00:00
Georges Basile Stavracas Neto
062c014223 appDisplay: Use new moveItem API to move items
This uses the API added in the previous commit. The intent here
is to avoid removing and readding actors when moving them around.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3165

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:47 +00:00
Georges Basile Stavracas Neto
ffdff07eaf iconGrid: Add moveItem
This new public API moves items without removing and readding
them, which allows us to avoid some tricky behavior. Noticeably,
following the original design described at 3555550d5, the new
IconGridLayout.moveItem() method does not call `layout_changed`.
This is done by IconGrid itself, queueing a relayout.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:47 +00:00
Georges Basile Stavracas Neto
bfd4d0f7aa appDisplay: Factor out linear position calculation
When adding an item to the app grid, the item is added to
a sorted array. This is calculated by adding all visible
items in pages before the one being modified. Future commits
will need this to move items without reparenting them, so
factor this code into a separate function.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
2020-10-05 12:06:47 +00:00
Florian Müllner
ab9aa5b1f2 workspacesView: Update workspace visibility when entering overview
This was missed in commit 96f63b08c2 when splitting the combined
layout+scrolling method into allocation and translation.

Add it back to prevent windows from other windows leaking into view
during the transition.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3208
2020-10-02 19:56:01 +02:00
Florian Müllner
6ce4605c3a workspacesView: Always clip to allocation
We couldn't clip workspaces views during the overview transition
when we used the "porthole" approach, but as view's allocation
now always matches the expected visible area, we can just apply
the clip unconditionally.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3208
2020-10-02 19:49:40 +02:00
Florian Müllner
432c2863ab dash: Restore icon's expected DND behavior
Commit ff3d32dd18 added a custom DashIcon subclass that disables
all DND methods from ancestors, including canceling the context
menu timeout and emitting the overview's item-drag-begin signal.

All we want is opting out of the parent's scale-and-fade behavior,
so override those methods instead.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3209
2020-10-02 15:41:04 +00:00
Florian Müllner
494e628c38 dateMenu: Do not ellipsize date header
Currently the width of the calendar column is solely determined
by the calendar, while other elements are ellipsized as necessary.

While that is the desired behavior for the events-, world clocks-
and weather sections, we don't want to cut off the date in the
header. However switching to bold text made that more likely in
non-English locales or when using large text, so explicitly take
it into account for the width negotiation.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2230
2020-09-25 12:00:40 +02:00
yun341
3fb321fd21 authPrompt: set value of beginRequestType to 'DONT_PROVIDE_USERNAME'
Commit 809f820c introduct vmware SSO service to gnome-shell, the value
beginRequestType should be set to 'DONT_PROVIDE_USERNAME', otherwise
vmware sso will fail. This patch will fix it.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1443
2020-09-23 15:42:51 +00:00
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