Commit Graph

7028 Commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
37c41af1b7 screenShield: Move lock shield below dialog
Pretty much what the commit title says.

This gives the lock shield actor another role: instead of
being the interactive screen shield, make it the invisible
actor that prevents interacting with windows while the
unlock dialog is sliding down.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:43:10 -03:00
Georges Basile Stavracas Neto
262b600490 screenShield: Only animate the unlock dialog
Remove the slide-up-down animation from the lock shield.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:43:10 -03:00
Georges Basile Stavracas Neto
c937103071 screenShield: Lift the unlock dialog
Instead of scaling it, lift the unlock dialog when unlocking,
and vice-versa.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:43:10 -03:00
Georges Basile Stavracas Neto
a3a00434b1 screenShield: Remove scrolling
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:43:10 -03:00
Georges Basile Stavracas Neto
28f85a3308 screenShield: Cleanup unused method arguments
The 'velocity' argument is not used anymore, since the only
caller passing a different value than 0 was the drag motion
callback.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:43:10 -03:00
Georges Basile Stavracas Neto
2a1ea497c0 screenShield: Remove the drag action from the shield
This is start of the end of the screen shield; start by
removing the dragging action from it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:43:10 -03:00
Georges Basile Stavracas Neto
e64c12dd27 unlockDialog: Don't destroy on cancel
Otherwise there will be no way to recover it in the future. Also
remove an else condition that assumed the dialog would destroy
itself on cancel.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:43:10 -03:00
Georges Basile Stavracas Neto
a6897c5f90 screenShield: Always show session's unlock dialog
Instead of destroying the dialog when the screen shield is
visible, and creating it when lifting the shield, always show
the session's unlock dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:43:10 -03:00
Georges Basile Stavracas Neto
e3f87bac23 screenShield: Remove _lockScreenContents and family
It is not used anymore, and together with it, we don't need the
_ensureLockScreen() / _clearLockScreen() pair anymore too.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:43:10 -03:00
Georges Basile Stavracas Neto
57cff9a48b screenShield: Move background to Unlock Dialog
In addition to that, remove the ClutterBoxLayout that is set as
the layout manager of the Unlock Dialog, and apply the primary
monitor constraint to the child St.BoxLayout instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:43:10 -03:00
Georges Basile Stavracas Neto
7274ed52dd screenShield: Remove unused 'onPrimary' argument
The 'onPrimary' argument was being passed to dialog.open(). Turns out,
neither UnlockDialog nor LoginDialog use this parameter.

Remove the unnecessary 'onPrimary' parameter, and cleanup the related
code.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:43:10 -03:00
Georges Basile Stavracas Neto
5e8943340d screenShield: Move notifications to Unlock Dialog
Also adjust the CSS style classes names to match the new owner.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:43:07 -03:00
Georges Basile Stavracas Neto
044ef27c7e unlockDialog, loginDialog: Add a 'wake-up-screen' signal
The signal is currently present in the notifications box, but next
commits will move the notifications box to the unlock dialog.

Add a 'wake-up-screen' signal to the dialogs.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:35:51 -03:00
Georges Basile Stavracas Neto
ef716a7eb5 screenShield: Move clock to Unlock Dialog
Move the Screen Shield clock to Unlock Dialog. Also adjust
the CSS style classes names to match the new owner.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:35:51 -03:00
Georges Basile Stavracas Neto
0cead8c074 screenShield: Remove arrows
They are not present anywhere in the new mockups.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2019-12-16 14:35:51 -03:00
Georges Basile Stavracas Neto
b41ae733a9 screenShield: Animate shield using translation_y
Instead of using the 'y', which queues a full relayout and
thus forces effects to be reapplied, use the 'translation_y'
property, that doesn't force relayouts and allows the blur
effect to actually use the cached framebuffers a lot more.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/864
2019-12-16 13:01:33 -03:00
Georges Basile Stavracas Neto
768193ab20 screenShield: Blur background
This is a moderately fast two-pass gaussian blur implementation.
It downscales the framebuffer dynamically before applying the
gaussian shader, which cuts down rendering time quite considerably.

