diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index 98fd48b9fe..0b1ba583b4 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -899,6 +899,13 @@ Desktop::SetBrightness(int32 id, float brightness) status_t result = HWInterface()->SetBrightness(brightness); if (result == B_OK) { + if (fWorkspaces[0].StoredScreenConfiguration().CurrentByID(id) == NULL) { + // store the current configuration if empty + screen_configuration* current + = fWorkspaces[0].CurrentScreenConfiguration().CurrentByID(id); + fWorkspaces[0].StoredScreenConfiguration().Set(id, + current->has_info ? ¤t->info : NULL, current->frame, current->mode); + } fWorkspaces[0].StoredScreenConfiguration().SetBrightness(id, brightness); // Save brightness for next boot diff --git a/src/servers/app/VirtualScreen.cpp b/src/servers/app/VirtualScreen.cpp index 1a9f7e2662..4855fcb3c6 100644 --- a/src/servers/app/VirtualScreen.cpp +++ b/src/servers/app/VirtualScreen.cpp @@ -129,6 +129,12 @@ VirtualScreen::AddScreen(Screen* screen, ScreenConfigurations& configurations) // We found no configuration or it wasn't valid, try to fallback to // sane values status = screen->SetPreferredMode(); + if (status == B_OK) { + monitor_info info; + bool hasInfo = screen->GetMonitorInfo(info) == B_OK; + screen->GetMode(mode); + configurations.Set(screen->ID(), hasInfo ? &info : NULL, screen->Frame(), mode); + } if (status != B_OK) status = screen->SetBestMode(1024, 768, B_RGB32, 60.f); if (status != B_OK)