Commit Graph

16618 Commits

Author SHA1 Message Date
Florian Müllner
cd33f5d907 Revert "layout: Exclude hidden actors from struts"
The changes violated too many assumptions on the mutter
side. And even if those were addressed, changing the
work area when a window enters/leaves fullscreen isn't
great, because it will force an expensive relayout on
all other windows.

This reverts commit cd1102ff30.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2223>
2022-03-05 22:29:57 +00:00
Luna Jernberg
27df8c2cd0 Update Swedish translation 2022-03-05 20:13:30 +00:00
Daniel van Vugt
918c063693 st: Generate shadows from the silhouette of the source texture
As first mentioned in commit 672171093, the CSS spec defines shadow
colors independently from the colors casting the shadow. It's not
a physical light simulation so a shadow is allowed to be a different
color from texture casting it.

This means we only care about the shape of the source where alpha
values of zero are adjacent to alpha values of non-zero. And all such
non-zero pixels should be treated as fully opaque for the purpose of
shadow generation. While this would be wrong for a physical light
simulation it does allow us to cast shadows around semi-translucent
shapes and better support CSS.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4477
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1918>
2022-03-05 13:55:37 +00:00
Jonas Ådahl
b3c7a855c6 workspaceThumbnail: Use transient object for connecting some signals
We want to connect and disconnect a bunch of signals when showing/hiding
the worskpace thumbnails. To make this easy, use a transient object that
we tie to these signal handlers.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2220>
2022-03-05 10:08:48 +01:00
Florian Müllner
cf29ec2f22 signalTracker: Add TransientSignalHolder class
There are cases where we want to connect to a number of signals
for the lifetime of an object, but also other signals for a
limited period (say: between show and hide).

It is currently not possible to use disconnectObject() for the
latter, because it will disconnect all signals.

To address this use case, add a small class that can be used as
a transient signal holder, while still benefiting from autocleanup
by proxying the real owner.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2221>
2022-03-05 00:12:27 +00:00
Florian Müllner
7b0a94b246 signalTracker: Use connect_after to track 'destroy'
The 'destroy' signal currently doesn't work with connectObject(),
because the handler is only connected after the signal tracker's
own destroy handler, which disconnects all handlers.

Address this by using connect_after for the cleanup handler, so
that other destroy handlers run before it (unless they also use
ConnectFlags.AFTER, but well *shrug*).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2221>
2022-03-05 00:12:27 +00:00
Florian Müllner
70a896ec45 ci: Cover more node types in check-potfiles
gjs enabled support for static class blocks and class fields, so
adjust the script to not trip over those nodes when we start
using them.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2221>
2022-03-05 00:12:27 +00:00
Florian Müllner
69717424f7 workspaceThumbnail: Remove unused properties
Those aren't used anymore since the switch to connectObject().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2222>
2022-03-05 00:38:05 +01:00
Jonas Ådahl
f979ebcb1a remoteAccess: Hide indicator after a timeout
In order to make very short screen capture sessions more visible, let
the indicator remain visible, but a bit greyed out, for some seconds.
This makes it more obvious something was just capturing the screen.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2132>
2022-03-04 22:05:46 +00:00
Jonas Ådahl
5916a87103 ci: Bump mutter CI image
It's needed to make mutter build again.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2132>
2022-03-04 22:05:45 +00:00
Jiri Grönroos
f5abbb339a Update Finnish translation 2022-03-04 20:16:39 +00:00
Florian Müllner
26235bbe54 js: Use (dis)connectObject()
Start using the new methods to simplify signal cleanup. For now,
focus on replacing existing cleanups; in most cases this means
signals connected in the constructor and disconnected on destroy,
but also other cases with a similarly defined lifetime (say: from
show to hide).

This doesn't change signal connections that only exist for a short
time (say: once), handlers that are connected on-demand (say: the
first time a particular method is called), or connections that
aren't tracked (read: disconnected) at all.

We will eventually replace the latter with connectObject() as
well - especially from actor subclasses - but the changeset is
already big enough as-is :-)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1953>
2022-03-04 14:14:37 +00:00
Florian Müllner
f45ccc9143 signalTracker: Provide monkey-patching for (dis)connectObject()
The module exports a `addObjectSignalMethods()` method that extends
the provided prototype with `connectObject()` and `disconnectObject()`
methods.

In its simplest form, `connectObject()` looks like the regular
`connect()` method, except for an additional parameter:

```js
    this._button.connectObject('clicked',
        () => this._onButtonClicked(), this);
```

The additional object can be used to disconnect all handlers on the
instance that were connected with that object, similar to
`g_signal_handlers_disconnect_by_data()` (which cannot be used
from introspection).

For objects that are subclasses of Clutter.Actor, that will happen
automatically when the actor is destroyed, similar to
`g_signal_connect_object()`.

