diff --git a/src/servers/app/Screen.cpp b/src/servers/app/Screen.cpp index 3fd8fda000..8156759624 100644 --- a/src/servers/app/Screen.cpp +++ b/src/servers/app/Screen.cpp @@ -93,19 +93,6 @@ Screen::SetMode(const display_mode& mode, bool makeDefault) { display_mode current; GetMode(¤t); - // TODO: decide how best to handle the flags here - things like - // the screen preflet will generally always set the flags to 0, - // while it seems asking the accelerant to automatically pick the - // best mode might not necessarily. For the time being, match the - // flags before doing the mode comparison in order to prevent - // mode switches for otherwise identical modes (this was relatively - // easily observed on at least the radeon accelerant - on first boot - // the best mode picked included a flag mask of 0xffffffff ; - // if you switched the resolution of one workspace to something else - // and then back to the resolution it started with, you would observe - // a mode switch when jumping between that workspace and the others - // that were still using the automatically set default mode) - current.flags = mode.flags; if (!memcmp(&mode, ¤t, sizeof(display_mode))) return B_OK; diff --git a/src/servers/app/VirtualScreen.cpp b/src/servers/app/VirtualScreen.cpp index 484e9c3355..55f3edadb5 100644 --- a/src/servers/app/VirtualScreen.cpp +++ b/src/servers/app/VirtualScreen.cpp @@ -108,11 +108,8 @@ VirtualScreen::StoreConfiguration(BMessage& settings) display_mode mode; screen->GetMode(&mode); - screenSettings.AddInt32("width", mode.virtual_width); - screenSettings.AddInt32("height", mode.virtual_height); - screenSettings.AddInt32("color space", mode.space); - screenSettings.AddData("timing", B_RAW_TYPE, &mode.timing, - sizeof(display_timing)); + screenSettings.AddData("mode", B_RAW_TYPE, &mode, + sizeof(display_mode)); settings.AddMessage("screen", &screenSettings); } @@ -142,16 +139,12 @@ VirtualScreen::AddScreen(Screen* screen) BMessage settings; if (_GetConfiguration(screen, settings) == B_OK) { // we found settings for this screen, and try to apply them now - int32 width, height, colorSpace; - const display_timing* timing; + const display_mode* mode; ssize_t size; - if (settings.FindInt32("width", &width) == B_OK - && settings.FindInt32("height", &height) == B_OK - && settings.FindInt32("color space", &colorSpace) == B_OK - && settings.FindData("timing", B_RAW_TYPE, (const void**)&timing, + if (settings.FindData("mode", B_RAW_TYPE, (const void**)&mode, &size) == B_OK - && size == sizeof(display_timing)) - status = screen->SetMode(width, height, colorSpace, *timing, true); + && size == sizeof(display_mode)) + status = screen->SetMode(*mode, true); // TODO: named settings will get lost if setting the mode failed! } if (status < B_OK) {