summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2012-05-02 11:39:29 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2012-05-02 11:39:29 (GMT)
commite4a2bfdde1a9fa7936acf9c6f933ac87f159012f (patch)
treec12fa65a444645b8f89feba3bddeef8e4b31542b /win
parent0db0563c34b2791ca73a3ac8fb0a12b964d95772 (diff)
parent24e30136852a5c5b9ef8b0aaec30c6a16df9c2e8 (diff)
downloadtk-e4a2bfdde1a9fa7936acf9c6f933ac87f159012f.zip
tk-e4a2bfdde1a9fa7936acf9c6f933ac87f159012f.tar.gz
tk-e4a2bfdde1a9fa7936acf9c6f933ac87f159012f.tar.bz2
[Bug 533519]: Window placement with multiple screens
FossilOrigin-Name: 62d212e99d9055be45c1b9dc48cfcffcfaa79297
Diffstat (limited to 'win')
-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);
}
/*