From 7def2fea30060d47780dc1eedc91fada5ae1934f Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Sequoia Date: Sat, 10 Sep 2016 23:37:46 -0700 Subject: [PATCH] Xquartz: Update for removal of AddEnabledDevice and RemoveEnabledDevice Regressed-in: be5a513fee6cbf29ef7570e57eb0436d70fbd88c Signed-off-by: Jeremy Huddleston Sequoia --- hw/xquartz/darwin.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index 340343672..c0d0b8a19 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -303,6 +303,11 @@ DarwinScreenInit(ScreenPtr pScreen, int argc, char **argv) ============================================================================= */ +static void +DarwinInputHandlerNotify(int fd __unused, int ready __unused, void *data __unused) +{ +} + /* * DarwinMouseProc: Handle the initialization, etc. of a mouse */ @@ -362,13 +367,13 @@ DarwinMouseProc(DeviceIntPtr pPointer, int what) case DEVICE_ON: pPointer->public.on = TRUE; - AddEnabledDevice(darwinEventReadFD); + SetNotifyFd(darwinEventReadFD, DarwinInputHandlerNotify, X_NOTIFY_READ, NULL); return Success; case DEVICE_CLOSE: case DEVICE_OFF: pPointer->public.on = FALSE; - RemoveEnabledDevice(darwinEventReadFD); + RemoveNotifyFd(darwinEventReadFD); return Success; } @@ -431,13 +436,13 @@ DarwinTabletProc(DeviceIntPtr pPointer, int what) case DEVICE_ON: pPointer->public.on = TRUE; - AddEnabledDevice(darwinEventReadFD); + SetNotifyFd(darwinEventReadFD, DarwinInputHandlerNotify, X_NOTIFY_READ, NULL); return Success; case DEVICE_CLOSE: case DEVICE_OFF: pPointer->public.on = FALSE; - RemoveEnabledDevice(darwinEventReadFD); + RemoveNotifyFd(darwinEventReadFD); return Success; } return Success; @@ -459,12 +464,12 @@ DarwinKeybdProc(DeviceIntPtr pDev, int onoff) case DEVICE_ON: pDev->public.on = TRUE; - AddEnabledDevice(darwinEventReadFD); + SetNotifyFd(darwinEventReadFD, DarwinInputHandlerNotify, X_NOTIFY_READ, NULL); break; case DEVICE_OFF: pDev->public.on = FALSE; - RemoveEnabledDevice(darwinEventReadFD); + RemoveNotifyFd(darwinEventReadFD); break; case DEVICE_CLOSE: