From 89755088d790ff4fe36f8aa77dacb2bd15507108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 28 Mar 2008 18:26:39 +0000 Subject: [PATCH] * Extended the test to be able to switch to the workspace(s) as defined on the command line. * Using this, you can easily reproduce #1765 on BeOS, too. Ie. while it's also a bug in Haiku, this also shows a conceptional problem with the way LaunchBox switches to the current workspace. Stipp, any reason why it doesn't just let the window appear on all workspaces? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24630 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../workspace_switcher/workspace_switcher.cpp | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/tests/servers/app/workspace_switcher/workspace_switcher.cpp b/src/tests/servers/app/workspace_switcher/workspace_switcher.cpp index 455d7bb5b8..5d048236c7 100644 --- a/src/tests/servers/app/workspace_switcher/workspace_switcher.cpp +++ b/src/tests/servers/app/workspace_switcher/workspace_switcher.cpp @@ -7,18 +7,31 @@ */ +#include + #include int -main() +main(int argc, char** argv) { BApplication app("application/x-vnd.Haiku-test-wss"); - while (true) { - activate_workspace(0); - snooze(3000); - activate_workspace(1); + if (argc == 1) { + // switch forever + while (true) { + activate_workspace(0); + snooze(3000); + activate_workspace(1); + } + return 0; } + + for (int i = 1; i < argc; i++) { + activate_workspace(strtoul(argv[i], NULL, 0)); + snooze(3000); + } + + return 0; }