1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Windows: Disable window decorations for kiosk-mode windows

This fixes an issue where kiosk-mode windows would incorrectly receive
rounded corners and a 1px transparent border.
This commit is contained in:
reuk 2025-06-18 20:08:24 +01:00
parent aa9b352483
commit 3e70c37ce3
No known key found for this signature in database

View file

@ -2551,10 +2551,16 @@ private:
bool windowUsesNativeShadow() const
{
return hasTitleBar()
|| ( (0 != (styleFlags & windowHasDropShadow))
&& (0 == (styleFlags & windowIsSemiTransparent))
&& (0 == (styleFlags & windowIsTemporary)));
if (hasTitleBar())
return true;
// On Windows 11, the native drop shadow also gives us a 1px transparent border and rounded
// corners, which doesn't look great in kiosk mode. Disable the native shadow for
// fullscreen windows.
return Desktop::getInstance().getKioskModeComponent() != &component
&& (0 != (styleFlags & windowHasDropShadow))
&& (0 == (styleFlags & windowIsSemiTransparent))
&& (0 == (styleFlags & windowIsTemporary));
}
void updateShadower()