test_app_server: add multiple screen support
Change-Id: I89fb30936160615d28aebb36c8b1f84690007de7 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2511 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
@@ -134,16 +134,16 @@ ScreenManager::AcquireScreens(ScreenOwner* owner, int32* wishList,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TEST_MODE == 0
|
|
||||||
if (added == 0 && target != NULL) {
|
if (added == 0 && target != NULL) {
|
||||||
// there's a specific target screen we want to initialize
|
// there's a specific target screen we want to initialize
|
||||||
// TODO: right now we only support remote screens, but we could
|
// TODO: right now we only support remote screens, but we could
|
||||||
// also target specific accelerants to support other graphics cards
|
// also target specific accelerants to support other graphics cards
|
||||||
HWInterface* interface;
|
HWInterface* interface;
|
||||||
/*if (strncmp(target, "vnc:", 4) == 0)
|
#ifdef HAIKU_TARGET_PLATFORM_LIBBE_TEST
|
||||||
interface = new(nothrow) VNCHWInterface(target);
|
interface = new(nothrow) ViewHWInterface();
|
||||||
else*/
|
#else
|
||||||
interface = new(nothrow) RemoteHWInterface(target);
|
interface = new(nothrow) RemoteHWInterface(target);
|
||||||
|
#endif
|
||||||
if (interface != NULL) {
|
if (interface != NULL) {
|
||||||
screen_item* item = _AddHWInterface(interface);
|
screen_item* item = _AddHWInterface(interface);
|
||||||
if (item != NULL && list.AddItem(item->screen)) {
|
if (item != NULL && list.AddItem(item->screen)) {
|
||||||
@@ -152,7 +152,6 @@ ScreenManager::AcquireScreens(ScreenOwner* owner, int32* wishList,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // TEST_MODE == 0
|
|
||||||
|
|
||||||
return added > 0 ? B_OK : B_ENTRY_NOT_FOUND;
|
return added > 0 ? B_OK : B_ENTRY_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -483,6 +483,8 @@ ViewHWInterface::SetMode(const display_mode& mode)
|
|||||||
// has not been created either, but we need one to display
|
// has not been created either, but we need one to display
|
||||||
// a real BWindow in the test environment.
|
// a real BWindow in the test environment.
|
||||||
// be_app->Run() needs to be called in another thread
|
// be_app->Run() needs to be called in another thread
|
||||||
|
|
||||||
|
if (be_app == NULL) {
|
||||||
BApplication* app = new BApplication(
|
BApplication* app = new BApplication(
|
||||||
"application/x-vnd.Haiku-test-app_server");
|
"application/x-vnd.Haiku-test-app_server");
|
||||||
app->Unlock();
|
app->Unlock();
|
||||||
@@ -496,6 +498,7 @@ ViewHWInterface::SetMode(const display_mode& mode)
|
|||||||
|
|
||||||
if (ret < B_OK)
|
if (ret < B_OK)
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
fWindow = new CardWindow(frame.OffsetToCopy(BPoint(50.0, 50.0)));
|
fWindow = new CardWindow(frame.OffsetToCopy(BPoint(50.0, 50.0)));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user