From c6a8fbdd83366fd7a3dd01a68e64522698f35dee Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Sat, 6 Apr 2002 16:26:38 +0000 Subject: [PATCH] mouse fix for nt tty 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 | 1 + sys/winnt/nttty.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 76993152f..be8233145 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -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 diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 0ad4e2ba7..5ce3950ff 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -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; -- 2.40.0