The blur shader takes 2 uniforms as input: the blur radius; and
whether to blur vertically or horizontally.

The blur radius is treated as an integer in C land to simplify
calculations. The vertical parameter is treated as an integer by
the shader simply due to Cogl not having proper boolean support
in snippets.

At last, brightness is also added to avoid needing to use an extra
effect to achieve that. Brightness is applied in a different pipeline
than blur, so we can control it more tightly.

ShellBlurEffect also implements a "below" mode, where the contents
beneath the actor are blurred, but not the actor itself. This mode
is performance-heavy.

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

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/864
2019-12-16 13:01:33 -03:00
Carlos Garnacho
9115f6e796 workspace: Pass device to startDrag()
This is necessary to make DnD operations work from tablet devices on
wayland, as it's not the same onscreen pointer sprite than mice. Fixes
window DnD in the overview on tablet devices, no longer having them stick
to the wrong pointer.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/897
2019-12-13 17:53:41 +00:00
Bastien Nocera
4d16d2ceed appDisplay: Remove unimplemented 'activate-discrete-gpu'
It was added in commit 009d021 but not advertised, and likely not used
by an application since then.

See: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/781
2019-12-12 17:19:41 +01:00
Benjamin Berg
4a6c2f1fe6 util: Place spawned processes into a systemd scope
This improves the separation from the shell for applications launched
with Alt+F2 and in a few other cases.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/863
2019-12-11 09:34:36 +01:00
Florian Müllner
154655838d weather: Only require auto-location authorization if sandboxed
Since commit 87e60ed97843, geoclue no longer pretends that authorization
is useful for system-installed apps (as they can easily lie about their
ID). Unfortunately this broke our auto-location support in case Weather
is installed non-sandboxed, as we are waiting for an authorization that
will never happen.

Unbreak it by only requiring authorization when installed as Flatpak.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1823
2019-12-09 11:10:54 +00:00
Robert Mader
0795d8df5f magnifier: Adapt to painting and picking API change
This was left out in 988a0e7314

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/891
2019-12-07 13:08:28 +00:00
Robert Mader
85bec783ee screenShield: Adapt to painting and picking API change
This was apparently forgotten in 988a0e7314, causing the warning:
`JS ERROR: Error: Too few arguments to method Clutter.Actor.paint`

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/891
2019-12-07 13:08:28 +00:00
Florian Müllner
ccd8b47d30 popupMenu: Close when a system modal pops up
Just like switcher popups, popup menus don't play well together with
system modals, and generally have a lower priority. So just like
switcher popups, close popup menus when a system modal dialog pops
up.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1536
2019-12-06 20:26:01 +01:00
Florian Müllner
c0309d9732 switcherPopup: Dismiss when a system modal dialog opens
As system modal dialogs may open without user interaction (for instance
polkit or network agent requests), it is possible for them to pop up
while the app/window switcher is up.

