From e727c255bcf8b34d7877065ae88983e9b421e108 Mon Sep 17 00:00:00 2001 From: jonjenssen Date: Fri, 19 May 2023 14:11:00 +0200 Subject: [PATCH] Make docking floating windows work on WSL/wayland, too --- src/FloatingDockContainer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/FloatingDockContainer.cpp b/src/FloatingDockContainer.cpp index 0a2cdc7..185fd77 100644 --- a/src/FloatingDockContainer.cpp +++ b/src/FloatingDockContainer.cpp @@ -683,6 +683,11 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager *DockManager) : { native_window = false; } + QString WaylandDisplay = qgetenv("WAYLAND_DISPLAY").toLower(); + if (WaylandDisplay != "") + { + native_window = false; + } } if (native_window) @@ -694,7 +699,7 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager *DockManager) : { d->TitleBar = new CFloatingWidgetTitleBar(this); setTitleBarWidget(d->TitleBar); - setWindowFlags(Qt::Window | Qt::WindowMinMaxButtonsHint | Qt::FramelessWindowHint); + setWindowFlags(Qt::Window | Qt::WindowMinMaxButtonsHint | Qt::BypassWindowManagerHint); d->TitleBar->enableCloseButton(isClosable()); connect(d->TitleBar, SIGNAL(closeRequested()), SLOT(close())); connect(d->TitleBar, &CFloatingWidgetTitleBar::maximizeRequested,