Commit Graph

7309 Commits

Author SHA1 Message Date
Florian Müllner
19fc7c4d31 loginDialog: Do not expand "Not listed" button
Visually the button is just an interactive label, so having the
interactive area extend to the empty space next to the label
is surprising.

Instead, left-align the whole button rather than just the label
inside, so the clickable area corresponds to the visible one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1046
2020-02-26 19:46:50 +00:00
Florian Müllner
d66f5ab3c6 mpris: Disallow media section on login screen
The 'gdm' user is not going to run a media player, so there is no
point in allowing the corresponding section on the login screen.

All other sections are already disabled, so this is the only reason why
we end up with the message list instead of only showing the calendar.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2241
2020-02-26 17:45:33 +00:00
Daniel van Vugt
c773c8c162 Revert "js/ui: Use Clutter.OffscreenRedirect.ON_IDLE"
This reverts commit c0c027c608. Because for
some reason animating external opacity and position is still incurring
internal repaints, which disables offscreening and makes fading of
overlapping actors look wrong. `ON_IDLE` should be fixed in mutter before
it is used (in boxpointer at least) again.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/2270
2020-02-26 11:54:54 +08:00
Jonas Dreßler
b3999e4078 overview: Hide the overview on session mode hasOverview changes
If the sessionMode does not allow to show the overview, we should also
hide an already visible overview.

This fixes a bug where, if the lockscreen was shown while the overview
was visible, the Ctrl+Alt+Tab popup would allow navigating inside the
overview because the overview actor is still mapped.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1043
2020-02-25 20:10:22 +01:00
Philippe Troin
d0a587d42f panel: Only consider St.Widgets for corner buttons
We cannot syncronize styles with plain Clutter.Actors, so don't return
them when looking for corner buttons.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1047
2020-02-25 18:32:30 +00:00
Florian Müllner
2bb8e1be9b environment: Handle reversed transition with 0 duration
If a transition is reversed, the final property values will be the
same as before the transition. However this currently only works
correctly when we actually use a transition; to fix this with a
duration of 0, simply skip the set() call when the transition is
reversed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1042
2020-02-25 18:08:47 +00:00
Jonas Dreßler
4c4d23ed83 dateMenu: Sync initial state of the message indicator
While the unread messages indicator is updated when starting a new
session because we call _onSourceAdded() on existing sources, we should
also update the do-not-disturb setting which might still be enabled.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1037
2020-02-25 16:47:29 +01:00
Jonas Dreßler
7173ec1df7 dateMenu: Remove an unnecessary change for RTL layouts
Calculating 1 - 0.5 is rather useless if the value was 0.5 before...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1037
2020-02-25 16:47:24 +01:00
Jonas Dreßler
bc465ab006 theme: Hide panel underline under the do not disturb icon
Hide the focused/active indicator of the panel underneath the
do-not-disturb icon.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1037
2020-02-25 16:47:17 +01:00
Florian Müllner
d62391c8f1 unlockDialog: Set accessible name of icon-only buttons
We turned both the auth prompt's cancel button and the switch user
button into icon buttons now, which means they are completely cryptic
when using a screen reader.

Just use the previously used labels as accessible names, which has the
nice side effect of lowering the impact of the string freeze break.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2210
2020-02-24 12:29:44 +00:00
Florian Müllner
ab24ee7a7e authPrompt: Don't focus hidden cancelButton
The button is hidden on the lock screen, so it shouldn't be allowed to
activate it, be it via click or keyboard. The latter is still possible
by keynaving to the button and hitting space/enter. Fix that by making
the button unfocusable when we make it unreactive.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2210
2020-02-24 12:29:44 +00:00
Florian Müllner
c52fd9373c unlockDialog: Turn mainBox into an St.Widget
This is the container that contains the elements that are interesting
for keynav, so it must be aware of focus-chain and -navigation.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2210
2020-02-24 12:29:44 +00:00
Florian Müllner
1249655d0a unlockDialog: Don't make dialog focusable
There is little point in focusing the dialog itself, we want keynav
to navigate inside instead and navigate between focusable children.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2210
2020-02-24 12:29:44 +00:00
Jonas Dreßler
3848513cf4 magnifier: Use inhibit-unfocus API to keep wayland focus while hidden
Since commit mutter/a2a8f0cda we force the focus surface of the
meta-wayland-pointer to NULL while the pointer is hidden. This
introduced an issue with the magnifier, where we use
`set_pointer_visible` to hide the real cursor and show our own cursor at
the correct position: Because the meta-wayland-pointer is still used to
communicate with Wayland clients, the UI of the windows will not respond
to mouse movement anymore as soon as the real cursor is hidden.

