virtualbox-7.1.4
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
From 04cf1e3a266fcc4e65d01b8b492d2c5fbe1bf13d Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Wed, 11 Sep 2024 21:10:09 +0200
|
||||
Subject: [PATCH 1/1] properly handle i3wm
|
||||
|
||||
---
|
||||
.../VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp | 3 ++-
|
||||
.../Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.cpp | 3 +++
|
||||
src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.h | 3 ++-
|
||||
src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp | 3 +++
|
||||
4 files changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp b/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
|
||||
index 01aa93c6..06a78ac1 100644
|
||||
index e9b78fde..17a1dfc0 100644
|
||||
--- a/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
|
||||
+++ b/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
|
||||
@@ -391,7 +391,8 @@ QRect UIDesktopWidgetWatchdog::availableGeometry(QScreen *pScreen) const
|
||||
@@ -380,7 +380,8 @@ QRect UIDesktopWidgetWatchdog::availableGeometry(QScreen *pScreen) const
|
||||
/* Get cached available-geometry: */
|
||||
const QRect availableGeometry = m_availableGeometryData.value(screenToIndex(pScreen));
|
||||
/* Return cached available-geometry if it's valid or screen-geometry otherwise: */
|
||||
@@ -10,13 +22,13 @@ index 01aa93c6..06a78ac1 100644
|
||||
+ return availableGeometry.isValid() && NativeWindowSubsystem::X11WindowManagerType() != X11WMType_i3 ?
|
||||
+ availableGeometry : screenGeometry(pScreen);
|
||||
# endif /* !VBOX_GUI_WITH_CUSTOMIZATIONS1 */
|
||||
#else /* !VBOX_WS_X11 */
|
||||
#else /* !VBOX_WS_NIX */
|
||||
/* Just return screen available-geometry: */
|
||||
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 e8b8db43..8c8ebdca 100644
|
||||
--- a/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp
|
||||
+++ b/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp
|
||||
@@ -115,6 +115,9 @@ X11WMType NativeWindowSubsystem::X11WindowManagerType()
|
||||
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.cpp b/src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.cpp
|
||||
index ab520e51..f168050d 100644
|
||||
--- a/src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.cpp
|
||||
+++ b/src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.cpp
|
||||
@@ -139,6 +139,9 @@ X11WMType NativeWindowSubsystem::X11WindowManagerType()
|
||||
else
|
||||
if (QString((const char*)pcData).contains("Xfwm4", Qt::CaseInsensitive))
|
||||
wmType = X11WMType_Xfwm4;
|
||||
@@ -26,11 +38,11 @@ index e8b8db43..8c8ebdca 100644
|
||||
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 12b4a172..dae12f25 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
|
||||
diff --git a/src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.h b/src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.h
|
||||
index e1dfc07f..b1a789e7 100644
|
||||
--- a/src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.h
|
||||
+++ b/src/VBox/Frontends/VirtualBox/src/platform/nix/VBoxUtils-nix.h
|
||||
@@ -51,6 +51,7 @@ enum X11WMType
|
||||
X11WMType_Metacity,
|
||||
X11WMType_Mutter,
|
||||
X11WMType_Xfwm4,
|
||||
@@ -38,27 +50,26 @@ index 12b4a172..dae12f25 100644
|
||||
};
|
||||
|
||||
/** X11: Screen-saver inhibit methods. */
|
||||
@@ -95,7 +96,7 @@ namespace NativeWindowSubsystem
|
||||
/** X11: Determines and returns whether the compositing manager is running. */
|
||||
bool X11IsCompositingManagerRunning();
|
||||
@@ -104,7 +105,7 @@ namespace NativeWindowSubsystem
|
||||
/** Wrapper for window manager type functions. */
|
||||
X11WMType windowManagerType(bool fIsXServerAvailable);
|
||||
/** X11: Determines and returns current Window Manager type. */
|
||||
- X11WMType X11WindowManagerType();
|
||||
+ SHARED_LIBRARY_STUFF X11WMType X11WindowManagerType();
|
||||
/** Wayland: Determines and returns current Window Manager type. */
|
||||
X11WMType WaylandWindowManagerType();
|
||||
|
||||
/** X11: Returns true if XLib extension with name @p extensionName is avaible, false otherwise. */
|
||||
bool X11CheckExtension(const char *extensionName);
|
||||
diff --git a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
|
||||
index 8ac46c99..5b749947 100644
|
||||
index 272729a4..6346fb63 100644
|
||||
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
|
||||
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
|
||||
@@ -1076,6 +1076,10 @@ void UIMiniToolBar::prepare()
|
||||
@@ -1076,6 +1076,9 @@ 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 */
|
||||
+ setWindowFlags(Qt::FramelessWindowHint);
|
||||
#endif /* VBOX_WS_NIX */
|
||||
|
||||
/* Make sure we have no focus: */
|
||||
|
||||
Reference in New Issue
Block a user