Clocks has exactly the same issue as Weather: Its integration currently
relies on accessing its settings directly, which isn't possible when
the app is sandboxed.
Fix this the same way we did for Weather, by adding our own setting
and syncing it with the app via a custom D-Bus interface.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1158
We add our own "New Window" menu entry if the app doesn't already
provide a 'new-window' action. For this menu entry, we show the zoom out
animation on the app icon when the user clicks the entry.
To be consistent in case the app already provides its own 'new-window'
action via its AppInfo, also show the zoom out animation when this
action is activated.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/662
Whenever an app is installed, the usual routine is
to run 'gtk-update-icon-cache' after installing all
of the app's files.
The side effect of that is that the .desktop file of
the application is installed before the icon theme
is updated. By the time GAppInfoMonitor emits the
'changed' signal, the icon theme is not yet updated,
leading to StIcon use the fallback icon.
Under some circumstances (e.g. on very slow spinning
disks) the app icon is never actually loaded, and we
see the fallback icon forever.
Monitor the icon theme for changes when an app is
installed. Try as many as 6 times before giving up
on detecting an icon theme update.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/661
The texture cache, right now, only monitors for
complete theme changes. If the contents of the
icon theme change, however, the texture cache
isn't properly invalidated.
This manifests itself as a randomly reproducible
bug when installing an app; the app icon may be
the fallback forever, or as long as something else
updates the icon theme.
Watch for the GtkIconTheme:changed signal, and
evict the texture cache when the theme changes.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/661
As pointed out by designers, fading it signals that the
icon grid is not a drop target, when now it actually is.
Remove the fade effect applied to the icon grid when
dragging. Since this is the only caller of fadeIn() and
fadeHalf(), also remove these methods.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664
App icons inside folders are already animated when the folder is
opened, but moving an app icon from a folder doesn't, making the
transition abrupt.
Fortunately, it's easy to detect icons that were previously hidden
but are not anymore.
Add an animation to these icons when showing.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664
This is necessary for being able to drag application icons
to folders in different pages.
Add a drag motion handler to AllView and handle overshoots
when dragging. Only handle it when dragging from AllView.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664
After dropping an application into the folder icon, the
list of applications is updated but the folder icon itself
is not.
Introduce BaseIcon.update() and call it from FolderIcon
when redisplaying.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664
The event blocker is an actor that is added in between the
icon grid and the app folder popup in order to guarantee
that clicking outside the app folder will collapse it.
However, the next patch will require allowing dragging events
to be passed to folder icons, and the event blocker gets in
our way here, preventing drag n' drop to work properly.
Add an API to inhibit the event blocker. This API will be
used by the app folders while an item is dragged.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/664
When plugging in a device with sensors that are unsupported by
iio-sensor-proxy, the proxy may quit so fast that the name disappears
from the bus before we get to construct the SensorProxy in response
to the name-appeared handler, resulting in the following warning:
JS ERROR: TypeError: this._sensorProxy is null
_sensorProxyAppeared/this._sensorProxy<@resource:///org/gnome/shell/misc/systemActions.js:217:17
_makeProxyWrapper/</<@resource:///org/gnome/gjs/modules/overrides/Gio.js:243:21
Address this by creating the proxy unconditionally instead of monitoring
the bus name, and using the g-name-owner property to determine whether
iio-sensor-proxy is active.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1357
When transitioning to or from the overview, windows travel
a certain distance between their real desktop position and
their place in the overview window grid. The less this travel
distance is, the smoother, more polished, and less jarring
the overall transition looks. This is why it makes sense to
try reordering and repositioning windows to minimize their
travel distance. That being said, there are other factors
that impact the quality of the overview layout, such as how
much the windows get scaled and what portion of the overall
available space they take up.
The existing code tries to minimize the travel distance by
sorting the windows in each row by their horizontal position.
There are, however, two problems with this implementation.
First, it compares the coordinates of windows' left edges as
opposed to their centers, which means it yields unexpected
results when a small window is positioned next to the left
edge of a large window. Second, it completely disregards
vertical coordinates, instead assigning windows to the grid
rows using their monotonically increasing window numbers,
effectively vertically sorting them by the order they were
created in.
This commit changes both vertical and horizontal ordering
to work based on the coordinates of the geometric centers
of the windows. That is to say, windows are first assigned
to grid rows based on the vertical coordinates of their
centers, and subsequently sorted inside each row based on
the horizontal coordinates of said centers. In my testing,
this leads to a much more intuitive and visually pleasing
window placement.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/267
GDBusProxy::g-properties-changed is also emitted when the name drops from
the bus, at which point any properties will be null. That's not a valid
gsettings value, so to avoid the corresponding warning, move the g-name-owner
check accordingly.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1158
Those checks were carried over from the very first DND implementation;
if they were ever actually required at all, this is no longer the case
as we moved away from Tweener for all our animations.
The number of cases where an extension is still using Tweener, creates
draggable actors, *AND* requires the checks for proper functioning
should be indistinguishable from zero, so drop the code.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669
By now, Tweener is used exclusively to animate changes to the
StAdjustment:value property. But not for long, as now that we
implement the same transition API as Clutter.Actor, we can
re-use the existing convenience method for property transitions
for adjustment changes as well.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669
StAdjustment implements the ClutterAnimatable interface, so we can
already animate its properties with ClutterPropertyTransitions.
But as it is currently not possible to associate a transition with
an adjustment, it must be owned (and kept alive in case of GC) by
the calling code.
Change that by implementing the same (add|remove|get)_transition() API
as ClutterActor, so we can use a familiar API and even duck typing in
case of javascript.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/669
The tracking was important in an earlier iteration, but as the helper
functions now remove overwritten transitions before setting up the
new ones, we can just as well connect to the ::stopped signal directly.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/668
This is rather embarrassing - we currently confuse the transition with
the finished parameter, which means we always run the onComplete handler
no matter whether the transition was interrupted or actually completed.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/668
Commit 0f178c3b3d added a shortcirtuit to avoid running
an animation on an invisible actor. However, it introduced
a bug where the current page is not properly updated. That
leads to the wrong set of icons being animated under some
circumstances.
Update the current page even if we bail out early.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/667
Properties that aren't marked as animatable don't support *implicit*
animations, but they can still be animated with explicit transitions.
Use the newly added convenience method to cut down further on Tweener
usage.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666
While we are now using implicit animations for all animatable properties,
there are still some cases where we animate other actor properties (for
example from a custom subclass) or associated objects like effects.
Those can still be animated using Clutter animations, as long as we use
the explicit API rather than implicit animations. Again this API is
cumbersome and tricky enough to warrant a convenience wrapper.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666
Clutter animations work on GObject properties on animatables. The
last commit took care of the latter by turning all animated objects
into actor subclasses, now it's time to make all properties used
in Tweens into GObject properties.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666
We have a couple of places where we don't tween the actor, but a
custom property on the delegate object. In order to move those
to Clutter animations, we will need an animatable, so turn those
objects into widget subclasses.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666
The set_brightness() method is the most convenient way of controlling
the effect's brightness, but Clutter animations only deal with properties,
so start using the (ClutterColor) brightness property instead.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666
Currently WindowDimmer exposes a JS property that is used to control the
underlying effect. This works fine with Tweener, but not with Clutter
animations which we want to use ultimately.
As a first step towards that, expose a setDimmed() method instead of
the property and handle the animation internally, so it can be adapted
more easily.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/666
We now have everything in place to replace Tweener for all animatable
properties with implicit animations, which has the following benefits:
- they run entirely in C, while Tweener requires context switches
to JS each frame
- they are more reliable, as Tweener only detects when an animation
is overwritten with another Tween, while Clutter considers any
property change
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22
Setting up implicit animations is more verbose than using tweener, in
particular when setting up a callbacks to run on overwrite or completion.
In order to make its use more convenient, monkey-patch ClutterActor
with an ease() method that works similarly to Tweener.addTween().
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22
Being able to slow down animations is a helpful debugging tool; to not
lose it when starting to use Clutter's implicit animations, monkey-patch
the appropriate methods to support our global slow down factor.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22
As we currently use Tweener for all animations, we have a single place
for hooking up the enable-animations and slow-down-factor settings.
However that will no longer hold true when we'll start to use Clutter's
built-in animation facilities, so add a small helper function that
applies the necessary adjustments.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22
Notifications use a transition that overshoots the target value, however
we can only really do that for the position and not the opacity where
some values would end up out of the valid range.
We currently address this by proxying the actual opacity property in a
javascript property, and clamp it to the valid range in an onUpdate()
callback.
This won't be an option if we want to use Clutter animations, so instead,
use separate tweens for opacity and position.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22
Unlike Tweener, which doesn't know or care about actor state, Clutter
will skip implicit animations on actors that aren't mapped. This makes
sense of course, but it will break the page indicator animation we
do on map: When we get notified about the container being mapped, the
individual indicators (which are the actors being animated) are still
unmapped.
Resolve this by deferring the animation to a LaterFunc.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22
For animating the arrows on the screenshield, we currently use a custom
transition function that tweens the opacity from 0 to maxOpacity in the
first half of the animation, and from maxOpacity back to 0 in the second
half.
This doesn't easily translate to Clutter's own animation framework, so
replace the custom transition with two consecutive tweens which do.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22
Dash items are currently animated via the custom "childScale" and
"childOpacity" properties. However since commit efb3025d8c, those
properties actually control the scale-x/scale-y and opacity properties
of the actor itself (not the child), so cut out the intermediate
custom properties in favor of the "real" ones.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22
When expanding a submenu, we currently use a single tween to animate
both the submenu actor and the source arrow. We do this by tweening
a monkey-patched JS property on the main actor, which we then use
to update the arrow's GObject property on updates. As Clutter cannot
animate random JS properties, this trick will prevent us from using
implicit animations here.
The only reason I can think of for using a single tween is to keep
both animations in perfect lock step, but as expansion and rotation
are visually quite distinct, this shouldn't be required, so just
set up separate animations for each actor.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/22
We currently only consider a remote "app.new-window" action when running,
but not a fixed "new-window" action in the .desktop file. The latter is
clearly useful as well, in particular as open_new_window() already does,
so add it.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/665