mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-02-04 01:59:19 +08:00
Disable native windows on Linux if wayland is used
This commit is contained in:
parent
7b30322946
commit
cae42939c8
@ -674,6 +674,17 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager *DockManager) :
|
||||
native_window = window_manager != "KWIN";
|
||||
}
|
||||
|
||||
if (native_window)
|
||||
{
|
||||
// Native windows do not work if wayland is used. Ubuntu 22.04 uses wayland by default. To use
|
||||
// native windows, switch to Xorg
|
||||
QString XdgSessionType = qgetenv("XDG_SESSION_TYPE").toLower();
|
||||
if ("wayland" == XdgSessionType)
|
||||
{
|
||||
native_window = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (native_window)
|
||||
{
|
||||
setTitleBarWidget(new QWidget());
|
||||
|
Loading…
Reference in New Issue
Block a user