To fix this, use the newly added clutter_seat_inhibit_unfocus() API to
temporarily disable unsetting the focus-surface while the magnifier is
hiding the system cursor.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/993
2020-02-24 10:31:08 +00:00
Jonas Dreßler
725c72e020 magnifier: Use own showSystemCursor() instead of set_pointer_visible()
We already have our own function to show the system cursor, use it!

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/993
2020-02-24 10:31:08 +00:00
Florian Müllner
3633e1feca shellEntry: Restore natural-height-set instead of forcing it
If we are transitioning the label from 0 to its natural height, we
must set natural-height-set again after querying the preferred height,
otherwise Clutter would skip the transition.

However when transitioning in the opposite direction, setting the
property to true can go horribly wrong:
If the actor hasn't been allocated before, it will store a fixed
natural height of 0. But as there is no fixed min-height, we can
end up with min-height > natural-height, which is a fatal error.

(This isn't an issue when *actually* setting a fixed height, as
that will set both natural and minimum height)

So instead of always setting natural-height-set to true, restore
its previous value to fix the issue.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2255
2020-02-22 16:58:01 +00:00
Florian Müllner
4759197200 util: Don't wiggle when animations are disabled
repeatCount and autoReverse don't play well with animations disabled:
They cause password entries to wiggle themselves off-screen (by ending
up with some off-scale translation-x value).

While we should handle this more gracefully in the transition helpers,
it also makes sense to handle the case directly in wiggle(): As it
uses a chain of three transitions, we would still end up with a crude
one-frame-per-transition wiggle "animation".

Instead, do no animation at all as you would expect when animations are
disabled.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2236
2020-02-22 16:38:43 +00:00
Jonas Dreßler
255627bd69 layout: Show and hide keyboard using translation_y
ClutterActors anchor-y property is deprecated, which means we get a
warning when animating it, so use the translation property instead to
show or hide the osk.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1039
2020-02-21 12:59:21 +00:00
Florian Müllner
0afac36713 unlockDialog: Use "normal" background
Now that we apply a strong blur effect to the background, it doesn't
make too much sense to use a separate lock-screen background: It will
be mostly unrecognizable anyway.

The alternative would be to turn off the blur effect if a different
background is used (or have a hidden setting for that), but that would
then imply that we must keep the contents readable without blur.

Let's avoid that rabbit hole and just re-use the regular background.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1001
2020-02-21 12:34:37 +00:00
Daniel van Vugt
c0c027c608 js/ui: Use Clutter.OffscreenRedirect.ON_IDLE
To bypass offscreening in cases where continuous animation is happening.
Offscreening is slower in such cases so this reduces the render time of
animations within offscreenable actors.

On an i7-7700 this reduces the render time of boxpointers for example by
25-30%.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1025
2020-02-21 12:19:15 +00:00
Jonas Ådahl
32fa060a62 closeDialog: Make dialog inactive while fading out
Otherwise the user might click Kill, which would crash if the fade-out
was triggered because a Wayland window was closed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1032
2020-02-21 08:11:57 +00:00
Daniel van Vugt
38da479ee8 slider: Calculate handle position in whole pixel units
`-slider-handle-radius` is a floating point value and even in the default
theme it's not a whole number. Regardless of the fractional part that's
still going to occupy a whole extra pixel with antialiasing. So make room
for it. Otherwise it looks clipped, which it is by the Cairo context of
its `StDrawingArea`.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1569
2020-02-21 11:29:09 +08:00
Florian Müllner
ee6635282c status/keyboard: Check for monkey-patched property before using it
This avoid another "reference to undefined property" warning.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1035
2020-02-20 19:08:47 +00:00
Florian Müllner
ff39b3274b authPrompt: Initialize property in _init()
This avoid a "reference to undefined property" warning when using
it in a comparison.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1035
2020-02-20 19:08:47 +00:00
Carlos Garnacho
57669bca1b keyboard: Specify symbolic icons to use in default keys
The style classes are not removed yet, might make sense to do that
if they don't bring anything wrt theming.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2214
2020-02-20 11:34:07 +00:00
Carlos Garnacho
5171bdd45f keyboard: Add support for setting OSK keys with icons
Unused at the moment, but add the plumbing so that default key
definitions may specify symbolic icons that will be shown instead
of the text.

