mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-24 15:55:14 +00:00
Check for SP->key_code when checking KEY_MOUSE in wgetch(); set
SP->key_code when returning KEY_MOUSE in Win32 (oops).
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#define _INBUFSIZ 512 /* size of terminal input buffer */
|
||||
#define NUNGETCH 256 /* max # chars to ungetch() */
|
||||
|
||||
RCSID("$Id: getch.c,v 1.53 2006/11/12 20:38:00 wmcbrine Exp $");
|
||||
RCSID("$Id: getch.c,v 1.54 2006/11/12 20:54:07 wmcbrine Exp $");
|
||||
|
||||
static int c_pindex = 0; /* putter index */
|
||||
static int c_gindex = 1; /* getter index */
|
||||
@@ -180,7 +180,7 @@ int wgetch(WINDOW *win)
|
||||
/* translate mouse clicks in the slk area to function
|
||||
keys */
|
||||
|
||||
if (key == KEY_MOUSE)
|
||||
if (key == KEY_MOUSE && SP->key_code)
|
||||
{
|
||||
int fn = PDC_mouse_in_slk(pdc_mouse_status.y,
|
||||
pdc_mouse_status.x);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "pdcwin.h"
|
||||
|
||||
RCSID("$Id: pdckbd.c,v 1.75 2006/11/12 20:38:00 wmcbrine Exp $");
|
||||
RCSID("$Id: pdckbd.c,v 1.76 2006/11/12 20:54:07 wmcbrine Exp $");
|
||||
|
||||
#define ACTUAL_MOUSE_MOVED (actual_mouse_status.changes & 8)
|
||||
#define ACTUAL_BUTTON_STATUS(x) (actual_mouse_status.button[(x) - 1])
|
||||
@@ -699,6 +699,7 @@ int PDC_get_bios_key(void)
|
||||
the user. Save it in the pdc_mouse_status structure. */
|
||||
|
||||
pdc_mouse_status = temp_mouse_status;
|
||||
SP->key_code = TRUE;
|
||||
|
||||
return KEY_MOUSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user