From 0017304e3d0be303b4c0e1330952eb949dd56142 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Wed, 10 Dec 2008 14:41:10 +0000 Subject: [PATCH] Correct a small style violation noted by Axel, and add a TODO note. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28799 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/Screen.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/servers/app/Screen.cpp b/src/servers/app/Screen.cpp index 17531269d2..622f04e2b2 100644 --- a/src/servers/app/Screen.cpp +++ b/src/servers/app/Screen.cpp @@ -22,6 +22,7 @@ #include #include + static float get_mode_frequency(const display_mode& mode) { @@ -92,6 +93,18 @@ Screen::SetMode(const display_mode& mode, bool makeDefault) { display_mode current; GetMode(¤t); + // TODO: decide how best to handle the flags here - things like + // the screen preflet will generally always set the flags to 0, + // while it seems asking the accelerant to automatically pick the + // best mode might not necessarily. For the time being, match the + // flags before doing the mode comparison in order to prevent + // mode switches for otherwise identical modes (this was relatively + // easily observed on at least the radeon accelerant - on first boot + // the best mode picked included a flag mask of 0xffffffff ; + // if you switched the resolution of one workspace to something else + // and then back to the resolution it started with, you would observe + // a mode switch when jumping between that workspace and the others + // that were still using the automatically set default mode) current.flags = mode.flags; if (!memcmp(&mode, ¤t, sizeof(display_mode))) return B_OK;