|
From: Miroslav A. <Mir...@it...> - 2009-10-22 12:43:55
|
Hi,
Is there a way to determine if a window has been closed by the X-button in windows? The problem is that the end-user sometimes presses the "X" button instead of "Esc" and I want that the application terminates when all associated windows has been closed.
I tried to run:
displays = vrj::DisplayManager::instance()->getActiveDisplays();
if( displays.size() == 0 )
terminate();
But the size of the display pointer vector doesn't change if the window is closed. And if I Run:
displays[0]->getOriginAndSize(windowInfo[0], windowInfo[1], windowInfo[2], windowInfo[3]);
The window size is still the same before I closed the window. If i just minimize the window then the size changes to 1x1. Also the window offset/origin doesn't update when the window is moved around. When the window is resized then the size is updated just as it should.
Is there an approach to check if all windows has been closed?
Kind regards,
Miroslav Andel
Research Engineer
Linköping University
|