summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-12-07 15:11:33 -0800
committerAdam Jackson <ajax@redhat.com>2016-07-18 15:25:59 -0400
commit55c2e1a3aa587c58a74066724e11e30b3df267b8 (patch)
tree21c6d1d27020314d701f6452b3d3370b3bee2d03
parent24e65bf0db57bf4ac70386c0a0e8275b73edd2fb (diff)
xnest: Use SetNotifyFd to receive events
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--hw/xnest/Init.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c
index bec2c5198..e8a700e88 100644
--- a/hw/xnest/Init.c
+++ b/hw/xnest/Init.c
@@ -35,6 +35,7 @@ is" without express or implied warranty.
#include "Pointer.h"
#include "Keyboard.h"
#include "Handlers.h"
+#include "Events.h"
#include "Init.h"
#include "Args.h"
#include "Drawable.h"
@@ -86,6 +87,12 @@ InitOutput(ScreenInfo * screen_info, int argc, char *argv[])
xnestDoFullGeneration = xnestFullGeneration;
}
+static void
+xnestNotifyConnection(int fd, int ready, void *data)
+{
+ xnestCollectEvents();
+}
+
void
InitInput(int argc, char *argv[])
{
@@ -101,7 +108,7 @@ InitInput(int argc, char *argv[])
mieqInit();
- AddEnabledDevice(XConnectionNumber(xnestDisplay));
+ SetNotifyFd(XConnectionNumber(xnestDisplay), xnestNotifyConnection, X_NOTIFY_READ, NULL);
RegisterBlockAndWakeupHandlers(xnestBlockHandler, xnestWakeupHandler, NULL);
}