Finally, `connectObject()` allows to conveniently connect multiple
signals at once, similar to `g_object_connect()`:

```js
    this._toggleButton.connect(
        'clicked', () => this._onClicked(),
        'notify::checked', () => this._onChecked(), this);
```

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1953>
2022-03-04 14:14:37 +00:00
Sam Hewitt
96df498450 theme: Fixes for oversights in :rtl
- fix padding issue uncovered in #5123
  - fix RTL padding and margin quirks in popovers
  - fix incorrect padding in RTL in message list notifications

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2212>
2022-03-04 13:10:38 +00:00
Florian Müllner
919039e266 appDisplay: Create default folders on start
The default folders used to be created by gnome-software, as that was
where folder management used to be implemented. Since then, folder
management via drag and drop was implemented in the shell, and the
gnome-software code was removed.

The only bit that still involves gnome-software are the default folders
that are created on first run. Given that everything else has moved to
the shell, it makes sense to take over that part as well.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4948

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2110>
2022-03-04 13:02:13 +00:00
Carlos Garnacho
a595fc6d47 st: Move StWidget away from clutter_event_get_source()
Ask the stage about the device actor instead for hover tracking.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2216>
2022-03-04 12:27:34 +00:00
Carlos Garnacho
6064a3e020 st: Move StEntry away from clutter_event_get_source()
Ask the stage about the device actor instead. Since leaving the
StEntry also means leaving the contained ClutterText, the checks
on LEAVE can be just removed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2216>
2022-03-04 12:27:34 +00:00
Carlos Garnacho
7b7e5ac0de st: Move StButton away from clutter_event_get_source()
Ask the stage about the device actor instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2216>
2022-03-04 12:27:34 +00:00
Carlos Garnacho
6d895bf8a9 searchController: Avoid event.set_source() API
It does not make sense that the target actor is both destinatary
and content of the events being sent, so this API call is going away.

Since the event can be sent entirely unmodified (more so, it will
become immutable/readonly in the future), avoid creating a copy
since it does not matter sending one or other struct.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2216>
2022-03-04 12:27:34 +00:00
Carlos Garnacho
dc0f286fe9 searchController: Query stage for target actor instead of event.get_source()
Events are going to stop containing the destinatary, so stop using this
API. Querying the stage is equivalent and ensured to be up-to-date.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2216>
2022-03-04 12:27:34 +00:00
Carlos Garnacho
17730fe5c4 popupMenu: Query stage for target actor instead of event.get_source()
Events are going to stop containing the destinatary, so stop using this
API. Querying the stage is equivalent and ensured to be up-to-date.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2216>
2022-03-04 12:27:34 +00:00
Carlos Garnacho
678e34d371 keyboard: Query stage for target actor instead of event.get_source()
Events are going to stop containing the destinatary, so stop using this
API. Querying the stage is equivalent and ensured to be up-to-date.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2216>
2022-03-04 12:27:34 +00:00
Carlos Garnacho
4a8b8e6dd5 grabHelper: Query stage for target actor instead of event.get_source()
Events are going to stop containing the destinatary, so stop using this
API. Querying the stage is equivalent and ensured to be up-to-date.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2216>
2022-03-04 12:27:34 +00:00
Florian Müllner
4735193456 dash: Fix drag placeholder position in RTL
The position corresponds to a child index, which means it must
be mirrored when starting to count from the right.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4574

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2219>
2022-03-03 20:19:19 +00:00
Sam Hewitt
dc075bddae theme: Fixes to regressions in app grid
- fixes dash radii and spacing
- fixes running dot indicator margins
- fixes loss of mouse interaction below dash
- fixes launcher icon size issues
- fixes search padding & margin problems on low-resolution displays
- fixes with inconsistent sizing in app folders
- fixes app switcher hover state

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2185>
2022-03-03 15:35:18 +00:00
Sam Hewitt
6c067056c7 theme: Fixes to regressions in app grid
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2185>
2022-03-03 15:35:18 +00:00
Changwoo Ryu
0abb006ea3 Update Korean translation 2022-03-03 12:45:22 +00:00
Goran Vidović
bf30f78be4 Update Croatian translation 2022-03-02 00:52:48 +00:00
Goran Vidović
362d304b45 Update Croatian translation 2022-03-02 00:52:07 +00:00
Alan Mortensen
3874e2ff73 Updated Danish translation 2022-02-28 18:46:32 +01:00
Quentin PAGÈS
a7637ce554 Update Occitan translation 2022-02-27 12:44:37 +00:00
Florian Müllner
cff09617f3 lookingGlass: Take separate grab for object inspector
The object inspector is not a child of the main looking glass dialog,
so it no longer receives pointer/touch events with the new grab API.

