TeamMonitorTest: fix build, exit on window close.

This commit is contained in:
Adrien Destugues
2014-12-19 13:38:46 +01:00
parent 21d247bb58
commit 216f305cea
2 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ SimpleTest TeamMonitorTest :
TeamMonitorTest.cpp
TeamMonitorWindow.cpp
TeamListItem.cpp
: be
: be localestub shared
;
SEARCH on [ FGristFiles
@@ -22,8 +22,15 @@ main()
{
BApplication app("application/x-vnd.tmwindow-test");
TeamMonitorWindow *window = new TeamMonitorWindow();
// The window should quit the app when it is done
window->SetFlags(window->Flags() | B_QUIT_ON_WINDOW_CLOSE);
window->Enable();
// we don't even quit when the window is closed...
// The window is designed to never quit unless this message was received.
// And in our case we would like it to quit.
BMessage message(SYSTEM_SHUTTING_DOWN);
window->PostMessage(&message);
app.Run();
}