summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-02 11:39:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-02 11:39:29 (GMT)
commitaa8efe88661be2b380149cb1e1d7c0e9313c4130 (patch)
treec12fa65a444645b8f89feba3bddeef8e4b31542b /win/tkWinWm.c
parente9140811cd74d9b4da77039deb20dfca25fd798c (diff)
parentf6ce17f323f35d5c06e37723848cbd7fa8f2f6fa (diff)
downloadtk-aa8efe88661be2b380149cb1e1d7c0e9313c4130.zip
tk-aa8efe88661be2b380149cb1e1d7c0e9313c4130.tar.gz
tk-aa8efe88661be2b380149cb1e1d7c0e9313c4130.tar.bz2
[Bug 533519]: Window placement with multiple screens
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 2df9b2e..8a9b2af 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -6482,20 +6482,10 @@ Tk_GetVRootGeometry(
int *widthPtr, int *heightPtr)
/* Store dimensions of virtual root here. */
{
- TkWindow *winPtr = (TkWindow *) tkwin;
-
- /*
- * XXX: This is not correct for multiple monitors. There may be many
- * changes required to get this right, and it may effect existing
- * applications that don't consider possible <0 vroot. See
- * http://msdn.microsoft.com/library/en-us/gdi/monitor_3lrn.asp for more
- * info.
- */
-
- *xPtr = 0;
- *yPtr = 0;
- *widthPtr = DisplayWidth(winPtr->display, winPtr->screenNum);
- *heightPtr = DisplayHeight(winPtr->display, winPtr->screenNum);
+ *xPtr = GetSystemMetrics(SM_XVIRTUALSCREEN);
+ *yPtr = GetSystemMetrics(SM_YVIRTUALSCREEN);
+ *widthPtr = GetSystemMetrics(SM_CXVIRTUALSCREEN);
+ *heightPtr = GetSystemMetrics(SM_CYVIRTUALSCREEN);
}
/*