mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
kdrive: make mouse driver Init() and Enable() funcs bool
They're similar to the keyboard driver's ones, and those already using Bool, so it's more consistent using Bool here, too. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt, metux IT consult .
parent
7ef19de104
commit
528ad3e771
@@ -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
|
||||
|
||||
@@ -26,8 +26,10 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include <X11/Xos.h>
|
||||
|
||||
#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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user