diff --git a/src/uifc/uifc.h b/src/uifc/uifc.h index e95139c0537d7c753c98ad2dad0cd4d62fe44cda..8dec74270216ae8e3eb3dd101252ed250f24bb48 100644 --- a/src/uifc/uifc.h +++ b/src/uifc/uifc.h @@ -165,6 +165,7 @@ #define WIN_LEFTKEY (1LL<<32) /* Display left-arrow-key support indicator */ #define WIN_RIGHTKEY (1LL<<33) /* Display right-arrow-key support indicator */ #define WIN_BLANKOPTS (1LL<<34) /* Blank options are allowed (terminate list on NULL only) */ +#define WIN_ATEXIT (1LL<<35) /* Do not exit this because UIFC_XF_QUIT is set - for non-exiting menus */ #define WIN_MID WIN_L2R|WIN_T2B /* Place window in middle of screen */ #define WIN_GET WIN_COPY diff --git a/src/uifc/uifc32.c b/src/uifc/uifc32.c index c1c7058e9c34ea270ad02d298342022b11ca2b8a..d969e1b2b54ffabfbdc9153d0ec90013642b2fef 100644 --- a/src/uifc/uifc32.c +++ b/src/uifc/uifc32.c @@ -1145,8 +1145,8 @@ int ulist(uifc_winmode_t mode, int left, int top, int width, int *cur, int *bar gotkey=0; textattr(((api->lbclr)&0x0f)|((api->lbclr >> 4)&0x0f)); gotoxy(s_left+lbrdrwidth+2+left, s_top+y); - if((api->exit_flags & UIFC_XF_QUIT) || dyn_kbwait(mode) || (mode&(WIN_POP|WIN_SEL))) { - if(api->exit_flags & UIFC_XF_QUIT) + if(((api->exit_flags & UIFC_XF_QUIT) && !(mode & WIN_ATEXIT)) || dyn_kbwait(mode) || (mode&(WIN_POP|WIN_SEL))) { + if((api->exit_flags & UIFC_XF_QUIT) && !(mode & WIN_ATEXIT)) gotkey = CIO_KEY_QUIT; else if(mode&WIN_POP) gotkey=ESC;