diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index a24841971..4be121ac4 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -134,7 +134,10 @@ InitInput(int argc, char *argv[]) mieqInit(); - SetNotifyFd(XConnectionNumber(xnestDisplay), xnestNotifyConnection, X_NOTIFY_READ, NULL); + SetNotifyFd(xcb_get_file_descriptor(xnestUpstreamInfo.conn), + xnestNotifyConnection, + X_NOTIFY_READ, + NULL); RegisterBlockAndWakeupHandlers(xnestBlockHandler, xnestWakeupHandler, NULL); }