This is intended to replace the use of CSS and background-image
to handle those buttons with an icon.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2214
2020-02-20 11:34:07 +00:00
Jonas Ådahl
9ab0071aa5 introspect: Add AnimationsEnabled property
While the gsetting is available for all who needs it, the Shell might
override it given various hueristics. Expose the decision made by the
Shell via a new property.

Intended to be used by gsd-xsettings as well as xdg-desktop-portal-gtk.

This also add a version property to the API, so that semi external
services (xdg-desktop-portal-gtk) can detect what API is expected to be
present.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/757
2020-02-20 11:14:55 +00:00
Jonas Ådahl
cf39b2db87 introspect: Rename variable
It was too generic, and would conflict with a StSettings variable.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/757
2020-02-20 11:14:55 +00:00
Jonas Ådahl
8a1c0f3a42 main: Inhibit animations when there is a remote desktop session
If a remote desktop session asks for animations to be disabled, inhibit
animations while the session is active.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/757
2020-02-20 11:14:55 +00:00
Jonas Ådahl
4b42879a2c main: Inhibit animations if X server advertises VNC-EXTENSION
This was previously done by gsd-xsettings to disable animations when
running in Xvnc.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/757
2020-02-20 11:14:55 +00:00
Jonas Ådahl
394121f77d main: Inhibit animations when software rendered
This was previously decided by gsd-xsettings.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/757
2020-02-20 11:14:55 +00:00
Jonas Ådahl
059fb5c7cb introspect: Add helper to check method call permission
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/757
2020-02-20 11:14:55 +00:00
Florian Müllner
affbec73ef extensionPrefs: Fix more fallout from un-templating strings
The version field in extension metadata is a number, so we cannot
just use it as a string.

('creator' should be fine, but change it as well for the symmetry)

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1031
2020-02-19 19:29:21 +01:00
Daniel van Vugt
e781e1fdba iconGrid: Create icon clones in a separate loop
For reasons not yet fully understood, `Main.uiGroup.add_actor` takes around
10 milliseconds to complete.

