Tk Source Code

Artifact [97a67cc3]
Login

Artifact 97a67cc393bd3c09882fd8a04687291baba46f8e:

Attachment "tk_win_multihead.patch" to ticket [3512824f] added by rolandschwingel 2012-03-29 20:57:52.
diff -ruN win_orig/tkWinWm.c win/tkWinWm.c
--- win_orig/tkWinWm.c	2012-03-18 22:03:37.000000000 +0100
+++ win/tkWinWm.c	2012-03-29 14:13:38.897676500 +0200
@@ -7821,8 +7821,8 @@
 	    } else {
 		HDC dc = GetDC(NULL);
 
-		screen->width = LOWORD(lParam);		/* horizontal res */
-		screen->height = HIWORD(lParam);	/* vertical res */
+		screen->width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
+		screen->height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
 		screen->mwidth = MulDiv(screen->width, 254,
 			GetDeviceCaps(dc, LOGPIXELSX) * 10);
 		screen->mheight = MulDiv(screen->height, 254,
diff -ruN win_orig/tkWinX.c win/tkWinX.c
--- win_orig/tkWinX.c	2012-03-18 22:03:37.000000000 +0100
+++ win/tkWinX.c	2012-03-29 14:11:41.940879700 +0200
@@ -452,8 +452,8 @@
     screen = display->screens;
 
     dc = GetDC(NULL);
-    screen->width = GetDeviceCaps(dc, HORZRES);
-    screen->height = GetDeviceCaps(dc, VERTRES);
+    screen->width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
+    screen->height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
     screen->mwidth = MulDiv(screen->width, 254,
 	    GetDeviceCaps(dc, LOGPIXELSX) * 10);
     screen->mheight = MulDiv(screen->height, 254,