From ccffa3b5fb645795cb287d6df092daec2975c582 Mon Sep 17 00:00:00 2001 From: Pierre Guillot Date: Mon, 6 Jan 2025 17:56:34 +0100 Subject: [PATCH] FloatingWindow: fix multiple windows on the tasks bar on Linux system --- Dependencies/Misc/Source/MiscFloatingWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dependencies/Misc/Source/MiscFloatingWindow.cpp b/Dependencies/Misc/Source/MiscFloatingWindow.cpp index 32699226..a897d628 100644 --- a/Dependencies/Misc/Source/MiscFloatingWindow.cpp +++ b/Dependencies/Misc/Source/MiscFloatingWindow.cpp @@ -84,7 +84,7 @@ void FloatingWindow::paintOverChildren(juce::Graphics& g) void FloatingWindow::globalFocusChanged(juce::Component* focusedComponent) { #ifdef JUCE_LINUX - if(focusedComponent != nullptr || juce::Process::isForegroundProcess()) + if(isVisible() && (focusedComponent != nullptr || juce::Process::isForegroundProcess())) { toFront(false); } @@ -146,6 +146,7 @@ void FloatingWindowContainer::showAt(juce::Point const& pt) } else { + mFloatingWindow.addToDesktop(); mContent.setLookAndFeel(&getLookAndFeel()); mFloatingWindow.setLookAndFeel(&getLookAndFeel()); mFloatingWindow.setVisible(true); @@ -156,6 +157,7 @@ void FloatingWindowContainer::showAt(juce::Point const& pt) void FloatingWindowContainer::hide() { mFloatingWindow.setVisible(false); + mFloatingWindow.removeFromDesktop(); } void FloatingWindowContainer::toFront()