summaryrefslogtreecommitdiff
path: root/hw/xwin/winprocarg.c
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2010-03-30 19:49:41 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2011-01-19 14:02:26 +0000
commit33106e1e807a828208b306512e78c5e3e93960d3 (patch)
treed009e6fbcf73f989481e7c59c3d36c04e6a934c0 /hw/xwin/winprocarg.c
parentbbc511e80b2a9365f6a1528bc1595772f83be654 (diff)
Cygwin/X: Generate RANDR change on WM_DISPLAYCHANGE for rootless modes
When RANDR resizing is enabled, generate an internal RANDR change when WM_DISPLAYCHANGE occurs in rootless modes for screens which occupy an entire monitor or the virtual desktop. Store the monitor number and use that to handle WM_DISPLAYCHANGE for a screen specified with '-screen @monitor' In rooted mode, WM_DISPLAYCHANGE isn't relevant (except where display depth changes may cause problems). (A maximized screen window will get WM_SIZE to adjust it to the new monitor size) In rooted fullscreen mode, WM_DISPLAYCHANGE shouldn't be seen, as we have the resolution we have selected for the fullscreen session) (Could client randr requests be handled in fullscreen to cause a change of the fullscreen resolution? ) Don't bother do a RANDR resize if the dimensions aren't actually changing when WM_DISPLAYCHANGE is sent (should handle WM_DISPLAYCHANGE to size 0x0 that the intel driver seems to like to send) Various debug output improvements Also, remove the note that XWin can't handle display mode changes from the man page Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw/xwin/winprocarg.c')
-rw-r--r--hw/xwin/winprocarg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c
index e4c52ef94..ddfe1f5b7 100644
--- a/hw/xwin/winprocarg.c
+++ b/hw/xwin/winprocarg.c
@@ -95,6 +95,7 @@ winInitializeScreenDefaults(void)
if (monitorResolution == 0)
monitorResolution = WIN_DEFAULT_DPI;
+ defaultScreenInfo.iMonitor = 1;
defaultScreenInfo.dwWidth = dwWidth;
defaultScreenInfo.dwHeight = dwHeight;
defaultScreenInfo.dwUserWidth = dwWidth;
@@ -318,6 +319,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
iArgsProcessed = 3;
g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = FALSE;
g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
+ g_ScreenInfo[nScreenNum].iMonitor = iMonitor;
g_ScreenInfo[nScreenNum].dwWidth = data.monitorWidth;
g_ScreenInfo[nScreenNum].dwHeight = data.monitorHeight;
g_ScreenInfo[nScreenNum].dwUserWidth = data.monitorWidth;
@@ -370,6 +372,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
"Querying monitors is not supported on NT4 and Win95\n");
} else if (data.bMonitorSpecifiedExists == TRUE)
{
+ g_ScreenInfo[nScreenNum].iMonitor = iMonitor;
g_ScreenInfo[nScreenNum].dwInitialX += data.monitorOffsetX;
g_ScreenInfo[nScreenNum].dwInitialY += data.monitorOffsetY;
}
@@ -399,6 +402,7 @@ ddxProcessArgument (int argc, char *argv[], int i)
{
winErrorFVerb (2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor);
g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE;
+ g_ScreenInfo[nScreenNum].iMonitor = iMonitor;
g_ScreenInfo[nScreenNum].dwInitialX = data.monitorOffsetX;
g_ScreenInfo[nScreenNum].dwInitialY = data.monitorOffsetY;
}