Top level windows do not always hide their shadows


Hi Jules,

When using some utilities such as VirtuaWin (desktop swicther, ), or other apps that minimise an application to the system tray, the shadow of Juce windows stays on screen when the juce window is hidden (which happen when switching from on desktop to another).

The issue happens with both non-native and native title bars. Disabling the shadower creation in HWNDComponentPeer fixes the issue, but of course that means no more shadows with non-native titlebars.

Looking at the messages received, I think the shadow is not hidden because juce does not take into account the SWP_HIDEWINDOW flag in WM_WINDOWPOSCHANGED messages, which is set when those applications do hide the window, so it thinks the window is still on-screen and the shadow is not is hidden


Thanks - I’ve added a bit of code that should handle that (fingers crossed - I didn’t install virtualwin to test it)…


You can uncross your fingers, it works fine ! Thanks Jules.