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.
This commit is contained in:
nethack.allison
2002-04-06 16:26:38 +00:00
parent e2f58eec52
commit c6a8fbdd83
2 changed files with 5 additions and 2 deletions

View 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

View 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;