]> granicus.if.org Git - nethack/commitdiff
mouse fix for nt tty
authornethack.allison <nethack.allison>
Sat, 6 Apr 2002 16:26:38 +0000 (16:26 +0000)
committernethack.allison <nethack.allison>
Sat, 6 Apr 2002 16:26:38 +0000 (16:26 +0000)
No wonder we've had complaints about the mouse lately.
The port was responding to mouse movements that didn't
even involve a button click.

doc/fixes34.1
sys/winnt/nttty.c

index 76993152f966c82927c9e34afe8869d47e6841e5..be82331450bd54c03e10ec899f8a6bdbc51b97ec 100644 (file)
@@ -61,6 +61,7 @@ win32: win32 build no longer defines MICRO
 win32: allow error save files to be generated
 win32gui: make error() work; it was essentially non-operative in 3.4.0
 win32tty: honour the use_inverse option and default to ATR_BOLD if disabled
+win32tty: respond only to mouse clicks not mouse movement
 X11: restore support for non-square tiles when USE_XPM is defined
 Gnome: add support for non-square tiles
 tty: remove #define DEBUG that forced debug behavior in production builds
index 0ad4e2ba7f4a2b93c07b91716c8d91fe1d5f38d5..5ce3950ff4eda2f1a7cafe12824411de97f290ae 100644 (file)
@@ -432,8 +432,10 @@ int *x, *y, *mod;
                     (ch || (iskeypad(scan)) || altseq)) {
                        *mod = 0;
                        return process_keystroke(&ir, &valid);
-               } else if ((ir.EventType == MOUSE_EVENT &&
-                 (ir.Event.MouseEvent.dwButtonState & MOUSEMASK))) {
+               } else if (
+                 (ir.EventType == MOUSE_EVENT &&
+                  (ir.Event.MouseEvent.dwEventFlags == 0) &&
+                  (ir.Event.MouseEvent.dwButtonState & MOUSEMASK))) {
                        *x = ir.Event.MouseEvent.dwMousePosition.X + 1;
                        *y = ir.Event.MouseEvent.dwMousePosition.Y - 1;