Top level windows do not always hide their shadows


#1

Hi Jules,

When using some utilities such as VirtuaWin (desktop swicther, http://virtuawin.sourceforge.net/ ), 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


#2

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


#3

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


#4

Thanks!