Add Jacob's patch for compiling without multimon.h.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 23 Oct 2001 20:25:34 +0000 (20:25 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 23 Oct 2001 20:25:34 +0000 (20:25 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@1315 cda61777-01e9-0310-a592-d414129be87e

Makefile
window.c

index feba78d..b30a608 100644 (file)
--- a/Makefile
+++ b/Makefile
 #      build, since at the time of writing this <aclapi.h> is known
 #      not to be available in Cygwin.
 #
 #      build, since at the time of writing this <aclapi.h> is known
 #      not to be available in Cygwin.
 #
+#  - COMPAT=/DNO_MULTIMON
+#      Disables PuTTY's use of <multimon.h>, which is not available
+#      with some development environments. This means that PuTTY's
+#      full-screen mode (configurable to work on Alt-Enter) will
+#      not behave usefully in a multi-monitor environment.
+#
 #  - RCFL=/DASCIICTLS
 #      Uses ASCII rather than Unicode to specify the tab control in
 #      the resource file. Probably most useful when compiling with
 #  - RCFL=/DASCIICTLS
 #      Uses ASCII rather than Unicode to specify the tab control in
 #      the resource file. Probably most useful when compiling with
index c0e7f3e..26567d7 100644 (file)
--- a/window.c
+++ b/window.c
@@ -10,7 +10,7 @@
 #endif
 #endif
 
 #endif
 #endif
 
-#if WINVER < 0x0500
+#if (WINVER < 0x0500) && !defined(NO_MULTIMON)
 #define COMPILE_MULTIMON_STUBS
 #include <multimon.h>
 #endif
 #define COMPILE_MULTIMON_STUBS
 #include <multimon.h>
 #endif
@@ -3843,7 +3843,7 @@ static void flip_full_screen(void)
 
     if (full_screen) {
        int x, y, cx, cy;
 
     if (full_screen) {
        int x, y, cx, cy;
-#ifdef MONITOR_DEFAULTTONEAREST
+#if !defined(NO_MULTIMON) && defined(MONITOR_DEFAULTTONEAREST)
        /* The multi-monitor safe way of doing things */
        HMONITOR        mon;
        MONITORINFO     mi;
        /* The multi-monitor safe way of doing things */
        HMONITOR        mon;
        MONITORINFO     mi;
@@ -3887,4 +3887,3 @@ static void flip_full_screen(void)
     CheckMenuItem(GetSystemMenu(hwnd, FALSE), IDM_FULLSCREEN,
                  MF_BYCOMMAND| full_screen ? MF_CHECKED : MF_UNCHECKED);
 }
     CheckMenuItem(GetSystemMenu(hwnd, FALSE), IDM_FULLSCREEN,
                  MF_BYCOMMAND| full_screen ? MF_CHECKED : MF_UNCHECKED);
 }
-