Now checks the screen mode to be set if it is already the active one (and do nothing if

that's the case).
Accidently this also fixes bug #1010.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20049 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-02-02 16:20:16 +00:00
parent 44c1a9db62
commit 89eb4cd6c9
+11 -6
View File
@@ -2062,7 +2062,7 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
// 1) screen_id // 1) screen_id
// 2) workspace index // 2) workspace index
// 3) display_mode to set // 3) display_mode to set
// 4) 'makedefault' boolean // 4) 'makeDefault' boolean
// TODO: See above: workspaces support, etc. // TODO: See above: workspaces support, etc.
screen_id id; screen_id id;
@@ -2078,11 +2078,16 @@ ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
status_t status = link.Read<bool>(&makeDefault); status_t status = link.Read<bool>(&makeDefault);
if (status == B_OK && fDesktop->LockAllWindows()) { if (status == B_OK && fDesktop->LockAllWindows()) {
status = fDesktop->ScreenAt(0)->SetMode(mode, makeDefault); display_mode oldMode;
if (status == B_OK) { fDesktop->ScreenAt(0)->GetMode(&oldMode);
gInputManager->UpdateScreenBounds(fDesktop->ScreenAt(0)->Frame()); if (memcmp(&oldMode, &mode, sizeof(display_mode))) {
fDesktop->ScreenChanged(fDesktop->ScreenAt(0), makeDefault); status = fDesktop->ScreenAt(0)->SetMode(mode, makeDefault);
} if (status == B_OK) {
gInputManager->UpdateScreenBounds(fDesktop->ScreenAt(0)->Frame());
fDesktop->ScreenChanged(fDesktop->ScreenAt(0), makeDefault);
}
} else
status = B_OK;
fDesktop->UnlockAllWindows(); fDesktop->UnlockAllWindows();
} else } else
status = B_ERROR; status = B_ERROR;