The current result of having both up simultaneously is clearly broken,
so we can either dismiss the popup or prevent the modal dialog from
opening. Assume that the dialog indicates a more important action and
should therefore take precedence, so go with the former.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1536
2019-12-06 19:55:39 +01:00
Jonas Dreßler
2ba4108838 appDisplay: Rename _allItems array to _orderedItems
Since both the `_items` object and the `_allItems` array include the
same items, the difference between those variables seems unclear. The
real difference between them (except the different data type) is that
`_allItems` is ordered in the same order as the visible grid, so rename
`_allItems` to `_orderedItems` which makes that more obvious.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/799
2019-12-05 15:43:34 +00:00
Jonas Dreßler
203c3f9949 appDisplay: Make AllViews folderIcons property private
This property is not used anywhere outside the class, make it private.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/799
2019-12-05 15:43:34 +00:00
Jonas Dreßler
61b71998a0 appDisplay: Make _items object a Map
Use a Map instead of an Object here makes it easier to loop through
keys, which we're going to do in the next commit.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/799
2019-12-05 15:43:34 +00:00
Jonas Dreßler
c4fa052b03 appDisplay: Use _getCategories function instead of duplicating the code
We already have a function which gets the categories of an app and
handles the null-return case, use it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/799
2019-12-05 15:43:34 +00:00
Jonas Dreßler
f3eeb94c90 checkBox: Fix expand and align properties
In f2bd39b20c, the expand property for
checkboxes was accidentally set to the grandchild (the StBin), instead
of the child (the StBoxLayout) of the StButton. Fix that and let the
BoxLayout expand instead of the Bin.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/885
2019-12-05 15:35:22 +00:00
Florian Müllner
a2044c61ae extensionPrefs: Always redefine getCurrentExtension() on prefsModule access
We have three interactions with an extension's prefs module:
 - we import the module
 - we call its init() hook
 - we call its buildPrefsWidget() hook

The first two are one-time actions where we expect most getCurrentExtension()
calls (local imports, initTranslations() etc.).

However it's still possible that the extension will use the utility function
in buildPrefsWidget() as well, either directly or via other functions like
getSettings(): Make sure getCurrentExtension() returns the correct extension
in that case, not the last one whose preferences were initialized.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/873
2019-12-05 15:24:34 +00:00
Florian Müllner
2703eed446 extensionPrefs: Simplify state change handling
The new `ExtensionStateChanged` signal already passes the changed
extension object, no need to request it again with `GetExtensionInfo`.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/873
2019-12-05 15:24:34 +00:00
Georges Basile Stavracas Neto
59a43f496d appDisplay: Move to rename folder location
Following the same reasoning of the previous commit, move to
the renamed folder location.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/883
2019-12-05 12:00:11 +00:00
Georges Basile Stavracas Neto
d28bc7afe6 appDisplay: Show newly created folder when creating
The icon grid currently sorts icons by their names. When creating new
folders, the folder may end up being in a different page, and that's
confusing since we don't actually move to where the new folder is.

Move the icon grid to the newly created folder.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/883
2019-12-05 12:00:11 +00:00
Jonas Dreßler
22cb0b002d closeDialog: Fix scale of dialog for x11 clients in Wayland sessions
We missed this case in b6e57a5ae8,
XWayland clients obviously don't use MetaWindowWayland and thus they
don't apply the double scaling that commit was meant to fix.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/884
2019-12-04 22:25:03 +00:00
Florian Müllner
021f3e49b5 keyboard: Update extended key size on parent size changes
Extended keys should have the same size as their parent key, so
make sure to update them when the parent size changes.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1976
2019-12-04 20:48:37 +01:00
Florian Müllner
91bf7f1e44 keyboard: Use parent key's allocation for extended key size
An outdated allocation is likely still better in this case than the
preferred size, so use that instead of width/height which may fall
back.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1976
2019-12-04 20:48:37 +01:00
Florian Müllner
7fbdaadce2 keyboard: Create extended keys before updating hover state
We want extended keys to have the same size as their parent key,
but this is currently broken and the keys end up with their
parent key's preferred size (which is smaller than its allocated
size).

This is due to the way ClutterActor's width/height properties work,
which only return the "real" (i.e. allocated) size when the allocation
is valid, and fall back to the preferred size otherwise.

