diff options
author | DRC <dcommander@users.sourceforge.net> | 2011-06-06 21:33:08 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2011-06-06 21:33:08 +0000 |
commit | 4abf75462107adffabc38a908428441445cae7ae (patch) | |
tree | ebc00c12c1227a23c6e2c37a998f332b6fe739c9 | |
parent | b3ff4374f226d95a42432bc006bcec3db675a42d (diff) | |
download | tigervnc-4abf75462107adffabc38a908428441445cae7ae.tar.gz tigervnc-4abf75462107adffabc38a908428441445cae7ae.zip |
Make full-screen mode span all monitors in a multi-monitor system
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4465 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r-- | win/vncviewer/DesktopWindow.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/win/vncviewer/DesktopWindow.cxx b/win/vncviewer/DesktopWindow.cxx index f55eb72e..fee0a1b0 100644 --- a/win/vncviewer/DesktopWindow.cxx +++ b/win/vncviewer/DesktopWindow.cxx @@ -1,5 +1,5 @@ /* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. - * Copyright (C) 2010 D. R. Commander. All Rights Reserved. + * Copyright (C) 2010-2011 D. R. Commander. All Rights Reserved. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -265,8 +265,11 @@ void DesktopWindow::setFullscreen(bool fs) { // Save the current window position GetWindowRect(handle, &fullscreenOldRect); - // Find the size of the display the window is on - MonitorInfo mi(handle); + // Find the size of the virtual display + int cx = GetSystemMetrics(SM_CXVIRTUALSCREEN); + int cy = GetSystemMetrics(SM_CYVIRTUALSCREEN); + int x = GetSystemMetrics(SM_XVIRTUALSCREEN); + int y = GetSystemMetrics(SM_YVIRTUALSCREEN); // Hide the toolbar if (tb.isVisible()) @@ -280,10 +283,7 @@ void DesktopWindow::setFullscreen(bool fs) { vlog.debug("flags=%x", flags); SetWindowLong(handle, GWL_STYLE, flags); - SetWindowPos(handle, HWND_TOP, mi.rcMonitor.left, mi.rcMonitor.top, - mi.rcMonitor.right-mi.rcMonitor.left, - mi.rcMonitor.bottom-mi.rcMonitor.top, - SWP_FRAMECHANGED); + SetWindowPos(handle, HWND_TOP, x, y, cx, cy, SWP_FRAMECHANGED); } else if (!fs && fullscreenActive) { fullscreenActive = bumpScroll = false; |