1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-04-01 02:42:39 +08:00

Make docking floating windows work on WSL/wayland, too

This commit is contained in:
jonjenssen 2023-05-19 14:11:00 +02:00
parent 9f95d2459e
commit e727c255bc

View File

@ -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,