diff options
author | lilac | 2022-11-12 04:44:39 +0800 |
---|---|---|
committer | lilac | 2022-11-12 04:44:39 +0800 |
commit | 8fe336f99c610c54f055285bd60a33907c91dd06 (patch) | |
tree | 4f13736a318a21acd90b6e91d171b4b4936a6d80 /009-properly-handle-i3wm.patch | |
parent | cff16b439bf2a1cc438838a73e203af0339b2484 (diff) | |
download | aur-8fe336f99c610c54f055285bd60a33907c91dd06.tar.gz |
[lilac] updated to 97514-1
Diffstat (limited to '009-properly-handle-i3wm.patch')
-rw-r--r-- | 009-properly-handle-i3wm.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/009-properly-handle-i3wm.patch b/009-properly-handle-i3wm.patch new file mode 100644 index 000000000000..b8ade3678d79 --- /dev/null +++ b/009-properly-handle-i3wm.patch @@ -0,0 +1,77 @@ +From 9284f5a37708ddf0108898a48eca5db0e5316a43 Mon Sep 17 00:00:00 2001 +From: Christian Hesse <mail@eworm.de> +Date: Mon, 17 Oct 2022 16:35:53 +0200 +Subject: [PATCH] properly handle i3wm + +--- + .../VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp | 4 ++-- + .../Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp | 3 +++ + .../Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h | 3 ++- + src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp | 4 ++++ + 4 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp +index 9c5faa42..5439e2a7 100644 +--- a/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp ++++ b/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp +@@ -443,8 +443,8 @@ const QRect UIDesktopWidgetWatchdog::availableGeometry(int iHostScreenIndex /* = + /* 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 : +- QApplication::desktop()->screenGeometry(iHostScreenIndex); ++ return availableGeometry.isValid() && NativeWindowSubsystem::X11WindowManagerType() != X11WMType_i3 ? ++ availableGeometry : QApplication::desktop()->screenGeometry(iHostScreenIndex); + # endif /* !VBOX_GUI_WITH_CUSTOMIZATIONS1 */ + # else /* !VBOX_WS_X11 */ + /* Redirect call to desktop-widget: */ +diff --git a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp +index 53927559..ea648da7 100644 +--- a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp ++++ b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp +@@ -117,6 +117,9 @@ X11WMType NativeWindowSubsystem::X11WindowManagerType() + 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 --git a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h +index bad78665..f2a0b462 100644 +--- a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h ++++ b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h +@@ -49,6 +49,7 @@ enum X11WMType + X11WMType_Metacity, + X11WMType_Mutter, + X11WMType_Xfwm4, ++ X11WMType_i3, + }; + + /** X11: Screen-saver inhibit methods. */ +@@ -95,7 +96,7 @@ + /** X11: Determines and returns whether the compositing manager is running. */ + bool X11IsCompositingManagerRunning(); + /** X11: Determines and returns current Window Manager type. */ +- X11WMType X11WindowManagerType(); ++ SHARED_LIBRARY_STUFF X11WMType X11WindowManagerType(); + + #if 0 // unused for now? + /** X11: Inits the screen saver save/restore mechanism. */ +diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp +index 815db408..8cddb431 100644 +--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp ++++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp +@@ -888,6 +888,10 @@ void UIMiniToolBar::prepare() + /* Enable translucency through Qt API if supported: */ + if (uiCommon().isCompositingManagerRunning()) + setAttribute(Qt::WA_TranslucentBackground); ++ ++ if (NativeWindowSubsystem::X11WindowManagerType() == X11WMType_i3) ++ setWindowFlags(Qt::FramelessWindowHint); ++ + #endif /* VBOX_WS_X11 */ + + /* Make sure we have no focus: */ |