Skip to content

Commit

Permalink
FloatingWindow: fix multiple windows on the tasks bar on Linux system
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreguillot committed Jan 7, 2025
1 parent 37c3af4 commit ccffa3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dependencies/Misc/Source/MiscFloatingWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -146,6 +146,7 @@ void FloatingWindowContainer::showAt(juce::Point<int> const& pt)
}
else
{
mFloatingWindow.addToDesktop();
mContent.setLookAndFeel(&getLookAndFeel());
mFloatingWindow.setLookAndFeel(&getLookAndFeel());
mFloatingWindow.setVisible(true);
Expand All @@ -156,6 +157,7 @@ void FloatingWindowContainer::showAt(juce::Point<int> const& pt)
void FloatingWindowContainer::hide()
{
mFloatingWindow.setVisible(false);
mFloatingWindow.removeFromDesktop();
}

void FloatingWindowContainer::toFront()
Expand Down

0 comments on commit ccffa3b

Please sign in to comment.