diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index fd816b7cd..14c2fcff0 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -131,7 +131,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); }