Skip to content

Commit 31f8637

Browse files
leolost2605lenemter
authored andcommitted
GestureTarget: Require actor only for RootTarget
1 parent 5a55b3a commit 31f8637

File tree

9 files changed

+10
-15
lines changed

9 files changed

+10
-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/PanelWindow.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
public class Gala.PanelWindow : ShellWindow, RootTarget {
99
private static HashTable<Meta.Window, Meta.Strut?> window_struts = new HashTable<Meta.Window, Meta.Strut?> (null, null);
1010

11+
public Clutter.Actor? actor { get { return (Clutter.Actor) window.get_compositor_private (); } }
1112
public WindowManager wm { get; construct; }
1213
public Pantheon.Desktop.Anchor anchor { get; construct set; }
1314

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

1211
private Meta.WindowActor window_actor;

src/Widgets/MultitaskingView/MultitaskingView.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class Gala.MultitaskingView : ActorTarget, RootTarget, ActivatableCompone
2626
private GestureController workspaces_gesture_controller;
2727
private GestureController multitasking_gesture_controller;
2828

29+
public Clutter.Actor? actor { get { return this; } }
2930
public WindowManagerGala wm { get; construct; }
3031

3132
private Meta.Display display;

src/Widgets/MultitaskingView/WindowClone.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class Gala.WindowClone : ActorTarget, RootTarget {
2727
*/
2828
public signal void request_reposition ();
2929

30+
public Clutter.Actor? actor { get { return this; } }
3031
public WindowManager wm { get; construct; }
3132
public Meta.Window window { get; construct; }
3233

src/Widgets/WindowOverview.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public class Gala.WindowOverview : ActorTarget, RootTarget, ActivatableComponent
1010
private const int TOP_GAP = 30;
1111
private const int BOTTOM_GAP = 100;
1212

13+
public Clutter.Actor? actor { get { return this; } }
1314
public WindowManager wm { get; construct; }
1415

1516
private GestureController gesture_controller; // Currently not used for actual touchpad gestures but only as controller

0 commit comments

Comments
 (0)