Skip to content

Commit 3647da5

Browse files
committed
GestureTarget: Require actor only for RootTarget
1 parent 49ca6f3 commit 3647da5

File tree

8 files changed

+12
-15
lines changed

8 files changed

+12
-15
lines changed

lib/Gestures/ActorTarget.vala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
* If a new child (or target via {@link add_target}) is added, its progress will be synced.
1212
*/
1313
public class Gala.ActorTarget : Clutter.Actor, GestureTarget {
14-
public Clutter.Actor? actor {
15-
get {
16-
return this;
17-
}
18-
}
19-
2014
public bool animating { get { return ongoing_animations > 0; } }
2115

2216
private double[] current_progress;

lib/Gestures/GestureTarget.vala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,5 @@ public interface Gala.GestureTarget : Object {
1313
END
1414
}
1515

16-
/**
17-
* The actor manipulated by the gesture. The associated frame clock
18-
* will be used for animation timelines.
19-
*/
20-
public abstract Clutter.Actor? actor { get; }
21-
2216
public virtual void propagate (UpdateType update_type, GestureAction action, double progress) { }
2317
}

lib/Gestures/RootTarget.vala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
*/
77

88
public interface Gala.RootTarget : Object, GestureTarget {
9+
/**
10+
* The actor manipulated by the gesture. The associated frame clock
11+
* will be used for animation timelines.
12+
*/
13+
public abstract Clutter.Actor? actor { get; }
14+
915
public void add_gesture_controller (GestureController controller) requires (controller.target == null) {
1016
controller.attached (this);
1117
weak_ref (controller.detached);

src/ShellClients/ShellClientsManager.vala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ public class Gala.ShellClientsManager : Object, GestureTarget {
2020
return instance;
2121
}
2222

23-
public Clutter.Actor? actor { get { return wm.stage; } }
24-
2523
public WindowManager wm { get; construct; }
2624

2725
private NotificationsClient notifications_client;

src/ShellClients/ShellWindow.vala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77

88
public class Gala.ShellWindow : PositionedWindow, GestureTarget {
9-
public Clutter.Actor? actor { get { return window_actor; } }
109
public bool restore_previous_x11_region { private get; set; default = false; }
1110
public bool visible_in_multitasking_view { get; set; default = false; }
1211

src/Widgets/MultitaskingView/MultitaskingView.vala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public class Gala.MultitaskingView : ActorTarget, RootTarget, ActivatableCompone
2828

2929
public WindowManagerGala wm { get; construct; }
3030

31+
public Clutter.Actor? actor { get { return this; } }
32+
3133
private Meta.Display display;
3234
private ModalProxy modal_proxy;
3335
private bool opened = false;

src/Widgets/MultitaskingView/WindowClone.vala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public class Gala.WindowClone : ActorTarget, RootTarget {
3030
public WindowManager wm { get; construct; }
3131
public Meta.Window window { get; construct; }
3232

33+
public Clutter.Actor? actor { get { return this; } }
34+
3335
/**
3436
* The currently assigned slot of the window in the tiling layout. May be null.
3537
*/

src/Widgets/WindowOverview.vala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ public class Gala.WindowOverview : ActorTarget, RootTarget, ActivatableComponent
1212

1313
public WindowManager wm { get; construct; }
1414

15+
public Clutter.Actor? actor { get { return this; } }
16+
1517
private GestureController gesture_controller; // Currently not used for actual touchpad gestures but only as controller
1618

1719
private ModalProxy modal_proxy;

0 commit comments

Comments
 (0)