Commit ddb21104 authored by deuce's avatar deuce
Browse files

Add UIFC_NHM (No Hide Mouse) which disables hiding the mouse during ulist

(and other) operations.  This should allow fixing the mouse flickering in
SyncTERM on Nokia N800/N900 devices.

I can't remember why the mouse pointer is turned off to be honest...
parent 2952f846
......@@ -104,6 +104,7 @@
#define UIFC_IBM (1<<4) /* Force use of IBM charset */
#define UIFC_NOCTRL (1<<5) /* Don't allow useage of CTRL keys for movement
* etc in menus (Still available in text boxes) */
#define UIFC_NHM (1<<6) /* Don't hide the mouse pointer */
/*******************************/
/* Bits in uifcapi_t.list mode */
......
......@@ -530,7 +530,8 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
}
title=strdup(initial_title==NULL?"":initial_title);
uifc_mouse_disable();
if(!(api->mode&UIFC_NHM))
uifc_mouse_disable();
title_len=strlen(title);
......@@ -669,7 +670,8 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
cprintf("UIFC line %d: error allocating %u bytes."
,__LINE__,(width+3)*(height+2)*2);
free(title);
uifc_mouse_enable();
if(!(api->mode&UIFC_NHM))
uifc_mouse_enable();
return(-1);
}
gettext(s_left+left,s_top+top,s_left+left+width+1
......@@ -693,7 +695,8 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
cprintf("UIFC line %d: error allocating %u bytes."
,__LINE__,(width+3)*(height+2)*2);
free(title);
uifc_mouse_enable();
if(!(api->mode&UIFC_NHM))
uifc_mouse_enable();
return(-1);
}
gettext(s_left+left,s_top+top,s_left+left+width+1
......@@ -953,7 +956,8 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
last_menu_cur=cur;
last_menu_bar=bar;
uifc_mouse_enable();
if(!(api->mode&UIFC_NHM))
uifc_mouse_enable();
if(mode&WIN_IMM) {
return(-2);
......@@ -1000,7 +1004,8 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
if(mode&WIN_SAV)
api->savnum++;
if(mode&WIN_ACT) {
uifc_mouse_disable();
if(!(api->mode&UIFC_NHM))
uifc_mouse_disable();
if((win=(char *)alloca((width+3)*(height+2)*2))==NULL) {
cprintf("UIFC line %d: error allocating %u bytes."
,__LINE__,(width+3)*(height+2)*2);
......@@ -1016,15 +1021,18 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
puttext(s_left+left,s_top+top,s_left
+left+width-1,s_top+top+height-1,win);
uifc_mouse_enable();
if(!(api->mode&UIFC_NHM))
uifc_mouse_enable();
}
else if(mode&WIN_SAV) {
api->savnum--;
uifc_mouse_disable();
if(!(api->mode&UIFC_NHM))
uifc_mouse_disable();
puttext(sav[api->savnum].left,sav[api->savnum].top
,sav[api->savnum].right,sav[api->savnum].bot
,sav[api->savnum].buf);
uifc_mouse_enable();
if(!(api->mode&UIFC_NHM))
uifc_mouse_enable();
FREE_AND_NULL(sav[api->savnum].buf);
}
if(mode&WIN_XTR && (*cur)==opts-1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment