When the workspace changes use the passed in workspace screen mode
...instead of the current workspace screen mode that we are switching from. Fixes #9415 Also don't ignore the returned the status code when updating the screen mode.
This commit is contained in:
@@ -802,16 +802,25 @@ ScreenWindow::_UpdateControls()
|
||||
/*! Reflect active mode in chosen settings */
|
||||
void
|
||||
ScreenWindow::_UpdateActiveMode()
|
||||
{
|
||||
_UpdateActiveMode(current_workspace());
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ScreenWindow::_UpdateActiveMode(int32 workspace)
|
||||
{
|
||||
// Usually, this function gets called after a mode
|
||||
// has been set manually; still, as the graphics driver
|
||||
// is free to fiddle with mode passed, we better ask
|
||||
// what kind of mode we actually got
|
||||
fScreenMode.Get(fActive);
|
||||
fSelected = fActive;
|
||||
if (fScreenMode.Get(fActive, workspace) == B_OK) {
|
||||
fSelected = fActive;
|
||||
|
||||
_UpdateMonitor();
|
||||
_UpdateControls();
|
||||
_UpdateMonitor();
|
||||
_BuildSupportedColorSpaces();
|
||||
_UpdateControls();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -851,11 +860,12 @@ ScreenWindow::ScreenChanged(BRect frame, color_space mode)
|
||||
void
|
||||
ScreenWindow::WorkspaceActivated(int32 workspace, bool state)
|
||||
{
|
||||
fScreenMode.GetOriginalMode(fOriginal, workspace);
|
||||
_UpdateActiveMode();
|
||||
if (fScreenMode.GetOriginalMode(fOriginal, workspace) == B_OK) {
|
||||
_UpdateActiveMode(workspace);
|
||||
|
||||
BMessage message(UPDATE_DESKTOP_COLOR_MSG);
|
||||
PostMessage(&message, fMonitorView);
|
||||
BMessage message(UPDATE_DESKTOP_COLOR_MSG);
|
||||
PostMessage(&message, fMonitorView);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ private:
|
||||
void _CheckRefreshMenu();
|
||||
|
||||
void _UpdateActiveMode();
|
||||
void _UpdateActiveMode(int32 workspace);
|
||||
void _UpdateWorkspaceButtons();
|
||||
void _UpdateRefreshControl();
|
||||
void _UpdateMonitorView();
|
||||
|
||||
Reference in New Issue
Block a user