Skip to content

Commit b690efd

Browse files
committed
MultitaskingView: Use GestureController and GestureTarget
1 parent 16e12a7 commit b690efd

File tree

9 files changed

+224
-541
lines changed

9 files changed

+224
-541
lines changed

src/Widgets/MonitorClone.vala

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@
1111
* as the WindowGroup is hidden while the view is active. Only used when
1212
* workspaces-only-on-primary is set to true.
1313
*/
14-
public class Gala.MonitorClone : Clutter.Actor {
14+
public class Gala.MonitorClone : ActorTarget {
1515
public signal void window_selected (Meta.Window window);
1616

1717
public Meta.Display display { get; construct; }
1818
public int monitor { get; construct; }
19-
public GestureTracker gesture_tracker { get; construct; }
2019

2120
private WindowCloneContainer window_container;
2221
private BackgroundManager background;
2322

24-
public MonitorClone (Meta.Display display, int monitor, GestureTracker gesture_tracker) {
25-
Object (display: display, monitor: monitor, gesture_tracker: gesture_tracker);
23+
public MonitorClone (Meta.Display display, int monitor) {
24+
Object (display: display, monitor: monitor);
2625
}
2726

2827
construct {
@@ -32,7 +31,7 @@ public class Gala.MonitorClone : Clutter.Actor {
3231

3332
var scale = display.get_monitor_scale (monitor);
3433

35-
window_container = new WindowCloneContainer (display, gesture_tracker, scale);
34+
window_container = new WindowCloneContainer (display, scale);
3635
window_container.window_selected.connect ((w) => { window_selected (w); });
3736

3837
display.window_entered_monitor.connect (window_entered);
@@ -77,22 +76,6 @@ public class Gala.MonitorClone : Clutter.Actor {
7776
window_container.monitor_scale = scale;
7877
}
7978

80-
/**
81-
* Animate the windows from their old location to a tiled layout
82-
*/
83-
public void open (bool with_gesture = false, bool is_cancel_animation = false) {
84-
window_container.restack_windows ();
85-
window_container.open (null, with_gesture, is_cancel_animation);
86-
}
87-
88-
/**
89-
* Animate the windows back to their old location
90-
*/
91-
public void close (bool with_gesture = false, bool is_cancel_animation = false) {
92-
window_container.restack_windows ();
93-
window_container.close (with_gesture);
94-
}
95-
9679
private void window_left (int window_monitor, Meta.Window window) {
9780
if (window_monitor != monitor)
9881
return;

0 commit comments

Comments
 (0)