Bunch of DMX warning fixes
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
493d992501
commit
c85e26d599
|
@ -98,10 +98,10 @@ static XtResource resources[] = {
|
||||||
{XtNcallback, XtCCallback, XtRCallback,
|
{XtNcallback, XtCCallback, XtRCallback,
|
||||||
sizeof(XtCallbackList), offset(input_callback), XtRCallback, NULL}
|
sizeof(XtCallbackList), offset(input_callback), XtRCallback, NULL}
|
||||||
,
|
,
|
||||||
{XtNcanvasExposeCallback, XtCcanvasExposeCallback, XtRCallback,
|
{(char *) XtNcanvasExposeCallback, (char *) XtCcanvasExposeCallback, XtRCallback,
|
||||||
sizeof(XtCallbackList), offset(expose_callback), XtRCallback, NULL}
|
sizeof(XtCallbackList), offset(expose_callback), XtRCallback, NULL}
|
||||||
,
|
,
|
||||||
{XtNcanvasResizeCallback, XtCcanvasResizeCallback, XtRCallback,
|
{(char *) XtNcanvasResizeCallback, (char *) XtCcanvasResizeCallback, XtRCallback,
|
||||||
sizeof(XtCallbackList), offset(resize_callback), XtRCallback, NULL}
|
sizeof(XtCallbackList), offset(resize_callback), XtRCallback, NULL}
|
||||||
,
|
,
|
||||||
};
|
};
|
||||||
|
@ -109,7 +109,7 @@ static XtResource resources[] = {
|
||||||
#undef offset
|
#undef offset
|
||||||
|
|
||||||
static XtActionsRec actions[] = {
|
static XtActionsRec actions[] = {
|
||||||
{"canvas", CanvasAction},
|
{(char *) "canvas", CanvasAction},
|
||||||
};
|
};
|
||||||
|
|
||||||
static char translations[] = "<Key>: canvas()\n\
|
static char translations[] = "<Key>: canvas()\n\
|
||||||
|
@ -123,7 +123,7 @@ CanvasClassRec canvasClassRec = {
|
||||||
/* core */
|
/* core */
|
||||||
{
|
{
|
||||||
(WidgetClass) Superclass, /* superclass */
|
(WidgetClass) Superclass, /* superclass */
|
||||||
"Canvas", /* class_name */
|
(char *) "Canvas", /* class_name */
|
||||||
sizeof(CanvasRec), /* widget_size */
|
sizeof(CanvasRec), /* widget_size */
|
||||||
NULL, /* class_initialize */
|
NULL, /* class_initialize */
|
||||||
NULL, /* class_part_initialize */
|
NULL, /* class_part_initialize */
|
||||||
|
|
|
@ -974,9 +974,9 @@ main(int argc, char **argv)
|
||||||
const char *canvastrans =
|
const char *canvastrans =
|
||||||
"<Btn3Down>: placeMenu() XtMenuPopup(buttonpopup)";
|
"<Btn3Down>: placeMenu() XtMenuPopup(buttonpopup)";
|
||||||
XtActionsRec actiontable[] = {
|
XtActionsRec actiontable[] = {
|
||||||
{"openOk", dmxConfigOkAction},
|
{(char *) "openOk", dmxConfigOkAction},
|
||||||
{"placeMenu", dmxConfigPlaceMenu},
|
{(char *) "placeMenu", dmxConfigPlaceMenu},
|
||||||
{"noop", NULL}
|
{(char *) "noop", NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
dmxConfigFilename = XtNewString((argc >= 2) ? argv[1] : "");
|
dmxConfigFilename = XtNewString((argc >= 2) ? argv[1] : "");
|
||||||
|
|
|
@ -118,17 +118,6 @@ typedef XID KeySym64;
|
||||||
#undef KeySym
|
#undef KeySym
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* These are in exglobals.h, but that conflicts with xkbsrv.h */
|
|
||||||
extern int ProximityIn;
|
|
||||||
extern int ProximityOut;
|
|
||||||
extern int DeviceValuator;
|
|
||||||
extern int DeviceMotionNotify;
|
|
||||||
extern int DeviceFocusIn;
|
|
||||||
extern int DeviceFocusOut;
|
|
||||||
extern int DeviceStateNotify;
|
|
||||||
extern int DeviceMappingNotify;
|
|
||||||
extern int ChangeDeviceNotify;
|
|
||||||
|
|
||||||
/* Some protocol gets included last, after undefines. */
|
/* Some protocol gets included last, after undefines. */
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
#include <X11/extensions/XKBproto.h>
|
#include <X11/extensions/XKBproto.h>
|
||||||
|
|
|
@ -339,7 +339,7 @@ dmxCommonOthOn(DevicePtr pDev)
|
||||||
if (!(priv->xi = XOpenDevice(priv->display, dmxLocal->deviceId))) {
|
if (!(priv->xi = XOpenDevice(priv->display, dmxLocal->deviceId))) {
|
||||||
dmxLog(dmxWarning, "Cannot open %s device (id=%d) on %s\n",
|
dmxLog(dmxWarning, "Cannot open %s device (id=%d) on %s\n",
|
||||||
dmxLocal->deviceName ? dmxLocal->deviceName : "(unknown)",
|
dmxLocal->deviceName ? dmxLocal->deviceName : "(unknown)",
|
||||||
dmxLocal->deviceId, dmxInput->name);
|
(int) dmxLocal->deviceId, dmxInput->name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
ADD(DeviceKeyPress);
|
ADD(DeviceKeyPress);
|
||||||
|
|
|
@ -825,8 +825,8 @@ dmxConsoleInit(DevicePtr pDev)
|
||||||
|
|
||||||
/* Set up properties */
|
/* Set up properties */
|
||||||
XStoreName(dpy, win, DMX_CONSOLE_NAME);
|
XStoreName(dpy, win, DMX_CONSOLE_NAME);
|
||||||
class_hints.res_name = DMX_RES_NAME;
|
class_hints.res_name = (char *) DMX_RES_NAME;
|
||||||
class_hints.res_class = DMX_RES_CLASS;
|
class_hints.res_class = (char *) DMX_RES_CLASS;
|
||||||
XSetClassHint(dpy, win, &class_hints);
|
XSetClassHint(dpy, win, &class_hints);
|
||||||
|
|
||||||
/* Map the window */
|
/* Map the window */
|
||||||
|
|
|
@ -701,7 +701,6 @@ dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
|
||||||
XEvent * e, DMXBlockType block)
|
XEvent * e, DMXBlockType block)
|
||||||
{
|
{
|
||||||
GETDMXINPUTFROMPDEV;
|
GETDMXINPUTFROMPDEV;
|
||||||
xEvent xE;
|
|
||||||
DeviceIntPtr p = dmxLocal->pDevice;
|
DeviceIntPtr p = dmxLocal->pDevice;
|
||||||
int valuators[3];
|
int valuators[3];
|
||||||
ValuatorMask mask;
|
ValuatorMask mask;
|
||||||
|
@ -716,7 +715,7 @@ dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
|
||||||
if (dmxCheckFunctionKeys(dmxLocal, type, keySym))
|
if (dmxCheckFunctionKeys(dmxLocal, type, keySym))
|
||||||
return;
|
return;
|
||||||
if (dmxLocal->sendsCore && dmxLocal != dmxLocalCoreKeyboard)
|
if (dmxLocal->sendsCore && dmxLocal != dmxLocalCoreKeyboard)
|
||||||
xE.u.u.detail = dmxFixup(pDev, detail, keySym);
|
detail = dmxFixup(pDev, detail, keySym);
|
||||||
|
|
||||||
/*ErrorF("KEY %d sym %d\n", detail, (int) keySym); */
|
/*ErrorF("KEY %d sym %d\n", detail, (int) keySym); */
|
||||||
QueueKeyboardEvents(p, type, detail, NULL);
|
QueueKeyboardEvents(p, type, detail, NULL);
|
||||||
|
|
|
@ -921,7 +921,7 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dmxLogInput(dmxInput, " %2d %-10.10s %-16.16s\n",
|
dmxLogInput(dmxInput, " %2d %-10.10s %-16.16s\n",
|
||||||
devices[i].id,
|
(int) devices[i].id,
|
||||||
devices[i].name ? devices[i].name : "", use);
|
devices[i].name ? devices[i].name : "", use);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -993,7 +993,6 @@ dmxInputLateReInit(DMXInputInfo * dmxInput)
|
||||||
void
|
void
|
||||||
dmxInputInit(DMXInputInfo * dmxInput)
|
dmxInputInit(DMXInputInfo * dmxInput)
|
||||||
{
|
{
|
||||||
DeviceIntPtr pPointer = NULL, pKeyboard = NULL;
|
|
||||||
dmxArg a;
|
dmxArg a;
|
||||||
const char *name;
|
const char *name;
|
||||||
int i;
|
int i;
|
||||||
|
@ -1108,12 +1107,6 @@ dmxInputInit(DMXInputInfo * dmxInput)
|
||||||
DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[i];
|
DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[i];
|
||||||
|
|
||||||
dmxLocal->pDevice = dmxAddDevice(dmxLocal);
|
dmxLocal->pDevice = dmxAddDevice(dmxLocal);
|
||||||
if (dmxLocal->isCore) {
|
|
||||||
if (dmxLocal->type == DMX_LOCAL_MOUSE)
|
|
||||||
pPointer = dmxLocal->pDevice;
|
|
||||||
if (dmxLocal->type == DMX_LOCAL_KEYBOARD)
|
|
||||||
pKeyboard = dmxLocal->pDevice;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dmxInput->processInputEvents = dmxProcessInputEvents;
|
dmxInput->processInputEvents = dmxProcessInputEvents;
|
||||||
|
@ -1136,7 +1129,7 @@ dmxInputFreeLocal(DMXLocalInputInfoRec * local)
|
||||||
local->destroy_private(local->private);
|
local->destroy_private(local->private);
|
||||||
free(local->history);
|
free(local->history);
|
||||||
free(local->valuators);
|
free(local->valuators);
|
||||||
free(local->deviceName);
|
free((void *) local->deviceName);
|
||||||
local->private = NULL;
|
local->private = NULL;
|
||||||
local->history = NULL;
|
local->history = NULL;
|
||||||
local->deviceName = NULL;
|
local->deviceName = NULL;
|
||||||
|
@ -1164,7 +1157,7 @@ dmxInputFree(DMXInputInfo * dmxInput)
|
||||||
dmxInput->devs = NULL;
|
dmxInput->devs = NULL;
|
||||||
dmxInput->numDevs = 0;
|
dmxInput->numDevs = 0;
|
||||||
if (dmxInput->freename)
|
if (dmxInput->freename)
|
||||||
free(dmxInput->name);
|
free((void *) dmxInput->name);
|
||||||
dmxInput->name = NULL;
|
dmxInput->name = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1218,7 +1211,7 @@ dmxInputLogDevices(void)
|
||||||
dmxLogCont(dmxInfo, "\t[i%d/%*.*s",
|
dmxLogCont(dmxInfo, "\t[i%d/%*.*s",
|
||||||
dmxInput->inputIdx, len, len, dmxInput->name);
|
dmxInput->inputIdx, len, len, dmxInput->name);
|
||||||
if (dmxInput->devs[i]->deviceId >= 0)
|
if (dmxInput->devs[i]->deviceId >= 0)
|
||||||
dmxLogCont(dmxInfo, "/id%d", dmxInput->devs[i]->deviceId);
|
dmxLogCont(dmxInfo, "/id%d", (int) dmxInput->devs[i]->deviceId);
|
||||||
if (dmxInput->devs[i]->deviceName)
|
if (dmxInput->devs[i]->deviceName)
|
||||||
dmxLogCont(dmxInfo, "=%s", dmxInput->devs[i]->deviceName);
|
dmxLogCont(dmxInfo, "=%s", dmxInput->devs[i]->deviceName);
|
||||||
dmxLogCont(dmxInfo, "] %s\n",
|
dmxLogCont(dmxInfo, "] %s\n",
|
||||||
|
|
Loading…
Reference in New Issue