diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2016-12-19 10:51:09 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2016-12-19 17:28:20 +0100 |
commit | bfb724076d575d5a49d08913b86885688251a176 (patch) | |
tree | 25ed469582df837f7766e9abe72d9b79df4975b6 | |
parent | 009776a8a3fb096b11ec95033d1e1a366e26f188 (diff) |
Remove unused 'event_mask' field
With the Xorg 1.19 codepaths, the 'event_mask' field of SpiceWatch is
only useful for sanity checking the event we get from Xorg. This commit
assumes Xorg is sane, and removes this extra field.
-rw-r--r-- | src/spiceqxl_main_loop.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/spiceqxl_main_loop.c b/src/spiceqxl_main_loop.c index 0213693..86dcad3 100644 --- a/src/spiceqxl_main_loop.c +++ b/src/spiceqxl_main_loop.c @@ -338,7 +338,6 @@ static void xspice_wakeup_handler(pointer data, int nfds, pointer readmask) struct SpiceWatch { int fd; - int event_mask; SpiceWatchFunc func; void *opaque; }; @@ -347,11 +346,11 @@ static void watch_fd_notified(int fd, int xevents, void *data) { SpiceWatch *watch = (SpiceWatch *)data; - if ((watch->event_mask & SPICE_WATCH_EVENT_READ) && (xevents & X_NOTIFY_READ)) { + if (xevents & X_NOTIFY_READ) { watch->func(watch->fd, SPICE_WATCH_EVENT_READ, watch->opaque); } - if ((watch->event_mask & SPICE_WATCH_EVENT_WRITE) && (xevents & X_NOTIFY_WRITE)) { + if (xevents & X_NOTIFY_WRITE) { watch->func(watch->fd, SPICE_WATCH_EVENT_WRITE, watch->opaque); } } @@ -361,7 +360,6 @@ static int watch_update_mask_internal(SpiceWatch *watch, int event_mask) int x_event_mask = 0; SetNotifyFd(watch->fd, NULL, X_NOTIFY_NONE, NULL); - watch->event_mask = 0; if (event_mask & SPICE_WATCH_EVENT_READ) { x_event_mask |= X_NOTIFY_READ; @@ -374,7 +372,6 @@ static int watch_update_mask_internal(SpiceWatch *watch, int event_mask) return -1; } SetNotifyFd(watch->fd, watch_fd_notified, x_event_mask, watch); - watch->event_mask = event_mask; return 0; } |