diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 2ba0b4597..8e6b55b41 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -1262,7 +1262,7 @@ ephyrPutColors(ScreenPtr pScreen, int n, xColorItem * pdefs) /* Mouse calls */ -static Status +static Bool MouseInit(KdPointerInfo * pi) { pi->driverPrivate = (EphyrPointerPrivate *) @@ -1281,15 +1281,15 @@ MouseInit(KdPointerInfo * pi) pi->transformCoordinates = TRUE; ephyrMouse = pi; - return Success; + return TRUE; } -static Status +static Bool MouseEnable(KdPointerInfo * pi) { ((EphyrPointerPrivate *) pi->driverPrivate)->enabled = TRUE; SetNotifyFd(hostx_get_fd(), ephyrXcbNotify, X_NOTIFY_READ, NULL); - return Success; + return TRUE; } static void diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index 432f89140..17ae54bcb 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -26,8 +26,10 @@ #include #include #include +#include #include #include + #include "scrnintstr.h" #include "pixmapstr.h" #include "windowstr.h" @@ -169,8 +171,8 @@ typedef struct _KdPointerInfo KdPointerInfo; typedef struct _KdPointerDriver { const char *name; - Status(*Init) (KdPointerInfo *); - Status(*Enable) (KdPointerInfo *); + Bool (*Init) (KdPointerInfo *); + Bool (*Enable) (KdPointerInfo *); void (*Disable) (KdPointerInfo *); void (*Fini) (KdPointerInfo *); struct _KdPointerDriver *next; diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 4d81bfd28..70ad4ab60 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -237,9 +237,8 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) return BadImplementation; } - if ((*pi->driver->Init) (pi) != Success) { + if (!(pi->driver->Init(pi))) return BadRequest; - } btn_labels = calloc(pi->nButtons, sizeof(Atom)); if (!btn_labels) @@ -303,7 +302,7 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) return BadImplementation; } - if ((*pi->driver->Enable) (pi) == Success) { + if (pi->driver->Enable(pi)) { pDev->on = TRUE; return Success; }