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,17 +802,26 @@ ScreenWindow::_UpdateControls()
|
|||||||
/*! Reflect active mode in chosen settings */
|
/*! Reflect active mode in chosen settings */
|
||||||
void
|
void
|
||||||
ScreenWindow::_UpdateActiveMode()
|
ScreenWindow::_UpdateActiveMode()
|
||||||
|
{
|
||||||
|
_UpdateActiveMode(current_workspace());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ScreenWindow::_UpdateActiveMode(int32 workspace)
|
||||||
{
|
{
|
||||||
// Usually, this function gets called after a mode
|
// Usually, this function gets called after a mode
|
||||||
// has been set manually; still, as the graphics driver
|
// has been set manually; still, as the graphics driver
|
||||||
// is free to fiddle with mode passed, we better ask
|
// is free to fiddle with mode passed, we better ask
|
||||||
// what kind of mode we actually got
|
// what kind of mode we actually got
|
||||||
fScreenMode.Get(fActive);
|
if (fScreenMode.Get(fActive, workspace) == B_OK) {
|
||||||
fSelected = fActive;
|
fSelected = fActive;
|
||||||
|
|
||||||
_UpdateMonitor();
|
_UpdateMonitor();
|
||||||
|
_BuildSupportedColorSpaces();
|
||||||
_UpdateControls();
|
_UpdateControls();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -851,12 +860,13 @@ ScreenWindow::ScreenChanged(BRect frame, color_space mode)
|
|||||||
void
|
void
|
||||||
ScreenWindow::WorkspaceActivated(int32 workspace, bool state)
|
ScreenWindow::WorkspaceActivated(int32 workspace, bool state)
|
||||||
{
|
{
|
||||||
fScreenMode.GetOriginalMode(fOriginal, workspace);
|
if (fScreenMode.GetOriginalMode(fOriginal, workspace) == B_OK) {
|
||||||
_UpdateActiveMode();
|
_UpdateActiveMode(workspace);
|
||||||
|
|
||||||
BMessage message(UPDATE_DESKTOP_COLOR_MSG);
|
BMessage message(UPDATE_DESKTOP_COLOR_MSG);
|
||||||
PostMessage(&message, fMonitorView);
|
PostMessage(&message, fMonitorView);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ private:
|
|||||||
void _CheckRefreshMenu();
|
void _CheckRefreshMenu();
|
||||||
|
|
||||||
void _UpdateActiveMode();
|
void _UpdateActiveMode();
|
||||||
|
void _UpdateActiveMode(int32 workspace);
|
||||||
void _UpdateWorkspaceButtons();
|
void _UpdateWorkspaceButtons();
|
||||||
void _UpdateRefreshControl();
|
void _UpdateRefreshControl();
|
||||||
void _UpdateMonitorView();
|
void _UpdateMonitorView();
|
||||||
|
|||||||
Reference in New Issue
Block a user