Skip to content

Commit eb349a0

Browse files
committed
Add API
1 parent ac931a3 commit eb349a0

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

lib/WindowManager.vala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,5 +204,13 @@ namespace Gala {
204204
* @return true if the action should be prohibited, false otherwise
205205
*/
206206
public abstract bool filter_action (GestureAction action);
207+
208+
/**
209+
* Adds target to the multitasking view and window overview so the target responds to the multitasking view
210+
* close/open gesture and shortcuts.
211+
*
212+
* @param target Target to add to multitasking view and window overview
213+
*/
214+
public abstract void add_multitasking_view_target (GestureTarget target);
207215
}
208216
}

plugins/pip/PopupWindow.vala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,7 @@ public class Gala.Plugins.PIP.PopupWindow : ActorTarget, RootTarget {
130130
unowned var workspace_manager = display.get_workspace_manager ();
131131
workspace_manager.active_workspace_changed.connect (update_window_focus);
132132

133-
var gesture_controller = new GestureController (MULTITASKING_VIEW, wm);
134-
gesture_controller.enable_touchpad ();
135-
add_gesture_controller (gesture_controller);
136-
add_target (new PropertyTarget (MULTITASKING_VIEW, this, "opacity", typeof (uint), 255u, 0u));
133+
wm.add_multitasking_view_target (new PropertyTarget (MULTITASKING_VIEW, this, "opacity", typeof (uint), 255u, 0u));
137134
}
138135

139136
public override void start_progress (GestureAction action) {

src/WindowManager.vala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,14 @@ namespace Gala {
16881688
return modal_stack.peek_head ().filter_action (action);
16891689
}
16901690

1691+
public void add_multitasking_view_target (GestureTarget target) {
1692+
multitasking_view.add_target (target);
1693+
1694+
if (window_overview is WindowOverview) {
1695+
((WindowOverview) window_overview).add_target (target);
1696+
}
1697+
}
1698+
16911699
public override void confirm_display_change () {
16921700
unowned var monitor_manager = get_display ().get_context ().get_backend ().get_monitor_manager ();
16931701
var timeout = monitor_manager.get_display_configuration_timeout ();

0 commit comments

Comments
 (0)