Fix this by pushing/popping a separate grab.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5150

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2218>
2022-02-26 18:15:28 +01:00
Jonas Dreßler
eeabdd150c status/bluetooth: Clear list of connected signals on adapter changes
With the porting of gnome-bluetooth to the new GListModel API the
behavior regarding removing adapters changed: It now no longer
guarantees to emit "device-removed" signals for the paired devices when
the adapter gets removed.

This means we need to do that ourselves now, so clear the list of
connected signals when the default adapter changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2214>
2022-02-26 15:53:19 +00:00
Jonas Dreßler
94d9264d96 Revert "status/bluetooth: Bail out and hide UI when there's no adapter"
Turns out this broke showing the bluetooth menu entry for adapters which
rely on the had-devices-setup property being set while turned off. These
adapters are completely removed from the system by the firmware after
powering them off, so in that case there is no default adapter anymore,
although we still want to show the menu.

This reverts commit aaf47167b5.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2214>
2022-02-26 15:53:19 +00:00
Dušan Kazik
a97ca02cf9 Update Slovak translation 2022-02-25 07:41:58 +00:00
Daniel Mustieles
e4ace6e8b0 Updated Spanish translation 2022-02-24 12:53:07 +01:00
Jonas Dreßler
bb1ec88dfa overview: Don't expect time argument from drag-end signal
We actually don't get a time from the xdndHandler when it emits
drag-end, so we fail right now when calling
workspaceManager.get_workspace_by_index(time).

Fix it by getting the time ourselves instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2211>
2022-02-23 17:58:36 +00:00
Florian Müllner
5d1b9a429e workspaceAnimation: Fix warning on restacking
Only workspace groups that are associated with a workspace have a
background. As a result, when restacking window previews we end up
passing `undefined` to clutter_actor_set_child_above_sibling()
instead of null, triggering a warning.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2209>
2022-02-23 12:29:36 +00:00
Florian Müllner
2b45a01517 cleanup: Use new indentation style for object literals
We have made good progress on object literals as well, although there
are still a lot that use the old style, given how ubiquitous object
literals are.

But the needed reindentation isn't overly intrusive, as changes are
limited to the object literals themselves (i.e. they don't affect
surrounding code).

And given that object literals account for quite a bit of the remaining
differences between regular and legacy rules, doing the transition now
is still worthwhile.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2200>
2022-02-23 12:23:52 +00:00
Florian Müllner
ac9fbe92e5 cleanup: Use new indentation style for arrays
We've made some progress on transitioning to the modern indentation
style, and for arrays the legacy style is now rare enough to make
a bulk transition feasible.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2200>
2022-02-23 12:23:52 +00:00
Florian Müllner
696965c9f7 cleanup: Stop using string concatenation
It's unfortunate that we cannot fully embrace template strings, but
we aren't limited to "legacy" formatting either; replace the last
remaining places where we still use string concatenation to reduce
the difference between regular and legacy style a bit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2200>
2022-02-23 12:23:52 +00:00
Jonas Dreßler
3d3ed850fe status/network: Show disabled icon when bluetooth cellular is disabled
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2186

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2198>
2022-02-23 00:15:06 +00:00
Jonas Dreßler
2898b4d29c status/network: Show vpn-disabled icon when vpn is disabled
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2186

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2198>
2022-02-23 00:15:05 +00:00
Jonas Dreßler
ca4f6e0123 status/network: Show cellular-disabled icon when cellular is disabled
We also have this icon, so let's use it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2186

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2198>
2022-02-23 00:15:05 +00:00
Jonas Dreßler
8a7f935969 status/bluetooth: Show bluetooth-disabled icon when disabled
We have an icon for this, so let's actually use it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2186

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2198>
2022-02-23 00:15:05 +00:00
Jonas Dreßler
24143eae0d status/network: Show wireless-disabled icon when wifi is disabled
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2186

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2198>
2022-02-23 00:15:05 +00:00
Sam Hewitt
6b60a189fd theme: Minor fixes from the 42 beta
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2206>
2022-02-22 18:39:41 +00:00
Florian Müllner
774f133ab9 build: Bump some dependency versions
Mutter and gnome-shell are released in lock-step, but I forgot to
bump the requirement accordingly.

Likewise the gsettings-desktop-schemas dependency is outdated, there
are a couple of keys we depend on that were added this cycle.

And while building should still be possible with the old gjs version,
we do require a newer version at runtime, so reflect that as well.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2183>
2022-02-22 13:55:59 +00:00
Florian Müllner
574594ec22 st/theme-node: Add missing precondition checks
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4851

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2207>
2022-02-22 12:43:06 +01:00
Danial Behzadi
b93c8d850a Update Persian translation 2022-02-21 18:47:36 +00:00