Skip to content
Snippets Groups Projects
Commit ab9da248 authored by deuce's avatar deuce
Browse files

Fix K_DEUCEEXIT (Was defined the same as K_DECIMAL!) and define its

behavious better.
Add WIN_UNGETMOUSE which, when the mouse is clicked outside the window
ungets the mouse event and returns -2-WINMOUSE
parent c3fbdc07
No related branches found
No related tags found
No related merge requests found
......@@ -191,6 +191,8 @@
* Return value is -2 - keyvalue */
#define WIN_NOBRDR (1<<24) /* Do not draw a border around the window */
#define WIN_FIXEDHEIGHT (1<<25) /* Use list_height from uifc struct */
#define WIN_UNGETMOUSE (1<<26) /* If the mouse is clicked outside the window, */
/* Put the mouse event back into the event queue */
#define WIN_MID WIN_L2R|WIN_T2B /* Place window in middle of screen */
......@@ -213,8 +215,8 @@
#define K_SCANNING (1L<<11) /* UPC Scanner is active... return on '%' */
#define K_TABEXIT (1L<<12) /* Return on TAB or BACKTAB */
#define K_DECIMAL (1L<<13) /* Allow floating point numbers only */
#define K_DEUCEEXIT (1L<<13) /* Return whenever Deuce wants to exit */
/* Define this behaviour better - ToDo */
#define K_DEUCEEXIT (1L<<14) /* Return whenever Deuce wants to exit */
/* Returns on up/down/F2 */
#define HELPBUF_SIZE 4000
......
......@@ -957,10 +957,16 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
|| mevnt.starty<s_top+top
|| mevnt.starty>s_top+top+height-1)
&& (mevnt.event==CIOLIB_BUTTON_1_CLICK
|| mevnt.event==CIOLIB_BUTTON_3_CLICK))
|| mevnt.event==CIOLIB_BUTTON_3_CLICK)) {
if(mode&WIN_UNGETMOUSE) {
ungetmouse(mevnt);
}
else {
i=ESC;
}
}
}
}
/* For compatibility with terminals lacking special keys */
switch(i) {
case '\b':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment