summarylogtreecommitdiffstats
path: root/009-i3wm.patch
blob: eca4341fff74365e5747f6c000e711fd130bbba1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
diff -Naur VirtualBox/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp VirtualBox/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
--- VirtualBox/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp	2017-03-08 18:19:53.000000000 +0100
+++ VirtualBox/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp	2017-03-10 10:25:58.876132400 +0100
@@ -282,7 +282,7 @@
     /* Get cached available-geometry: */
     const QRect availableGeometry = m_availableGeometryData.value(iHostScreenIndex);
     /* Return cached available-geometry if it's valid or screen-geometry otherwise: */
-    return availableGeometry.isValid() ? availableGeometry :
+    return availableGeometry.isValid() && X11WMType() != X11WMType_i3 ? availableGeometry :
            QApplication::desktop()->screenGeometry(iHostScreenIndex);
 #else /* !VBOX_WS_X11 */
     /* Redirect call to desktop-widget: */
diff -Naur VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp
--- VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp	2017-03-08 18:19:54.000000000 +0100
+++ VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp	2017-03-10 10:23:15.729460200 +0100
@@ -93,6 +93,9 @@
                 else
                 if (QString((const char*)pcData).contains("Xfwm4", Qt::CaseInsensitive))
                     wmType = X11WMType_Xfwm4;
+                else
+                if (QString((const char*)pcData).contains("i3", Qt::CaseInsensitive))
+                    wmType = X11WMType_i3;
                 if (pcData)
                     XFree(pcData);
             }
diff -Naur VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h
--- VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h	2017-03-08 18:19:54.000000000 +0100
+++ VirtualBox/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h	2017-03-10 10:22:11.876123200 +0100
@@ -27,6 +27,7 @@
     X11WMType_KWin,
     X11WMType_Mutter,
     X11WMType_Xfwm4,
+    X11WMType_i3,
 };
 
 /** X11: Determines and returns whether the compositing manager is running. */
diff -Naur VirtualBox/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp VirtualBox/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
--- VirtualBox/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp	2017-03-08 18:19:58.000000000 +0100
+++ VirtualBox/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp	2017-03-10 10:29:12.549409400 +0100
@@ -727,6 +727,10 @@
     /* Enable translucency through Qt API if supported: */
     if (vboxGlobal().isCompositingManagerRunning())
         setAttribute(Qt::WA_TranslucentBackground);
+
+    if (X11WMType() == X11WMType_i3)
+         setWindowFlags(Qt::FramelessWindowHint);
+
 #endif /* VBOX_WS_X11 */
 
     /* Make sure we have no focus: */