Skip to content

Commit

Permalink
TeamMonitorTest: fix build, exit on window close.
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkomandy committed Dec 19, 2014
1 parent 21d247b commit 216f305
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tests/add-ons/input_server/Jamfile
Expand Up @@ -10,7 +10,7 @@ SimpleTest TeamMonitorTest :
TeamMonitorTest.cpp
TeamMonitorWindow.cpp
TeamListItem.cpp
: be
: be localestub shared
;

SEARCH on [ FGristFiles
Expand Down
9 changes: 8 additions & 1 deletion src/tests/add-ons/input_server/TeamMonitorTest.cpp
Expand Up @@ -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();
}

0 comments on commit 216f305

Please sign in to comment.