mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-29 01:42:32 +01:00
Fixed a bug in input event handling.
This commit is contained in:
@@ -22,6 +22,9 @@ changes since wmaker 0.61.1:
|
|||||||
item that is beyond the total number of items present in the popup button.
|
item that is beyond the total number of items present in the popup button.
|
||||||
- changed names of functions for SplitView to be consistent. Some contained
|
- changed names of functions for SplitView to be consistent. Some contained
|
||||||
SubView while other Subview. Now all have Subview.
|
SubView while other Subview. Now all have Subview.
|
||||||
|
- fixed a bug in how input events were posted. Establishing 2 or more input
|
||||||
|
handlers for the same file descriptor, handling different (read/write/except)
|
||||||
|
events, caused wrong handlers to be called.
|
||||||
|
|
||||||
changes since wmaker 0.61.0:
|
changes since wmaker 0.61.0:
|
||||||
............................
|
............................
|
||||||
|
|||||||
@@ -796,14 +796,17 @@ W_WaitForEvent(Display *dpy, unsigned long xeventmask)
|
|||||||
|
|
||||||
mask = 0;
|
mask = 0;
|
||||||
|
|
||||||
if (fds[k].revents & (POLLIN|POLLRDNORM|POLLRDBAND|POLLPRI))
|
if ((handler->mask & WIReadMask) &&
|
||||||
mask |= WIReadMask;
|
fds[k].revents & (POLLIN|POLLRDNORM|POLLRDBAND|POLLPRI))
|
||||||
|
mask |= WIReadMask;
|
||||||
if (fds[k].revents & (POLLOUT | POLLWRBAND))
|
|
||||||
mask |= WIWriteMask;
|
if ((handler->mask & WIWriteMask) &&
|
||||||
|
fds[k].revents & (POLLOUT | POLLWRBAND))
|
||||||
if (fds[k].revents & (POLLHUP | POLLNVAL | POLLERR))
|
mask |= WIWriteMask;
|
||||||
mask |= WIExceptMask;
|
|
||||||
|
if ((handler->mask & WIExceptMask) &&
|
||||||
|
fds[k].revents & (POLLHUP | POLLNVAL | POLLERR))
|
||||||
|
mask |= WIExceptMask;
|
||||||
|
|
||||||
next = handler->next;
|
next = handler->next;
|
||||||
|
|
||||||
@@ -890,13 +893,13 @@ W_WaitForEvent(Display *dpy, unsigned long xeventmask)
|
|||||||
|
|
||||||
mask = 0;
|
mask = 0;
|
||||||
|
|
||||||
if (FD_ISSET(handler->fd, &rset))
|
if ((handler->mask & WIReadMask) && FD_ISSET(handler->fd, &rset))
|
||||||
mask |= WIReadMask;
|
mask |= WIReadMask;
|
||||||
|
|
||||||
if (FD_ISSET(handler->fd, &wset))
|
if ((handler->mask & WIWriteMask) && FD_ISSET(handler->fd, &wset))
|
||||||
mask |= WIWriteMask;
|
mask |= WIWriteMask;
|
||||||
|
|
||||||
if (FD_ISSET(handler->fd, &eset))
|
if ((handler->mask & WIExceptMask) && FD_ISSET(handler->fd, &eset))
|
||||||
mask |= WIExceptMask;
|
mask |= WIExceptMask;
|
||||||
|
|
||||||
next = handler->next;
|
next = handler->next;
|
||||||
|
|||||||
@@ -442,14 +442,17 @@ handleInputEvents(Bool waitForInput)
|
|||||||
|
|
||||||
mask = 0;
|
mask = 0;
|
||||||
|
|
||||||
if (fds[k].revents & (POLLIN|POLLRDNORM|POLLRDBAND|POLLPRI))
|
if ((handler->mask & WIReadMask) &&
|
||||||
mask |= WIReadMask;
|
fds[k].revents & (POLLIN|POLLRDNORM|POLLRDBAND|POLLPRI))
|
||||||
|
mask |= WIReadMask;
|
||||||
|
|
||||||
if (fds[k].revents & (POLLOUT | POLLWRBAND))
|
if ((handler->mask & WIWriteMask) &&
|
||||||
mask |= WIWriteMask;
|
fds[k].revents & (POLLOUT | POLLWRBAND))
|
||||||
|
mask |= WIWriteMask;
|
||||||
|
|
||||||
if (fds[k].revents & (POLLHUP | POLLNVAL | POLLERR))
|
if ((handler->mask & WIExceptMask) &&
|
||||||
mask |= WIExceptMask;
|
fds[k].revents & (POLLHUP | POLLNVAL | POLLERR))
|
||||||
|
mask |= WIExceptMask;
|
||||||
|
|
||||||
next = handler->next;
|
next = handler->next;
|
||||||
|
|
||||||
@@ -531,13 +534,13 @@ handleInputEvents(Bool waitForInput)
|
|||||||
|
|
||||||
mask = 0;
|
mask = 0;
|
||||||
|
|
||||||
if (FD_ISSET(handler->fd, &rset))
|
if ((handler->mask & WIReadMask) && FD_ISSET(handler->fd, &rset))
|
||||||
mask |= WIReadMask;
|
mask |= WIReadMask;
|
||||||
|
|
||||||
if (FD_ISSET(handler->fd, &wset))
|
if ((handler->mask & WIWriteMask) && FD_ISSET(handler->fd, &wset))
|
||||||
mask |= WIWriteMask;
|
mask |= WIWriteMask;
|
||||||
|
|
||||||
if (FD_ISSET(handler->fd, &eset))
|
if ((handler->mask & WIExceptMask) && FD_ISSET(handler->fd, &eset))
|
||||||
mask |= WIExceptMask;
|
mask |= WIExceptMask;
|
||||||
|
|
||||||
next = handler->next;
|
next = handler->next;
|
||||||
|
|||||||
Reference in New Issue
Block a user