Skip to content

Commit cae4293

Browse files
Disable native windows on Linux if wayland is used
1 parent 7b30322 commit cae4293

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/FloatingDockContainer.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,17 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager *DockManager) :
674674
native_window = window_manager != "KWIN";
675675
}
676676

677+
if (native_window)
678+
{
679+
// Native windows do not work if wayland is used. Ubuntu 22.04 uses wayland by default. To use
680+
// native windows, switch to Xorg
681+
QString XdgSessionType = qgetenv("XDG_SESSION_TYPE").toLower();
682+
if ("wayland" == XdgSessionType)
683+
{
684+
native_window = false;
685+
}
686+
}
687+
677688
if (native_window)
678689
{
679690
setTitleBarWidget(new QWidget());

0 commit comments

Comments
 (0)