diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index b2b5f7be2..cd42e1bff 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -133,7 +133,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); }