The problem was that if we ever switched to another tty while running
Weston, then we would essentially not handle any remaining events and Weston
would enter an infinite loop where it's trying to process an event but it
can't because the processing function evdev_device_data exits before it can
read anything from the queue. With this fix, we read whatever is in the
queue, but not process it any further. 

---
 src/evdev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index 9289b1c..70d3c52 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -372,8 +372,6 @@ evdev_device_data(int fd, uint32_t mask, void *data)
      int len;
 
      ec = device->seat->compositor;
-     if (!ec->focus)
-           return 1;
 
      /* If the compositor is repainting, this function is called only once
       * per frame and we have to process all the events available on the
@@ -391,7 +389,8 @@ evdev_device_data(int fd, uint32_t mask, void *data)
                  return 1;
            }
 
-           evdev_process_events(device, ev, len / sizeof ev[0]);
+           if (ec->focus)
+                 evdev_process_events(device, ev, len / sizeof ev[0]);
 
      } while (len > 0);
 
-- 
1.7.11.4

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to