Skip to content

Commit cbcf70b

Browse files
authored
PiP: Fix drag and drop (#2184)
1 parent 9038f7b commit cbcf70b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

data/gala.metainfo.xml.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
<issue url="https://github.com/elementary/gala/issues/2131">Unthemed cursor style and glitchy menus on some applications</issue>
4747
<issue url="https://github.com/elementary/gala/issues/2159">Crash when moving windows between workspaces and using gestures to switch</issue>
4848
<issue url="https://github.com/elementary/gala/issues/2169">Text UI based Scaling: Tiny Titlebars in XWayland Apps</issue>
49+
<issue url="https://github.com/elementary/gala/issues/2171">PiP dragging doesn't start until after mouse is released</issue>
4950
</issues>
5051
</release>
5152

plugins/pip/PopupWindow.vala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
6868

6969
clone = new Clutter.Clone (window_actor);
7070

71-
move_action = new DragDropAction (DragDropActionType.SOURCE, "pip");
72-
move_action.drag_begin.connect (on_move_begin);
73-
move_action.drag_canceled.connect (on_move_end);
74-
move_action.actor_clicked.connect (activate);
75-
7671
clone_container = new Clutter.Actor () {
7772
scale_x = 0.35f,
7873
scale_y = 0.35f
@@ -84,7 +79,12 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
8479
};
8580
container.add_child (clone_container);
8681
container.add_effect (new ShadowEffect ("window"));
87-
container.add_action (move_action);
82+
83+
move_action = new DragDropAction (DragDropActionType.SOURCE, "pip");
84+
move_action.drag_begin.connect (on_move_begin);
85+
move_action.drag_canceled.connect (on_move_end);
86+
move_action.actor_clicked.connect (activate);
87+
add_action (move_action);
8888

8989
update_size ();
9090

0 commit comments

Comments
 (0)