Because of this, each `actor.opacity = 0` has a good chance of falling
on a different frame. And when it does, `_opacityChangedId` also lands
on multiple different frames each incurring a separate relayout cycle.
It is this excessive number of relayouts that causes stuttering in the
icon grid animation (#2065). But it is the slowness of `uiGroup.add_actor`
that causes the number to be excessive when it should be one.

By creating the clones and adding them to `uiGroup` early, we then enable
the existing loop starting the animation to complete within a single frame.
And by completing within a single frame all the opacity changes land within
the same frame interval, thus incurring only a single relayout instead of
many.

This issue went unnoticed until 004a5e1042 (!704), after which the slow
emissions of `notify::opacity` became a more visible performance problem.

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

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1002
2020-02-19 15:39:21 +00:00
Florian Müllner
6e7344b837 dateMenu: Use BindConstraint for indicator pad
Now that Clutter.BindConstraint modifies the size request in addition to
the allocation, we can use it instead of the custom IndicatorPad widget.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1026
2020-02-19 12:44:28 +00:00
Georges Basile Stavracas Neto
b8f8e1710b appDisplay: Remove unnecessary bind constraint
Now that the bind constraint changes the preferred size of
the actor, a major flaw in the AppDisplay code was exposed:
the folder dialog depends on the preferred size of a parent,
and the parent depends on the preferred size of the folder
dialog.

While we know this is not actually true, we shouldn't rely
on broken behavior to achieve this result. What's interesting
is that the bind constraint used by the folder dialog is a
relic of the development phase; we now control the position
and size of the dialog with a combination of CSS, and alignment.

Remove the unnecessary bind constraint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1027
2020-02-19 09:20:05 -03:00
Jonas Dreßler
8b0a67fe64 dateMenu: Hide overlay scrollbar in the notification popup
Since the design of the notification popup changed with the theme
refactor and there are now boxes around the world-clock and weather
sections, the overlay scrollbar that is shown above them looks rather
bad. So simply hide that scrollbar, we still have the vfade effect to
indicate the container is scrollable and we also depend on that in the
new popup app-folders.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1013
2020-02-19 11:47:04 +00:00
Jonas Dreßler
26a49168ba lookingGlass: Also handle null objects in objectToString
Whoops, while ff4623454 fixed the handling of `undefined` objects,
`null` objects obviously still don't have a toString() method. So also
handle those and return 'null' in case the object is null.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1024
2020-02-19 11:56:36 +01:00
Florian Müllner
ff4623454f lookingGlass: Handle undefined in objectToString()
Fallout from commit 9d941f8202: Template strings handle undefined
values just fine, the replacement does not. Fix that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1020
2020-02-19 11:17:17 +01:00
Jonas Dreßler
cf5204760d workspace: Ensure style of window-chrome titles before requesting width
Make sure the stylesheet properties of the window-chrome title are
updated before requesting the preferred width of the title to prevent
size changes of the title after we animated the width.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/58
2020-02-19 10:09:20 +00:00
Jonas Dreßler
2a3875775d userWidget: Always set actor size inside update()
We also want to ensure the Avatar StBin is sized correctly when an icon
child is used, so always set the actor size inside the `update()`
function.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1018
2020-02-18 22:10:00 +00:00
Jonas Dreßler
38b38732d3 userWidget: Simplify icon size setting a bit
Remove the default icon size of -1 and always set the container StBin to
a real size. This fixes an error where the "width" and "height"
properties get set to -2 (which is -1 * scaleFactor) in the `_init`
function.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1018
2020-02-18 22:10:00 +00:00
Florian Müllner
24c8f5bb70 authPrompt: Fix cancel button visibility
Grrr, this slipped in in 5cad5c20e9, and we don't have a compiler
to catch those kinds of bugs :-(

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2228
2020-02-18 21:34:16 +00:00
Jonas Dreßler
45bc8ae292 keyboard: Plug a leak of KeyboardControllers
To make sure the GC really disposes the KeyboardController object we
need to remove all references to the object, which means we have to
disconnect signals the object connects to, too.

This also fixes a bug where keys remain pressed forever and thus also
break that key on real keyboards. It happens if the OSK gets destroyed
during an OSK-key is being held so the StButton of the key is not
released. That means the key remains pressed in the
MetaVirtualInputDevice that we are now leaking because
KeyboardController isn't garbage collected.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1015
2020-02-18 14:48:39 +00:00
Florian Müllner
9d941f8202 js: Don't use templates in files with translations
xgettext gained some support for template strings, and no longer
fails when encountering '/' somewhere between backticks.

Unfortunately its support is still buggy as hell, and it is now
silently dropping translatable strings, yay. I hate making the
code worse, but until xgettext really gets its shit together,
the only viable way forward seems to be to not use template
strings in any files listed in POTFILES.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1014
2020-02-17 23:20:40 +01:00
Jonas Dreßler
80a869e768 dialogs: Use a smaller font-size if the title width exceeds the space
Since quite a few strings of dialogs provided by external programs are
not updated yet and the string freeze is already in effect, make sure we
don't break those dialogs by stripping aways large parts of the
headline.

To do that, detect if the title label is larger than the available width
and if it is, switch to a smaller font-size of 13pt. This makes sure we
still show about the same number of characters in the headline as we did
in previous releases.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1012
2020-02-17 21:42:05 +00:00
Florian Müllner
6f12864776 screenShield: Always deactivate when interrupting idle before lock
With the old screen shield, we were simply hiding the lightboxes to show
the shield when the user became active after activating the shield but
before locking the screen (that is, when using a lock-delay).

However now that the shield is gone, we end up showing the unlock dialog
even though we are not actually locked.

We probably don't want to add back a shield-like mode (that is, a way to
raise the unlock dialog without authentication when we aren't locked),
so just deactivate the whole shield when the user becomes active again
before the lock kicks in.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2213
2020-02-17 11:13:34 +00:00
Florian Müllner
5934dc16d3 screenShield: Reset correct translation
When showing the lock dialog without animation, we currently reset the
translation of the wrong actor, leaving the unlock dialog off-screen.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2213
2020-02-17 11:13:34 +00:00
Jonas Dreßler
bcc652632d authPrompt: Use the same hint text as the polkitDialog for the password
Be consistent and show the hint for the password entry that we already
show in the polkitDialog in the auth dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/977
2020-02-17 11:03:07 +00:00
Jonas Dreßler
95ebbb9360 Update hint texts of all entries
The design team discussed the ellipses at the end of the hint text of
our entries and, even though they are present in most mockups, it turned
out they don't like them, so remove them.

It also turned out they don't like the prefixes like "Enter" before it,
so remove those, too.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/977
2020-02-17 11:03:07 +00:00