overviewControls: Add "gesture-in-progress" property on the state adjustment

This will be set whenever an event controller is manipulating the adjustment.
It should enter the same transitional state it does for animations. This
will be used by the overview gesture.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1643>
This commit is contained in:
Carlos Garnacho 2021-02-12 00:20:31 +01:00
parent f69727464c
commit ddb8782179

View File

@ -195,8 +195,14 @@ class ControlsManagerLayout extends Clutter.BoxLayout {
} }
}); });
var OverviewAdjustment = GObject.registerClass( var OverviewAdjustment = GObject.registerClass({
class OverviewAdjustment extends St.Adjustment { Properties: {
'gesture-in-progress': GObject.ParamSpec.boolean(
'gesture-in-progress', 'Gesture in progress', 'Gesture in progress',
GObject.ParamFlags.READWRITE,
false),
},
}, class OverviewAdjustment extends St.Adjustment {
_init(actor) { _init(actor) {
super._init({ super._init({
actor, actor,
@ -231,7 +237,7 @@ class OverviewAdjustment extends St.Adjustment {
: 1; : 1;
return { return {
transitioning: transition !== null, transitioning: transition !== null || this.gestureInProgress,
currentState, currentState,
initialState, initialState,
finalState, finalState,