View difference between Paste ID: FHqk22Hs and 8Q63FxEw
SHOW: | | - or go back to the newest paste.
1
diff --git a/src/tabwindow/tabbar.cpp b/src/tabwindow/tabbar.cpp
2
index eb062bf..7403fed 100644
3
--- a/src/tabwindow/tabbar.cpp
4
+++ b/src/tabwindow/tabbar.cpp
5
@@ -463,7 +463,18 @@ void TabBar::mouseReleaseEvent(QMouseEvent *event)
6
             w->setCurrentIndex(pinnedTabs - 1);
7
         }
8
     }
9
+
10
+    if (isMovable() && event->button() == Qt::MidButton)
11
+    {
12
+        // Workaround for mouseMiddleClick() not being emitted (and tabs not being closed).
13
+        setMovable(false);
14
         KTabBar::mouseReleaseEvent(event);
15
+        setMovable(true);
16
+    }
17
+    else
18
+    {
19
+        KTabBar::mouseReleaseEvent(event);
20
+    }
21
 }