mirror of https://gitee.com/openkylin/aalib.git
[PATCH] Gpm_GetEvent fix
Discussion in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506718 Patch by Bart Martens <bartm@debian.org>. Gbp-Pq: Name 0010-Gpm_GetEvent-fix.patch
This commit is contained in:
parent
0805c473c5
commit
b9c333b063
|
@ -76,6 +76,7 @@ static int slang_getchar(aa_context * c1, int wait)
|
|||
#endif
|
||||
struct timeval tv;
|
||||
fd_set readfds;
|
||||
int evflag;
|
||||
|
||||
if (wait) {
|
||||
setjmp(buf);
|
||||
|
@ -124,7 +125,10 @@ static int slang_getchar(aa_context * c1, int wait)
|
|||
return (AA_NONE);
|
||||
}
|
||||
if ((gpm_fd > -1) && (FD_ISSET(gpm_fd, &readfds))) {
|
||||
if (Gpm_GetEvent(&ev) && gpm_handler
|
||||
evflag = Gpm_GetEvent(&ev);
|
||||
if ( evflag < 0 )
|
||||
return AA_NONE;
|
||||
if ( evflag == 1 && gpm_handler
|
||||
&& ((*gpm_handler) (&ev, gpm_data))) {
|
||||
gpm_hflag = 1;
|
||||
return AA_MOUSE;
|
||||
|
|
Loading…
Reference in New Issue