From b8b25ac48755285d00f08780dae10d7442dbccf0 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 21 Aug 2018 09:15:16 +0100 Subject: [PATCH] Windows: Set the MB_TOPMOST flag for native alert windows if there are any alwaysOnTop JUCE windows so it doesn't get stuck behind them --- modules/juce_gui_basics/native/juce_win32_Windowing.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index d1038ee134..12e681fe15 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -4211,6 +4211,11 @@ private: { UINT flags = MB_TASKMODAL | MB_SETFOREGROUND; + // this window can get lost behind JUCE windows which are set to be alwaysOnTop + // so if there are any set it to be topmost + if (juce_areThereAnyAlwaysOnTopWindows()) + flags |= MB_TOPMOST; + switch (iconType) { case AlertWindow::QuestionIcon: flags |= MB_ICONQUESTION; break;