[GB.NCURSES]
* BUG: Reset the "watched fd" variable when a watch ends. git-svn-id: svn://localhost/gambas/trunk@6135 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
aadf50a477
commit
f24c9c7f3a
2 changed files with 3 additions and 8 deletions
|
@ -63,11 +63,11 @@ static void INPUT_watch(int fd)
|
||||||
|
|
||||||
if (_watch_fd != -1)
|
if (_watch_fd != -1)
|
||||||
GB.Watch(_watch_fd, GB_WATCH_NONE, NULL, 0);
|
GB.Watch(_watch_fd, GB_WATCH_NONE, NULL, 0);
|
||||||
if (fd == -1)
|
_watch_fd = fd;
|
||||||
|
if (_watch_fd == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GB.Watch(fd, GB_WATCH_READ, INPUT_callback, 0);
|
GB.Watch(_watch_fd, GB_WATCH_READ, INPUT_callback, 0);
|
||||||
_watch_fd = fd;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void INPUT_callback(int fd, int flag, intptr_t arg)
|
static void INPUT_callback(int fd, int flag, intptr_t arg)
|
||||||
|
|
|
@ -539,11 +539,6 @@ BEGIN_PROPERTY(Window_Attributes)
|
||||||
attr_t attr;
|
attr_t attr;
|
||||||
short pair;
|
short pair;
|
||||||
|
|
||||||
/* XXX: My ncurses header produces a GCC warning here
|
|
||||||
* because apparently wattr_get() is macro which does a
|
|
||||||
* NULL pointer check on its arguments of which two lay
|
|
||||||
* on the stack. So GCC correctly detects the non-
|
|
||||||
* necessity of that check. */
|
|
||||||
wattr_get(THIS->content, &attr, &pair, NULL);
|
wattr_get(THIS->content, &attr, &pair, NULL);
|
||||||
GB.ReturnInteger(attr);
|
GB.ReturnInteger(attr);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue