1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-08 04:20:09 +00:00

Various changes to improve the behaviour of kiosk mode for DocumentWindows on win32.

This commit is contained in:
jules 2014-01-27 17:39:21 +00:00
parent f34d1cdb3c
commit 042d9f22fc
7 changed files with 38 additions and 27 deletions

View file

@ -173,6 +173,22 @@ private:
JUCE_DECLARE_NON_COPYABLE (MouseListenerList)
};
//==============================================================================
struct FocusRestorer
{
FocusRestorer() : lastFocus (Component::getCurrentlyFocusedComponent()) {}
~FocusRestorer()
{
if (lastFocus != nullptr && ! lastFocus->isCurrentlyBlockedByAnotherModalComponent())
lastFocus->grabKeyboardFocus();
}
WeakReference<Component> lastFocus;
JUCE_DECLARE_NON_COPYABLE (FocusRestorer)
};
//==============================================================================
struct ScalingHelpers
{