diff --git a/data/gala.metainfo.xml.in b/data/gala.metainfo.xml.in
index f950bc072..146fe73a3 100644
--- a/data/gala.metainfo.xml.in
+++ b/data/gala.metainfo.xml.in
@@ -55,6 +55,7 @@
Don’t show app icons in app window spread
PiP dragging doesn't start until after mouse is released
Gala crashes when receiving a notification while switching workspaces
+ Swiping in the multitasking view can close applications
diff --git a/lib/DragDropAction.vala b/lib/DragDropAction.vala
index e5f5e70f8..b5fca79fd 100644
--- a/lib/DragDropAction.vala
+++ b/lib/DragDropAction.vala
@@ -74,7 +74,7 @@ namespace Gala {
*
* @param button The button which was pressed
*/
- public signal void actor_clicked (uint32 button);
+ public signal void actor_clicked (uint32 button, Clutter.InputDeviceType device_type);
/**
* The type of the action
@@ -290,7 +290,10 @@ namespace Gala {
// release has happened within bounds of actor
if (clicked && x < ex && x + actor.width > ex && y < ey && y + actor.height > ey) {
- actor_clicked (event.get_type () == BUTTON_RELEASE ? event.get_button () : Clutter.Button.PRIMARY);
+ actor_clicked (
+ event.get_type () == BUTTON_RELEASE ? event.get_button () : Clutter.Button.PRIMARY,
+ event.get_source_device ().get_device_type ()
+ );
}
if (clicked) {
diff --git a/src/Widgets/MultitaskingView/WindowClone.vala b/src/Widgets/MultitaskingView/WindowClone.vala
index 2a478a88e..1a875a223 100644
--- a/src/Widgets/MultitaskingView/WindowClone.vala
+++ b/src/Widgets/MultitaskingView/WindowClone.vala
@@ -413,14 +413,11 @@ public class Gala.WindowClone : ActorTarget {
destroy ();
}
- private void actor_clicked (uint32 button) {
- switch (button) {
- case Clutter.Button.PRIMARY:
- selected ();
- break;
- case Clutter.Button.MIDDLE:
- close_window (display.get_current_time ());
- break;
+ private void actor_clicked (uint32 button, Clutter.InputDeviceType device_type = POINTER_DEVICE) {
+ if (button == Clutter.Button.PRIMARY) {
+ selected ();
+ } else if (button == Clutter.Button.MIDDLE && device_type == POINTER_DEVICE) {
+ close_window (display.get_current_time ());
}
}