I think I may have found a window overlap bug.
I'm on Windows 8 using c++ Win32 in Visual Studio 2012. I have two SFML windows that I have created, and I display, poll the next event, and clear for both windows in a loop, all in the same thread.
Here's how I can initiate the bug:
- Window A is bigger than window B.
- Window A is created last, meaning it shows up on top.
- I click on window B in my taskbar; it appears in front like normal.
- I try to click on the title bar of window B (and in the window itself as well), but nothing happens and none of the buttons on it work. I suspect that even though window A is in the background now it is still receiving the mouse events. (Keep reading and you'll see why this makes even more sense later on.)
- If I move window A off of window B completely, window B then responds as expected.
- I have also figured out how to get window B to respond while window A is mostly overlapping it. Here's how:
- Drag window A slightly off of window B so there's at least 1 pixel of window B not covered by window A. Window A should now be in focus and in the foreground.
- Click on window B in the taskbar. As before, window B seems unresponsive.
- Move the mouse over the sliver of window B that is uncovered (no overlap), e.g. as if to resize it. No clicks necessary; just move the mouse over it.
- Now window B responds to the mouse as expected.
Here's some illustrations:
(1-4)
________
| ___ |
| | | |
| |___| |
|________|
(5)
________
| | ___
| | | |
| | |___|
|________|
(6-10)
________
| __|_
| | |
| |___|
|________|
Did I do something wrong, or have I truly discovered a bug? How can I fix it, or can you fix it please?
Also, another note: this is not just about the windows' creations; it happens over and over again if the process is repeated without restarting the program.
Thanks,
- Andrew