summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-01-20 21:21:21 -0800
committerKeith Packard <keithp@keithp.com>2011-01-20 21:21:21 -0800
commitbe3be7580b6f6fd2f7fa4d4abfe5e1ab19470223 (patch)
tree0816df2f9a280cd05e5279ca4b66b7fde57cd713 /hw
parent57a1d9b85331f6fe19d5111f5163139572ffbf02 (diff)
parenta1d885fdd67503a442b348626d2eddf6d22419e8 (diff)
Merge remote branch 'ajax/for-keithp'
Diffstat (limited to 'hw')
-rw-r--r--hw/dmx/config/xdmxconfig.c2
-rw-r--r--hw/dmx/dmxextension.c18
-rw-r--r--hw/dmx/dmxgc.c7
-rw-r--r--hw/dmx/input/dmxinputinit.c40
4 files changed, 16 insertions, 51 deletions
diff --git a/hw/dmx/config/xdmxconfig.c b/hw/dmx/config/xdmxconfig.c
index 033b52512..c67077aec 100644
--- a/hw/dmx/config/xdmxconfig.c
+++ b/hw/dmx/config/xdmxconfig.c
@@ -142,7 +142,7 @@ static void dmxConfigGetDims(int *maxWidth, int *maxHeight)
DMXConfigEntryPtr e;
*maxWidth = dmxConfigWallWidth = 0;
- *maxWidth = dmxConfigWallHeight = 0;
+ *maxHeight = dmxConfigWallHeight = 0;
if (!dmxConfigCurrent) return;
dmxConfigWallWidth = dmxConfigCurrent->width;
diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c
index 45cb3db93..bd326ce2a 100644
--- a/hw/dmx/dmxextension.c
+++ b/hw/dmx/dmxextension.c
@@ -855,7 +855,7 @@ static void dmxBERestorePixmap(PixmapPtr pPixmap)
static void dmxBECreateResources(pointer value, XID id, RESTYPE type,
pointer n)
{
- int scrnNum = (int)n;
+ int scrnNum = (uintptr_t)n;
ScreenPtr pScreen = screenInfo.screens[scrnNum];
if ((type & TypeMask) == (RT_WINDOW & TypeMask)) {
@@ -1059,7 +1059,7 @@ static void dmxBERestoreRenderPict(pointer value, XID id, pointer n)
{
PicturePtr pPicture = value; /* The picture */
DrawablePtr pDraw = pPicture->pDrawable; /* The picture's drawable */
- int scrnNum = (int)n;
+ int scrnNum = (uintptr_t)n;
if (pDraw->pScreen->myNum != scrnNum) {
/* Picture not on the screen we are restoring*/
@@ -1081,7 +1081,7 @@ static void dmxBERestoreRenderPict(pointer value, XID id, pointer n)
static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n)
{
GlyphSetPtr glyphSet = value;
- int scrnNum = (int)n;
+ int scrnNum = (uintptr_t)n;
dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
DMXScreenInfo *dmxScreen = &dmxScreens[scrnNum];
GlyphRefPtr table;
@@ -1274,7 +1274,7 @@ int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr)
for (i = currentMaxClients; --i >= 0; )
if (clients[i])
FindAllClientResources(clients[i], dmxBECreateResources,
- (pointer)idx);
+ (pointer)(uintptr_t)idx);
/* Create window hierarchy (top down) */
dmxBECreateWindowTree(idx);
@@ -1283,13 +1283,15 @@ int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr)
for (i = currentMaxClients; --i >= 0; )
if (clients[i])
FindClientResourcesByType(clients[i],PictureType,
- dmxBERestoreRenderPict,(pointer)idx);
+ dmxBERestoreRenderPict,
+ (pointer)(uintptr_t)idx);
/* Restore the glyph state for RENDER */
for (i = currentMaxClients; --i >= 0; )
if (clients[i])
FindClientResourcesByType(clients[i],GlyphSetType,
- dmxBERestoreRenderGlyph,(pointer)idx);
+ dmxBERestoreRenderGlyph,
+ (pointer)(uintptr_t)idx);
/* Refresh screen by generating exposure events for all windows */
dmxForceExposures(idx);
@@ -1453,7 +1455,7 @@ static void dmxBESavePixmap(PixmapPtr pPixmap)
static void dmxBEDestroyResources(pointer value, XID id, RESTYPE type,
pointer n)
{
- int scrnNum = (int)n;
+ int scrnNum = (uintptr_t)n;
ScreenPtr pScreen = screenInfo.screens[scrnNum];
if ((type & TypeMask) == (RT_WINDOW & TypeMask)) {
@@ -1596,7 +1598,7 @@ int dmxDetachScreen(int idx)
for (i = currentMaxClients; --i >= 0; )
if (clients[i])
FindAllClientResources(clients[i], dmxBEDestroyResources,
- (pointer)idx);
+ (pointer)(uintptr_t)idx);
/* Free scratch GCs */
dmxBEDestroyScratchGCs(idx);
diff --git a/hw/dmx/dmxgc.c b/hw/dmx/dmxgc.c
index 829200e6a..f10f9a074 100644
--- a/hw/dmx/dmxgc.c
+++ b/hw/dmx/dmxgc.c
@@ -383,12 +383,7 @@ void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects)
break;
case CT_PIXMAP:
- case CT_UNSORTED:
- case CT_YSORTED:
- case CT_YXSORTED:
- case CT_YXBANDED:
- /* These clip types are condensed down to either NONE or REGION
- in the mi code */
+ /* Condensed down to REGION in the mi code */
break;
}
diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index 7cac86f79..5cbd620c9 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -132,14 +132,6 @@ static DMXLocalInputInfoRec DMXConsoleKbd = {
NULL, dmxCommonKbdCtrl, dmxCommonKbdBell
};
-static DMXLocalInputInfoRec DMXCommonOth = {
- "common-oth", DMX_LOCAL_OTHER, DMX_LOCAL_TYPE_COMMON, 1,
- dmxCommonCopyPrivate, NULL,
- NULL, NULL, NULL, dmxCommonOthGetInfo,
- dmxCommonOthOn, dmxCommonOthOff
-};
-
-
static DMXLocalInputInfoRec DMXLocalDevices[] = {
/* Dummy drivers that can compile on any OS */
#ifdef __linux__
@@ -615,7 +607,7 @@ static void dmxCollectAll(DMXInputInfo *dmxInput)
static void dmxBlockHandler(pointer blockData, OSTimePtr pTimeout,
pointer pReadMask)
{
- DMXInputInfo *dmxInput = &dmxInputs[(int)blockData];
+ DMXInputInfo *dmxInput = &dmxInputs[(uintptr_t)blockData];
static unsigned long generation = 0;
if (generation != serverGeneration) {
@@ -642,7 +634,7 @@ static void dmxSwitchReturn(pointer p)
static void dmxWakeupHandler(pointer blockData, int result, pointer pReadMask)
{
- DMXInputInfo *dmxInput = &dmxInputs[(int)blockData];
+ DMXInputInfo *dmxInput = &dmxInputs[(uintptr_t)blockData];
int i;
if (dmxInput->vt_switch_pending) {
@@ -897,29 +889,6 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI)
}
}
break;
-#if 0
- case IsXExtensionDevice:
- case IsXExtensionKeyboard:
- case IsXExtensionPointer:
- if (doXI) {
- if (!dmxInput->numDevs) {
- dmxLog(dmxWarning,
- "Cannot use remote (%s) XInput devices if"
- " not also using core devices\n",
- dmxInput->name);
- } else {
- dmxLocal = dmxInputCopyLocal(dmxInput,
- &DMXCommonOth);
- dmxLocal->isCore = FALSE;
- dmxLocal->sendsCore = FALSE;
- dmxLocal->deviceId = devices[i].id;
- dmxLocal->deviceName = (devices[i].name
- ? strdup(devices[i].name)
- : NULL);
- }
- }
- break;
-#endif
}
}
XFreeDeviceList(devices);
@@ -1067,9 +1036,8 @@ void dmxInputInit(DMXInputInfo *dmxInput)
dmxInput->processInputEvents = dmxProcessInputEvents;
dmxInput->detached = False;
- RegisterBlockAndWakeupHandlers(dmxBlockHandler,
- dmxWakeupHandler,
- (void *)dmxInput->inputIdx);
+ RegisterBlockAndWakeupHandlers(dmxBlockHandler, dmxWakeupHandler,
+ (void *)(uintptr_t)dmxInput->inputIdx);
}
static void dmxInputFreeLocal(DMXLocalInputInfoRec *local)