From 5c632902131284eead3c0408ec3e57b58e4e2b26 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 27 Feb 2021 20:13:17 +0000 Subject: [PATCH] Fix X11 temporary windows (under tiling WMs and others) Signed-off-by: falkTX --- .../native/x11/juce_linux_XWindowSystem.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp index 6ad01c68ad..490a3a7929 100644 --- a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp +++ b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp @@ -2804,10 +2804,14 @@ void XWindowSystem::setWindowType (::Window windowH, int styleFlags) const if (atoms.windowType != None) { - auto hint = (styleFlags & ComponentPeer::windowIsTemporary) != 0 - || ((styleFlags & ComponentPeer::windowHasDropShadow) == 0 && Desktop::canUseSemiTransparentWindows()) - ? XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_COMBO") - : XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_NORMAL"); + Atom hint = None; + + if (styleFlags & ComponentPeer::windowIsTemporary) + hint = XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_TOOLTIP"); + else if ((styleFlags & ComponentPeer::windowHasDropShadow) == 0 && Desktop::canUseSemiTransparentWindows()) + hint = XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_COMBO"); + else + hint = XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_WINDOW_TYPE_NORMAL"); if (hint != None) xchangeProperty (windowH, atoms.windowType, XA_ATOM, 32, &hint, 1);