* Moved the screen change to a later point, as the workspace-leaving message
did arrive after the change; now it's: leave workspace, change screen, enter workspace. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28907 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
391bf22d79
commit
f3bd277ed5
@ -945,14 +945,6 @@ Desktop::_SetWorkspace(int32 index)
|
||||
int32 previousIndex = fCurrentWorkspace;
|
||||
rgb_color previousColor = fWorkspaces[fCurrentWorkspace].Color();
|
||||
bool movedMouseEventWindow = false;
|
||||
display_mode previousMode, newMode;
|
||||
fVirtualScreen.ScreenAt(0)->GetMode(&previousMode);
|
||||
fVirtualScreen.RestoreConfiguration(*this,
|
||||
fSettings->WorkspacesMessage(index));
|
||||
fVirtualScreen.ScreenAt(0)->GetMode(&newMode);
|
||||
// We only need to invalidate the entire desktop if we changed display modes
|
||||
if (memcmp(&previousMode, &newMode, sizeof(display_mode)))
|
||||
ScreenChanged(fVirtualScreen.ScreenAt(0), false);
|
||||
|
||||
if (fMouseEventWindow != NULL) {
|
||||
if (fMouseEventWindow->IsNormal()) {
|
||||
@ -1010,6 +1002,17 @@ Desktop::_SetWorkspace(int32 index)
|
||||
fPreviousWorkspace = fCurrentWorkspace;
|
||||
fCurrentWorkspace = index;
|
||||
|
||||
// Change the display mode, if needed
|
||||
// TODO: this needs to be done for all screens
|
||||
display_mode previousMode, newMode;
|
||||
fVirtualScreen.ScreenAt(0)->GetMode(&previousMode);
|
||||
fVirtualScreen.RestoreConfiguration(*this,
|
||||
fSettings->WorkspacesMessage(index));
|
||||
fVirtualScreen.ScreenAt(0)->GetMode(&newMode);
|
||||
// We only need to invalidate the entire desktop if we changed display modes
|
||||
if (memcmp(&previousMode, &newMode, sizeof(display_mode)))
|
||||
ScreenChanged(fVirtualScreen.ScreenAt(0), false);
|
||||
|
||||
// show windows, and include them in the changed region - but only
|
||||
// those that were not visible before (or whose position changed)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user