As changing an StWidget's hover state involves adding or removing
the `:hover` pseudo class, this is currently always the case.
Creating the extended keys first means the keyButton's allocation
is probably valid, so do that.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1976
2019-12-04 20:48:37 +01:00
Florian Müllner
ff7dfa9259 keyboard: Fix widget leak
We currently create an extended-keys popup every time it is requested,
but only destroy it (or rather: the last one) when the keyboard itself
is destroyed.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1976
2019-12-04 20:48:37 +01:00
Florian Müllner
85f10f1f6a keyboard: Use camelCase
Those aren't GObject properties, so should follow the regular JS style.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1976
2019-12-04 20:48:35 +01:00
Florian Müllner
9b4780fa1d keyboard: Reindent timeout handlers
We are going to touch some of the code, so take that opportunity
to move them to the new indentation style.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1976
2019-12-04 20:47:09 +01:00
Jonas Ådahl
632a643994 Use paint and pick context to get framebuffer
Mutter and Clutter was changed to pass around the current target
framebuffer via the paint context instead of via the deprecated Cogl
framebuffer stack.

The framebuffer stack has also been removed from Cogl so change to use
the one in the paint context instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/827
2019-12-03 19:07:15 +00:00
Jonas Ådahl
988a0e7314 Adapt to painting and picking API change
While still leaving them unused, pass around ClutterPaintContext and
ClutterPickContext when painting and picking.

The reason for splitting this change up in two is to make it possible to
bisect easier in between the API change and the change to using the
framebuffer passed around with the temporary contexts.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/827
2019-12-03 19:07:15 +00:00
Florian Müllner
867cffaf20 switcherPopup: Fix scrollable check
When commit c6cea277e replaced Shell.GenericContainer, the check
whether the required width exceeds the avilable width was changed
from using the minimum widths of items to the natural width of the
scroll view.

That doesn't work correctly, as the *natural* width may well exceed
the actually used width: SwitcherList bases its width request on
children's minimum sizes to force labels to ellipsize.

Fix this by using the minimum width of the scroll view's child instead.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1834
2019-11-29 16:47:48 +01:00
Joonas Henriksson
749a4c9f6c appIcon: Draw running dot above the overview icon
Prevent the app-well-app-running dot from getting unintentionally
hidden behind the overview-icon background by initializing the
running-dot after its sibling overview-icon.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/866
2019-11-27 02:59:13 +01:00
Florian Müllner
0a9e1b4173 fileUtils: Delete deleteGFile hack
It is true that delete is a javascript keyword, but that doesn't
prevent it from being used as method name - there are event built-in
types like Map or Set with delete() methods!

So if that hack was ever needed, this hasn't been the case for years
now; just removed the hack now.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/862
2019-11-26 22:17:28 +00:00
Benjamin Berg
f742484795 extensionSystem: Create a file to flag that extensions are being loaded
When the extension system is loaded, create the
gnome-shell-disable-extensions file in the users runtime directory. This
file is automatically removed 60s later. The sole purpose of this file
is to be consumed by the systemd units. If the file exists, the systemd
units will disable extensions when the gnome-shell fails.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/858
2019-11-25 21:49:49 +00:00
Florian Müllner
eee1ab4890 introspect: Fix whitelist check
The whitelist is a list of well-known D-Bus names, which we then search
for the unique name we get from the method invocation - unsuccesfully.

Fix this by watching the bus for any name in the whitelist in order
to maintain a map from wel-known to unique name that we can use for
matching.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1916
2019-11-25 20:00:10 +01:00
Joonas Henriksson
18421e8aed theme: Add message close button styling
Since the notification message close button had no border, or mouse
over effect, there was no way to determine whether the mouse cursor
were over the button.

Improve this by adding a message-close-button class for the close
button, and a styling for its hovered state, based on media control
button styling.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/855
2019-11-25 18:02:07 +02:00
Jonas Dreßler
5a287a4205 appDisplay: Add a timeout when switching pages during DnD
Currently when dragging an icon to the space above or below the appGrid
to switch pages, we do so very quickly without checking when the last
page-switch happened. This makes it hard to move icons to pages which
are not the first or the last one, since the other pages are skipped
very quickly.

To fix this, add a timeout of 1 second that blocks switching pages after
a page-switch using drag overshoot occured.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1693
2019-11-24 19:35:30 +01:00