Minimal code:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow largerWindow(sf::VideoMode(800, 600), "Larger window");
sf::RenderWindow smallerWindow(sf::VideoMode(200, 100), "Smaller window");
while (smallerWindow.isOpen() || largerWindow.isOpen())
{
sf::Event event;
while (smallerWindow.pollEvent(event))
{
if (event.type == sf::Event::Closed)
smallerWindow.close();
}
while (largerWindow.pollEvent(event))
{
if (event.type == sf::Event::Closed)
largerWindow.close();
}
}
return 0;
}
The code creates a larger window and a smaller one on top of it:
The smaller window does not receive mouse input: you cannot drag or close it while it's above larger window. When you move larger window away you can select it though and after that it works as intended. Problem occurs only after creating windows - smaller one looks on top of larger one but acts as if it was under it.
Tested on Windows 7.