Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-api
Conflicts: dix/getevents.c hw/xfree86/common/xf86Xinput.h Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
commit
88cb61e1e5
|
@ -180,10 +180,10 @@ CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes,
|
||||||
dev->use = IsXKeyboard;
|
dev->use = IsXKeyboard;
|
||||||
else if (IsMaster(d) && IsPointerDevice(d))
|
else if (IsMaster(d) && IsPointerDevice(d))
|
||||||
dev->use = IsXPointer;
|
dev->use = IsXPointer;
|
||||||
else if (d->key && d->kbdfeed)
|
|
||||||
dev->use = IsXExtensionKeyboard;
|
|
||||||
else if (d->valuator && d->button)
|
else if (d->valuator && d->button)
|
||||||
dev->use = IsXExtensionPointer;
|
dev->use = IsXExtensionPointer;
|
||||||
|
else if (d->key && d->kbdfeed)
|
||||||
|
dev->use = IsXExtensionKeyboard;
|
||||||
else
|
else
|
||||||
dev->use = IsXExtensionDevice;
|
dev->use = IsXExtensionDevice;
|
||||||
|
|
||||||
|
|
|
@ -136,12 +136,286 @@ int SProcXIChangeHierarchy(ClientPtr client)
|
||||||
return (ProcXIChangeHierarchy(client));
|
return (ProcXIChangeHierarchy(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
add_master(ClientPtr client, xXIAddMasterInfo *c, int flags[MAXDEVICES])
|
||||||
|
{
|
||||||
|
DeviceIntPtr ptr, keybd, XTestptr, XTestkeybd;
|
||||||
|
char* name;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
name = calloc(c->name_len + 1, sizeof(char));
|
||||||
|
strncpy(name, (char*)&c[1], c->name_len);
|
||||||
|
|
||||||
|
rc = AllocDevicePair(client, name, &ptr, &keybd,
|
||||||
|
CorePointerProc, CoreKeyboardProc, TRUE);
|
||||||
|
if (rc != Success)
|
||||||
|
goto unwind;
|
||||||
|
|
||||||
|
if (!c->send_core)
|
||||||
|
ptr->coreEvents = keybd->coreEvents = FALSE;
|
||||||
|
|
||||||
|
/* Allocate virtual slave devices for xtest events */
|
||||||
|
rc = AllocXTestDevice(client, name, &XTestptr, &XTestkeybd, ptr, keybd);
|
||||||
|
if (rc != Success)
|
||||||
|
{
|
||||||
|
DeleteInputDeviceRequest(ptr);
|
||||||
|
DeleteInputDeviceRequest(keybd);
|
||||||
|
goto unwind;
|
||||||
|
}
|
||||||
|
|
||||||
|
ActivateDevice(ptr, FALSE);
|
||||||
|
ActivateDevice(keybd, FALSE);
|
||||||
|
flags[ptr->id] |= XIMasterAdded;
|
||||||
|
flags[keybd->id] |= XIMasterAdded;
|
||||||
|
|
||||||
|
ActivateDevice(XTestptr, FALSE);
|
||||||
|
ActivateDevice(XTestkeybd, FALSE);
|
||||||
|
flags[XTestptr->id] |= XISlaveAdded;
|
||||||
|
flags[XTestkeybd->id] |= XISlaveAdded;
|
||||||
|
|
||||||
|
if (c->enable)
|
||||||
|
{
|
||||||
|
EnableDevice(ptr, FALSE);
|
||||||
|
EnableDevice(keybd, FALSE);
|
||||||
|
flags[ptr->id] |= XIDeviceEnabled;
|
||||||
|
flags[keybd->id] |= XIDeviceEnabled;
|
||||||
|
|
||||||
|
EnableDevice(XTestptr, FALSE);
|
||||||
|
EnableDevice(XTestkeybd, FALSE);
|
||||||
|
flags[XTestptr->id] |= XIDeviceEnabled;
|
||||||
|
flags[XTestkeybd->id] |= XIDeviceEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Attach the XTest virtual devices to the newly
|
||||||
|
created master device */
|
||||||
|
AttachDevice(NULL, XTestptr, ptr);
|
||||||
|
AttachDevice(NULL, XTestkeybd, keybd);
|
||||||
|
flags[XTestptr->id] |= XISlaveAttached;
|
||||||
|
flags[XTestkeybd->id] |= XISlaveAttached;
|
||||||
|
|
||||||
|
unwind:
|
||||||
|
free(name);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
|
||||||
|
int flags[MAXDEVICES])
|
||||||
|
{
|
||||||
|
DeviceIntPtr ptr, keybd, XTestptr, XTestkeybd;
|
||||||
|
int rc = Success;
|
||||||
|
|
||||||
|
if (r->return_mode != XIAttachToMaster &&
|
||||||
|
r->return_mode != XIFloating)
|
||||||
|
return BadValue;
|
||||||
|
|
||||||
|
rc = dixLookupDevice(&ptr, r->deviceid, client, DixDestroyAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
goto unwind;
|
||||||
|
|
||||||
|
if (!IsMaster(ptr))
|
||||||
|
{
|
||||||
|
client->errorValue = r->deviceid;
|
||||||
|
rc = BadDevice;
|
||||||
|
goto unwind;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* XXX: For now, don't allow removal of VCP, VCK */
|
||||||
|
if (ptr == inputInfo.pointer || ptr == inputInfo.keyboard)
|
||||||
|
{
|
||||||
|
rc = BadDevice;
|
||||||
|
goto unwind;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ptr = GetMaster(ptr, MASTER_POINTER);
|
||||||
|
rc = dixLookupDevice(&ptr, ptr->id, client, DixDestroyAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
goto unwind;
|
||||||
|
keybd = GetMaster(ptr, MASTER_KEYBOARD);
|
||||||
|
rc = dixLookupDevice(&keybd, keybd->id, client, DixDestroyAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
goto unwind;
|
||||||
|
|
||||||
|
XTestptr = GetXTestDevice(ptr);
|
||||||
|
rc = dixLookupDevice(&XTestptr, XTestptr->id, client, DixDestroyAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
goto unwind;
|
||||||
|
|
||||||
|
XTestkeybd = GetXTestDevice(keybd);
|
||||||
|
rc = dixLookupDevice(&XTestkeybd, XTestkeybd->id, client,
|
||||||
|
DixDestroyAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
goto unwind;
|
||||||
|
|
||||||
|
/* Disabling sends the devices floating, reattach them if
|
||||||
|
* desired. */
|
||||||
|
if (r->return_mode == XIAttachToMaster)
|
||||||
|
{
|
||||||
|
DeviceIntPtr attached,
|
||||||
|
newptr,
|
||||||
|
newkeybd;
|
||||||
|
|
||||||
|
rc = dixLookupDevice(&newptr, r->return_pointer, client, DixAddAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
goto unwind;
|
||||||
|
|
||||||
|
if (!IsMaster(newptr))
|
||||||
|
{
|
||||||
|
client->errorValue = r->return_pointer;
|
||||||
|
rc = BadDevice;
|
||||||
|
goto unwind;
|
||||||
|
}
|
||||||
|
|
||||||
|
rc = dixLookupDevice(&newkeybd, r->return_keyboard,
|
||||||
|
client, DixAddAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
goto unwind;
|
||||||
|
|
||||||
|
if (!IsMaster(newkeybd))
|
||||||
|
{
|
||||||
|
client->errorValue = r->return_keyboard;
|
||||||
|
rc = BadDevice;
|
||||||
|
goto unwind;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (attached = inputInfo.devices; attached; attached = attached->next)
|
||||||
|
{
|
||||||
|
if (!IsMaster(attached)) {
|
||||||
|
if (attached->u.master == ptr)
|
||||||
|
{
|
||||||
|
AttachDevice(client, attached, newptr);
|
||||||
|
flags[attached->id] |= XISlaveAttached;
|
||||||
|
}
|
||||||
|
if (attached->u.master == keybd)
|
||||||
|
{
|
||||||
|
AttachDevice(client, attached, newkeybd);
|
||||||
|
flags[attached->id] |= XISlaveAttached;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* can't disable until we removed pairing */
|
||||||
|
keybd->spriteInfo->paired = NULL;
|
||||||
|
ptr->spriteInfo->paired = NULL;
|
||||||
|
XTestptr->spriteInfo->paired = NULL;
|
||||||
|
XTestkeybd->spriteInfo->paired = NULL;
|
||||||
|
|
||||||
|
/* disable the remove the devices, XTest devices must be done first
|
||||||
|
else the sprites they rely on will be destroyed */
|
||||||
|
DisableDevice(XTestptr, FALSE);
|
||||||
|
DisableDevice(XTestkeybd, FALSE);
|
||||||
|
DisableDevice(keybd, FALSE);
|
||||||
|
DisableDevice(ptr, FALSE);
|
||||||
|
flags[XTestptr->id] |= XIDeviceDisabled | XISlaveDetached;
|
||||||
|
flags[XTestkeybd->id] |= XIDeviceDisabled | XISlaveDetached;
|
||||||
|
flags[keybd->id] |= XIDeviceDisabled;
|
||||||
|
flags[ptr->id] |= XIDeviceDisabled;
|
||||||
|
|
||||||
|
RemoveDevice(XTestptr, FALSE);
|
||||||
|
RemoveDevice(XTestkeybd, FALSE);
|
||||||
|
RemoveDevice(keybd, FALSE);
|
||||||
|
RemoveDevice(ptr, FALSE);
|
||||||
|
flags[XTestptr->id] |= XISlaveRemoved;
|
||||||
|
flags[XTestkeybd->id] |= XISlaveRemoved;
|
||||||
|
flags[keybd->id] |= XIMasterRemoved;
|
||||||
|
flags[ptr->id] |= XIMasterRemoved;
|
||||||
|
|
||||||
|
unwind:
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
detach_slave(ClientPtr client, xXIDetachSlaveInfo *c, int flags[MAXDEVICES])
|
||||||
|
{
|
||||||
|
DeviceIntPtr dev;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
rc = dixLookupDevice(&dev, c->deviceid, client, DixManageAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
goto unwind;
|
||||||
|
|
||||||
|
if (IsMaster(dev))
|
||||||
|
{
|
||||||
|
client->errorValue = c->deviceid;
|
||||||
|
rc = BadDevice;
|
||||||
|
goto unwind;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Don't allow changes to XTest Devices, these are fixed */
|
||||||
|
if (IsXTestDevice(dev, NULL))
|
||||||
|
{
|
||||||
|
client->errorValue = c->deviceid;
|
||||||
|
rc = BadDevice;
|
||||||
|
goto unwind;
|
||||||
|
}
|
||||||
|
|
||||||
|
AttachDevice(client, dev, NULL);
|
||||||
|
flags[dev->id] |= XISlaveDetached;
|
||||||
|
|
||||||
|
unwind:
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
attach_slave(ClientPtr client, xXIAttachSlaveInfo *c,
|
||||||
|
int flags[MAXDEVICES])
|
||||||
|
{
|
||||||
|
DeviceIntPtr dev;
|
||||||
|
DeviceIntPtr newmaster;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
rc = dixLookupDevice(&dev, c->deviceid, client, DixManageAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
goto unwind;
|
||||||
|
|
||||||
|
if (IsMaster(dev))
|
||||||
|
{
|
||||||
|
client->errorValue = c->deviceid;
|
||||||
|
rc = BadDevice;
|
||||||
|
goto unwind;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Don't allow changes to XTest Devices, these are fixed */
|
||||||
|
if (IsXTestDevice(dev, NULL))
|
||||||
|
{
|
||||||
|
client->errorValue = c->deviceid;
|
||||||
|
rc = BadDevice;
|
||||||
|
goto unwind;
|
||||||
|
}
|
||||||
|
|
||||||
|
rc = dixLookupDevice(&newmaster, c->new_master, client, DixAddAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
goto unwind;
|
||||||
|
if (!IsMaster(newmaster))
|
||||||
|
{
|
||||||
|
client->errorValue = c->new_master;
|
||||||
|
rc = BadDevice;
|
||||||
|
goto unwind;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!((IsPointerDevice(newmaster) && IsPointerDevice(dev)) ||
|
||||||
|
(IsKeyboardDevice(newmaster) && IsKeyboardDevice(dev))))
|
||||||
|
{
|
||||||
|
rc = BadDevice;
|
||||||
|
goto unwind;
|
||||||
|
}
|
||||||
|
|
||||||
|
AttachDevice(client, dev, newmaster);
|
||||||
|
flags[dev->id] |= XISlaveAttached;
|
||||||
|
|
||||||
|
unwind:
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define SWAPIF(cmd) if (client->swapped) { cmd; }
|
#define SWAPIF(cmd) if (client->swapped) { cmd; }
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXIChangeHierarchy(ClientPtr client)
|
ProcXIChangeHierarchy(ClientPtr client)
|
||||||
{
|
{
|
||||||
DeviceIntPtr ptr, keybd, XTestptr, XTestkeybd;
|
|
||||||
xXIAnyHierarchyChangeInfo *any;
|
xXIAnyHierarchyChangeInfo *any;
|
||||||
int required_len = sizeof(xXIChangeHierarchyReq);
|
int required_len = sizeof(xXIChangeHierarchyReq);
|
||||||
char n;
|
char n;
|
||||||
|
@ -169,276 +443,38 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||||
case XIAddMaster:
|
case XIAddMaster:
|
||||||
{
|
{
|
||||||
xXIAddMasterInfo* c = (xXIAddMasterInfo*)any;
|
xXIAddMasterInfo* c = (xXIAddMasterInfo*)any;
|
||||||
char* name;
|
|
||||||
|
|
||||||
SWAPIF(swaps(&c->name_len, n));
|
SWAPIF(swaps(&c->name_len, n));
|
||||||
name = calloc(c->name_len + 1, sizeof(char));
|
|
||||||
strncpy(name, (char*)&c[1], c->name_len);
|
|
||||||
|
|
||||||
|
rc = add_master(client, c, flags);
|
||||||
rc = AllocDevicePair(client, name, &ptr, &keybd,
|
|
||||||
CorePointerProc, CoreKeyboardProc,
|
|
||||||
TRUE);
|
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
{
|
|
||||||
free(name);
|
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
|
||||||
|
|
||||||
if (!c->send_core)
|
|
||||||
ptr->coreEvents = keybd->coreEvents = FALSE;
|
|
||||||
|
|
||||||
/* Allocate virtual slave devices for xtest events */
|
|
||||||
rc = AllocXTestDevice(client, name, &XTestptr, &XTestkeybd,
|
|
||||||
ptr, keybd);
|
|
||||||
if (rc != Success)
|
|
||||||
{
|
|
||||||
|
|
||||||
free(name);
|
|
||||||
goto unwind;
|
|
||||||
}
|
|
||||||
|
|
||||||
ActivateDevice(ptr, FALSE);
|
|
||||||
ActivateDevice(keybd, FALSE);
|
|
||||||
flags[ptr->id] |= XIMasterAdded;
|
|
||||||
flags[keybd->id] |= XIMasterAdded;
|
|
||||||
|
|
||||||
ActivateDevice(XTestptr, FALSE);
|
|
||||||
ActivateDevice(XTestkeybd, FALSE);
|
|
||||||
flags[XTestptr->id] |= XISlaveAdded;
|
|
||||||
flags[XTestkeybd->id] |= XISlaveAdded;
|
|
||||||
|
|
||||||
if (c->enable)
|
|
||||||
{
|
|
||||||
EnableDevice(ptr, FALSE);
|
|
||||||
EnableDevice(keybd, FALSE);
|
|
||||||
flags[ptr->id] |= XIDeviceEnabled;
|
|
||||||
flags[keybd->id] |= XIDeviceEnabled;
|
|
||||||
|
|
||||||
EnableDevice(XTestptr, FALSE);
|
|
||||||
EnableDevice(XTestkeybd, FALSE);
|
|
||||||
flags[XTestptr->id] |= XIDeviceEnabled;
|
|
||||||
flags[XTestkeybd->id] |= XIDeviceEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Attach the XTest virtual devices to the newly
|
|
||||||
created master device */
|
|
||||||
AttachDevice(NULL, XTestptr, ptr);
|
|
||||||
AttachDevice(NULL, XTestkeybd, keybd);
|
|
||||||
flags[XTestptr->id] |= XISlaveAttached;
|
|
||||||
flags[XTestkeybd->id] |= XISlaveAttached;
|
|
||||||
|
|
||||||
free(name);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XIRemoveMaster:
|
case XIRemoveMaster:
|
||||||
{
|
{
|
||||||
xXIRemoveMasterInfo* r = (xXIRemoveMasterInfo*)any;
|
xXIRemoveMasterInfo* r = (xXIRemoveMasterInfo*)any;
|
||||||
|
|
||||||
if (r->return_mode != XIAttachToMaster &&
|
rc = remove_master(client, r, flags);
|
||||||
r->return_mode != XIFloating)
|
|
||||||
return BadValue;
|
|
||||||
|
|
||||||
rc = dixLookupDevice(&ptr, r->deviceid, client,
|
|
||||||
DixDestroyAccess);
|
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
goto unwind;
|
goto unwind;
|
||||||
|
|
||||||
if (!IsMaster(ptr))
|
|
||||||
{
|
|
||||||
client->errorValue = r->deviceid;
|
|
||||||
rc = BadDevice;
|
|
||||||
goto unwind;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* XXX: For now, don't allow removal of VCP, VCK */
|
|
||||||
if (ptr == inputInfo.pointer ||
|
|
||||||
ptr == inputInfo.keyboard)
|
|
||||||
{
|
|
||||||
rc = BadDevice;
|
|
||||||
goto unwind;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ptr = GetMaster(ptr, MASTER_POINTER);
|
|
||||||
rc = dixLookupDevice(&ptr,
|
|
||||||
ptr->id,
|
|
||||||
client,
|
|
||||||
DixDestroyAccess);
|
|
||||||
if (rc != Success)
|
|
||||||
goto unwind;
|
|
||||||
keybd = GetMaster(ptr, MASTER_KEYBOARD);
|
|
||||||
rc = dixLookupDevice(&keybd,
|
|
||||||
keybd->id,
|
|
||||||
client,
|
|
||||||
DixDestroyAccess);
|
|
||||||
if (rc != Success)
|
|
||||||
goto unwind;
|
|
||||||
|
|
||||||
XTestptr = GetXTestDevice(ptr);
|
|
||||||
rc = dixLookupDevice(&XTestptr, XTestptr->id, client,
|
|
||||||
DixDestroyAccess);
|
|
||||||
if (rc != Success)
|
|
||||||
goto unwind;
|
|
||||||
|
|
||||||
XTestkeybd = GetXTestDevice(keybd);
|
|
||||||
rc = dixLookupDevice(&XTestkeybd, XTestkeybd->id, client,
|
|
||||||
DixDestroyAccess);
|
|
||||||
if (rc != Success)
|
|
||||||
goto unwind;
|
|
||||||
|
|
||||||
/* Disabling sends the devices floating, reattach them if
|
|
||||||
* desired. */
|
|
||||||
if (r->return_mode == XIAttachToMaster)
|
|
||||||
{
|
|
||||||
DeviceIntPtr attached,
|
|
||||||
newptr,
|
|
||||||
newkeybd;
|
|
||||||
|
|
||||||
rc = dixLookupDevice(&newptr, r->return_pointer,
|
|
||||||
client, DixAddAccess);
|
|
||||||
if (rc != Success)
|
|
||||||
goto unwind;
|
|
||||||
|
|
||||||
if (!IsMaster(newptr))
|
|
||||||
{
|
|
||||||
client->errorValue = r->return_pointer;
|
|
||||||
rc = BadDevice;
|
|
||||||
goto unwind;
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = dixLookupDevice(&newkeybd, r->return_keyboard,
|
|
||||||
client, DixAddAccess);
|
|
||||||
if (rc != Success)
|
|
||||||
goto unwind;
|
|
||||||
|
|
||||||
if (!IsMaster(newkeybd))
|
|
||||||
{
|
|
||||||
client->errorValue = r->return_keyboard;
|
|
||||||
rc = BadDevice;
|
|
||||||
goto unwind;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (attached = inputInfo.devices;
|
|
||||||
attached;
|
|
||||||
attached = attached->next)
|
|
||||||
{
|
|
||||||
if (!IsMaster(attached)) {
|
|
||||||
if (attached->u.master == ptr)
|
|
||||||
{
|
|
||||||
AttachDevice(client, attached, newptr);
|
|
||||||
flags[attached->id] |= XISlaveAttached;
|
|
||||||
}
|
|
||||||
if (attached->u.master == keybd)
|
|
||||||
{
|
|
||||||
AttachDevice(client, attached, newkeybd);
|
|
||||||
flags[attached->id] |= XISlaveAttached;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* can't disable until we removed pairing */
|
|
||||||
keybd->spriteInfo->paired = NULL;
|
|
||||||
ptr->spriteInfo->paired = NULL;
|
|
||||||
XTestptr->spriteInfo->paired = NULL;
|
|
||||||
XTestkeybd->spriteInfo->paired = NULL;
|
|
||||||
|
|
||||||
/* disable the remove the devices, XTest devices must be done first
|
|
||||||
else the sprites they rely on will be destroyed */
|
|
||||||
DisableDevice(XTestptr, FALSE);
|
|
||||||
DisableDevice(XTestkeybd, FALSE);
|
|
||||||
DisableDevice(keybd, FALSE);
|
|
||||||
DisableDevice(ptr, FALSE);
|
|
||||||
flags[XTestptr->id] |= XIDeviceDisabled | XISlaveDetached;
|
|
||||||
flags[XTestkeybd->id] |= XIDeviceDisabled | XISlaveDetached;
|
|
||||||
flags[keybd->id] |= XIDeviceDisabled;
|
|
||||||
flags[ptr->id] |= XIDeviceDisabled;
|
|
||||||
|
|
||||||
RemoveDevice(XTestptr, FALSE);
|
|
||||||
RemoveDevice(XTestkeybd, FALSE);
|
|
||||||
RemoveDevice(keybd, FALSE);
|
|
||||||
RemoveDevice(ptr, FALSE);
|
|
||||||
flags[XTestptr->id] |= XISlaveRemoved;
|
|
||||||
flags[XTestkeybd->id] |= XISlaveRemoved;
|
|
||||||
flags[keybd->id] |= XIMasterRemoved;
|
|
||||||
flags[ptr->id] |= XIMasterRemoved;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XIDetachSlave:
|
case XIDetachSlave:
|
||||||
{
|
{
|
||||||
xXIDetachSlaveInfo* c = (xXIDetachSlaveInfo*)any;
|
xXIDetachSlaveInfo* c = (xXIDetachSlaveInfo*)any;
|
||||||
|
|
||||||
rc = dixLookupDevice(&ptr, c->deviceid, client,
|
rc = detach_slave(client, c, flags);
|
||||||
DixManageAccess);
|
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
goto unwind;
|
goto unwind;
|
||||||
|
|
||||||
if (IsMaster(ptr))
|
|
||||||
{
|
|
||||||
client->errorValue = c->deviceid;
|
|
||||||
rc = BadDevice;
|
|
||||||
goto unwind;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Don't allow changes to XTest Devices, these are fixed */
|
|
||||||
if (IsXTestDevice(ptr, NULL))
|
|
||||||
{
|
|
||||||
client->errorValue = c->deviceid;
|
|
||||||
rc = BadDevice;
|
|
||||||
goto unwind;
|
|
||||||
}
|
|
||||||
|
|
||||||
AttachDevice(client, ptr, NULL);
|
|
||||||
flags[ptr->id] |= XISlaveDetached;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XIAttachSlave:
|
case XIAttachSlave:
|
||||||
{
|
{
|
||||||
xXIAttachSlaveInfo* c = (xXIAttachSlaveInfo*)any;
|
xXIAttachSlaveInfo* c = (xXIAttachSlaveInfo*)any;
|
||||||
DeviceIntPtr newmaster;
|
|
||||||
|
|
||||||
rc = dixLookupDevice(&ptr, c->deviceid, client,
|
rc = attach_slave(client, c, flags);
|
||||||
DixManageAccess);
|
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
goto unwind;
|
goto unwind;
|
||||||
|
|
||||||
if (IsMaster(ptr))
|
|
||||||
{
|
|
||||||
client->errorValue = c->deviceid;
|
|
||||||
rc = BadDevice;
|
|
||||||
goto unwind;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Don't allow changes to XTest Devices, these are fixed */
|
|
||||||
if (IsXTestDevice(ptr, NULL))
|
|
||||||
{
|
|
||||||
client->errorValue = c->deviceid;
|
|
||||||
rc = BadDevice;
|
|
||||||
goto unwind;
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = dixLookupDevice(&newmaster, c->new_master,
|
|
||||||
client, DixAddAccess);
|
|
||||||
if (rc != Success)
|
|
||||||
goto unwind;
|
|
||||||
if (!IsMaster(newmaster))
|
|
||||||
{
|
|
||||||
client->errorValue = c->new_master;
|
|
||||||
rc = BadDevice;
|
|
||||||
goto unwind;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!((IsPointerDevice(newmaster) &&
|
|
||||||
IsPointerDevice(ptr)) ||
|
|
||||||
(IsKeyboardDevice(newmaster) &&
|
|
||||||
IsKeyboardDevice(ptr))))
|
|
||||||
{
|
|
||||||
rc = BadDevice;
|
|
||||||
goto unwind;
|
|
||||||
}
|
|
||||||
AttachDevice(client, ptr, newmaster);
|
|
||||||
flags[ptr->id] |= XISlaveAttached;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,7 +238,7 @@ compFreeClientWindow (WindowPtr pWin, XID id)
|
||||||
DamageRegister (&pWin->drawable, cw->damage);
|
DamageRegister (&pWin->drawable, cw->damage);
|
||||||
cw->damageRegistered = TRUE;
|
cw->damageRegistered = TRUE;
|
||||||
pWin->redirectDraw = RedirectDrawAutomatic;
|
pWin->redirectDraw = RedirectDrawAutomatic;
|
||||||
DamageRegionAppend(&pWin->drawable, &pWin->borderSize);
|
DamageDamageRegion(&pWin->drawable, &pWin->borderSize);
|
||||||
}
|
}
|
||||||
if (wasMapped && !pWin->mapped)
|
if (wasMapped && !pWin->mapped)
|
||||||
{
|
{
|
||||||
|
@ -472,8 +472,19 @@ compUnredirectOneSubwindow (WindowPtr pParent, WindowPtr pWin)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
bgNoneVisitWindow(WindowPtr pWin, void *null)
|
||||||
|
{
|
||||||
|
if (pWin->backgroundState != BackgroundPixmap)
|
||||||
|
return WT_WALKCHILDREN;
|
||||||
|
if (pWin->background.pixmap != None)
|
||||||
|
return WT_WALKCHILDREN;
|
||||||
|
|
||||||
|
return WT_STOPWALKING;
|
||||||
|
}
|
||||||
|
|
||||||
static PixmapPtr
|
static PixmapPtr
|
||||||
compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
|
compNewPixmap (WindowPtr pWin, int x, int y, int w, int h, Bool map)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
WindowPtr pParent = pWin->parent;
|
WindowPtr pParent = pWin->parent;
|
||||||
|
@ -487,15 +498,30 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
|
||||||
|
|
||||||
pPixmap->screen_x = x;
|
pPixmap->screen_x = x;
|
||||||
pPixmap->screen_y = y;
|
pPixmap->screen_y = y;
|
||||||
|
|
||||||
|
/* resize allocations will update later in compCopyWindow, not here */
|
||||||
|
if (!map)
|
||||||
|
return pPixmap;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If there's no bg=None in the tree, we're done.
|
||||||
|
*
|
||||||
|
* We could optimize this more by collection the regions of all the
|
||||||
|
* bg=None subwindows and feeding that in as the clip for the
|
||||||
|
* CopyArea below, but since window trees are shallow these days it
|
||||||
|
* might not be worth the effort.
|
||||||
|
*/
|
||||||
|
if (TraverseTree(pWin, bgNoneVisitWindow, NULL) == WT_NOMATCH)
|
||||||
|
return pPixmap;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copy bits from the parent into the new pixmap so that it will
|
||||||
|
* have "reasonable" contents in case for background None areas.
|
||||||
|
*/
|
||||||
if (pParent->drawable.depth == pWin->drawable.depth)
|
if (pParent->drawable.depth == pWin->drawable.depth)
|
||||||
{
|
{
|
||||||
GCPtr pGC = GetScratchGC (pWin->drawable.depth, pScreen);
|
GCPtr pGC = GetScratchGC (pWin->drawable.depth, pScreen);
|
||||||
|
|
||||||
/*
|
|
||||||
* Copy bits from the parent into the new pixmap so that it will
|
|
||||||
* have "reasonable" contents in case for background None areas.
|
|
||||||
*/
|
|
||||||
if (pGC)
|
if (pGC)
|
||||||
{
|
{
|
||||||
ChangeGCVal val;
|
ChangeGCVal val;
|
||||||
|
@ -558,7 +584,7 @@ compAllocPixmap (WindowPtr pWin)
|
||||||
int y = pWin->drawable.y - bw;
|
int y = pWin->drawable.y - bw;
|
||||||
int w = pWin->drawable.width + (bw << 1);
|
int w = pWin->drawable.width + (bw << 1);
|
||||||
int h = pWin->drawable.height + (bw << 1);
|
int h = pWin->drawable.height + (bw << 1);
|
||||||
PixmapPtr pPixmap = compNewPixmap (pWin, x, y, w, h);
|
PixmapPtr pPixmap = compNewPixmap (pWin, x, y, w, h, TRUE);
|
||||||
CompWindowPtr cw = GetCompWindow (pWin);
|
CompWindowPtr cw = GetCompWindow (pWin);
|
||||||
|
|
||||||
if (!pPixmap)
|
if (!pPixmap)
|
||||||
|
@ -632,7 +658,7 @@ compReallocPixmap (WindowPtr pWin, int draw_x, int draw_y,
|
||||||
pix_h = h + (bw << 1);
|
pix_h = h + (bw << 1);
|
||||||
if (pix_w != pOld->drawable.width || pix_h != pOld->drawable.height)
|
if (pix_w != pOld->drawable.width || pix_h != pOld->drawable.height)
|
||||||
{
|
{
|
||||||
pNew = compNewPixmap (pWin, pix_x, pix_y, pix_w, pix_h);
|
pNew = compNewPixmap (pWin, pix_x, pix_y, pix_w, pix_h, FALSE);
|
||||||
if (!pNew)
|
if (!pNew)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
cw->pOldPixmap = pOld;
|
cw->pOldPixmap = pOld;
|
||||||
|
|
|
@ -519,7 +519,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
RegionTranslate(prgnSrc,
|
RegionTranslate(prgnSrc,
|
||||||
pWin->drawable.x - ptOldOrg.x,
|
pWin->drawable.x - ptOldOrg.x,
|
||||||
pWin->drawable.y - ptOldOrg.y);
|
pWin->drawable.y - ptOldOrg.y);
|
||||||
DamageRegionAppend(&pWin->drawable, prgnSrc);
|
DamageDamageRegion(&pWin->drawable, prgnSrc);
|
||||||
}
|
}
|
||||||
cs->CopyWindow = pScreen->CopyWindow;
|
cs->CopyWindow = pScreen->CopyWindow;
|
||||||
pScreen->CopyWindow = compCopyWindow;
|
pScreen->CopyWindow = compCopyWindow;
|
||||||
|
@ -598,7 +598,7 @@ compSetRedirectBorderClip (WindowPtr pWin, RegionPtr pRegion)
|
||||||
/*
|
/*
|
||||||
* Report that as damaged so it will be redrawn
|
* Report that as damaged so it will be redrawn
|
||||||
*/
|
*/
|
||||||
DamageRegionAppend(&pWin->drawable, &damage);
|
DamageDamageRegion(&pWin->drawable, &damage);
|
||||||
RegionUninit(&damage);
|
RegionUninit(&damage);
|
||||||
/*
|
/*
|
||||||
* Save the new border clip region
|
* Save the new border clip region
|
||||||
|
|
|
@ -45,11 +45,6 @@
|
||||||
|
|
||||||
See the evdev documentation for more information.
|
See the evdev documentation for more information.
|
||||||
|
|
||||||
You will probably want to add the following option to the ServerFlags of
|
|
||||||
your xorg.conf:
|
|
||||||
|
|
||||||
Option "AllowEmptyInput" "True"
|
|
||||||
|
|
||||||
FIXME: Support tablets too.
|
FIXME: Support tablets too.
|
||||||
TODO: I think its fixed, can't test
|
TODO: I think its fixed, can't test
|
||||||
|
|
||||||
|
|
|
@ -714,6 +714,7 @@ fi
|
||||||
|
|
||||||
dnl Handle building documentation
|
dnl Handle building documentation
|
||||||
AM_CONDITIONAL(BUILDDOCS, test "x$BUILDDOCS" = xyes)
|
AM_CONDITIONAL(BUILDDOCS, test "x$BUILDDOCS" = xyes)
|
||||||
|
XORG_ENABLE_DOCS
|
||||||
XORG_ENABLE_DEVEL_DOCS
|
XORG_ENABLE_DEVEL_DOCS
|
||||||
XORG_WITH_XMLTO(0.0.20)
|
XORG_WITH_XMLTO(0.0.20)
|
||||||
XORG_WITH_FOP
|
XORG_WITH_FOP
|
||||||
|
@ -2034,7 +2035,10 @@ if test "$KDRIVE" = yes; then
|
||||||
|
|
||||||
PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
|
PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"])
|
||||||
if test "x$HAVE_TSLIB" = xno; then
|
if test "x$HAVE_TSLIB" = xno; then
|
||||||
AC_CHECK_LIB(ts, ts_open, [HAVE_TSLIB="yes"])
|
AC_CHECK_LIB(ts, ts_open, [
|
||||||
|
HAVE_TSLIB="yes"
|
||||||
|
TSLIB_LIBS="-lts"
|
||||||
|
])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "xTSLIB" = xauto; then
|
if test "xTSLIB" = xauto; then
|
||||||
|
@ -2119,7 +2123,7 @@ if test "$KDRIVE" = yes; then
|
||||||
KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB"
|
KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB"
|
||||||
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
|
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
|
||||||
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
|
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
|
||||||
KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
|
KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS $TSLIB_LIBS"
|
||||||
|
|
||||||
AC_SUBST([XEPHYR_LIBS])
|
AC_SUBST([XEPHYR_LIBS])
|
||||||
AC_SUBST([XEPHYR_INCS])
|
AC_SUBST([XEPHYR_INCS])
|
||||||
|
|
|
@ -223,7 +223,7 @@ ProcDamageCreate (ClientPtr client)
|
||||||
if (pDrawable->type == DRAWABLE_WINDOW)
|
if (pDrawable->type == DRAWABLE_WINDOW)
|
||||||
{
|
{
|
||||||
pRegion = &((WindowPtr) pDrawable)->borderClip;
|
pRegion = &((WindowPtr) pDrawable)->borderClip;
|
||||||
DamageRegionAppend(pDrawable, pRegion);
|
DamageDamageRegion(pDrawable, pRegion);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
@ -293,7 +293,7 @@ ProcDamageAdd (ClientPtr client)
|
||||||
* screen coordinates like damage expects.
|
* screen coordinates like damage expects.
|
||||||
*/
|
*/
|
||||||
RegionTranslate(pRegion, pDrawable->x, pDrawable->y);
|
RegionTranslate(pRegion, pDrawable->x, pDrawable->y);
|
||||||
DamageRegionAppend(pDrawable, pRegion);
|
DamageDamageRegion(pDrawable, pRegion);
|
||||||
RegionTranslate(pRegion, -pDrawable->x, -pDrawable->y);
|
RegionTranslate(pRegion, -pDrawable->x, -pDrawable->y);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
@ -926,20 +926,12 @@ GetKeyboardEvents(EventList *events, DeviceIntPtr pDev, int type, int key_code)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a set of keyboard events for KeyPress/KeyRelease, optionally
|
* Returns a set of InternalEvents for KeyPress/KeyRelease, optionally
|
||||||
* also with valuator events. Handles Xi and XKB.
|
* also with valuator events.
|
||||||
*
|
|
||||||
* DOES NOT GENERATE CORE EVENTS! Core events are created when processing the
|
|
||||||
* event (ProcessOtherEvent).
|
|
||||||
*
|
*
|
||||||
* events is not NULL-terminated; the return value is the number of events.
|
* events is not NULL-terminated; the return value is the number of events.
|
||||||
* The DDX is responsible for allocating the event structure in the first
|
* The DDX is responsible for allocating the event structure in the first
|
||||||
* place via GetMaximumEventsNum(), and for freeing it.
|
* place via GetMaximumEventsNum(), and for freeing it.
|
||||||
*
|
|
||||||
* This function does not change the core keymap to that of the device;
|
|
||||||
* that is done by SwitchCoreKeyboard, which is called from
|
|
||||||
* mieqProcessInputEvents. If replacing that function, take care to call
|
|
||||||
* SetCoreKeyboard before processInputProc, so keymaps are altered to suit.
|
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type,
|
GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type,
|
||||||
|
@ -1076,11 +1068,8 @@ transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a series of xEvents (filled into the EventList) representing
|
* Generate a series of InternalEvents (filled into the EventList)
|
||||||
* pointer motion, or button presses. Xi and XKB-aware.
|
* representing pointer motion, or button presses.
|
||||||
*
|
|
||||||
* DOES NOT GENERATE CORE EVENTS! Core events are created when processing the
|
|
||||||
* event (ProcessOtherEvent).
|
|
||||||
*
|
*
|
||||||
* events is not NULL-terminated; the return value is the number of events.
|
* events is not NULL-terminated; the return value is the number of events.
|
||||||
* The DDX is responsible for allocating the event structure in the first
|
* The DDX is responsible for allocating the event structure in the first
|
||||||
|
@ -1223,7 +1212,8 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post ProximityIn/ProximityOut events, accompanied by valuators.
|
* Generate ProximityIn/ProximityOut InternalEvents, accompanied by
|
||||||
|
* valuators.
|
||||||
*
|
*
|
||||||
* events is not NULL-terminated; the return value is the number of events.
|
* events is not NULL-terminated; the return value is the number of events.
|
||||||
* The DDX is responsible for allocating the event structure in the first
|
* The DDX is responsible for allocating the event structure in the first
|
||||||
|
|
|
@ -117,11 +117,8 @@ CreateGrab(
|
||||||
static void
|
static void
|
||||||
FreeGrab(GrabPtr pGrab)
|
FreeGrab(GrabPtr pGrab)
|
||||||
{
|
{
|
||||||
if (pGrab->modifiersDetail.pMask != NULL)
|
free(pGrab->modifiersDetail.pMask);
|
||||||
free(pGrab->modifiersDetail.pMask);
|
free(pGrab->detail.pMask);
|
||||||
|
|
||||||
if (pGrab->detail.pMask != NULL)
|
|
||||||
free(pGrab->detail.pMask);
|
|
||||||
|
|
||||||
if (pGrab->cursor)
|
if (pGrab->cursor)
|
||||||
FreeCursor(pGrab->cursor, (Cursor)0);
|
FreeCursor(pGrab->cursor, (Cursor)0);
|
||||||
|
|
|
@ -952,11 +952,9 @@ SetAccelerationProfile(
|
||||||
if(profile == NULL && profile_num != PROFILE_UNINITIALIZE)
|
if(profile == NULL && profile_num != PROFILE_UNINITIALIZE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if(vel->profile_private != NULL){
|
/* Here one could free old profile-private data */
|
||||||
/* Here one could free old profile-private data */
|
free(vel->profile_private);
|
||||||
free(vel->profile_private);
|
vel->profile_private = NULL;
|
||||||
vel->profile_private = NULL;
|
|
||||||
}
|
|
||||||
/* Here one could init profile-private data */
|
/* Here one could init profile-private data */
|
||||||
vel->Profile = profile;
|
vel->Profile = profile;
|
||||||
vel->statistics.profile_number = profile_num;
|
vel->statistics.profile_number = profile_num;
|
||||||
|
|
|
@ -3660,9 +3660,9 @@ WindowParentHasDeviceCursor(WindowPtr pWin,
|
||||||
&pParentNode, &pParentPrev))
|
&pParentNode, &pParentPrev))
|
||||||
{
|
{
|
||||||
/* if there is a node in the list, the win has a dev cursor */
|
/* if there is a node in the list, the win has a dev cursor */
|
||||||
if (!pParentNode->cursor) /* inherited. loop needs to cont. */
|
if (!pParentNode->cursor) /* inherited. */
|
||||||
{
|
pParent = pParent->parent;
|
||||||
} else if (pParentNode->cursor == pCursor) /* inherit */
|
else if (pParentNode->cursor == pCursor) /* inherit */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else /* different cursor */
|
else /* different cursor */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -25,11 +25,13 @@ XML_FILES = Xserver-DTrace.xml
|
||||||
|
|
||||||
include ../xmlrules.in
|
include ../xmlrules.in
|
||||||
|
|
||||||
|
if ENABLE_DOCS
|
||||||
if XSERVER_DTRACE
|
if XSERVER_DTRACE
|
||||||
doc_DATA = $(BUILT_DOC_FILES)
|
doc_DATA = $(BUILT_DOC_FILES)
|
||||||
else
|
else
|
||||||
noinst_DATA = $(BUILT_DOC_FILES)
|
noinst_DATA = $(BUILT_DOC_FILES)
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
CLEANFILES = $(CLEAN_DOC_FILES)
|
CLEANFILES = $(CLEAN_DOC_FILES)
|
||||||
|
|
||||||
|
|
|
@ -159,8 +159,7 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
RegionInit(®ion, &box, 1);
|
RegionInit(®ion, &box, 1);
|
||||||
DamageRegionAppend(&pPix->drawable, ®ion);
|
DamageDamageRegion(&pPix->drawable, ®ion);
|
||||||
DamageRegionProcessPending(&pPix->drawable);
|
|
||||||
RegionUninit(®ion);
|
RegionUninit(®ion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
125
fb/fbpict.c
125
fb/fbpict.c
|
@ -35,112 +35,6 @@
|
||||||
#include "mipict.h"
|
#include "mipict.h"
|
||||||
#include "fbpict.h"
|
#include "fbpict.h"
|
||||||
|
|
||||||
#define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b))
|
|
||||||
|
|
||||||
void
|
|
||||||
fbWalkCompositeRegion (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height,
|
|
||||||
Bool srcRepeat,
|
|
||||||
Bool maskRepeat,
|
|
||||||
CompositeFunc compositeRect)
|
|
||||||
{
|
|
||||||
RegionRec region;
|
|
||||||
int n;
|
|
||||||
BoxPtr pbox;
|
|
||||||
int w, h, w_this, h_this;
|
|
||||||
int x_msk, y_msk, x_src, y_src, x_dst, y_dst;
|
|
||||||
|
|
||||||
xDst += pDst->pDrawable->x;
|
|
||||||
yDst += pDst->pDrawable->y;
|
|
||||||
if (pSrc->pDrawable)
|
|
||||||
{
|
|
||||||
xSrc += pSrc->pDrawable->x;
|
|
||||||
ySrc += pSrc->pDrawable->y;
|
|
||||||
}
|
|
||||||
if (pMask && pMask->pDrawable)
|
|
||||||
{
|
|
||||||
xMask += pMask->pDrawable->x;
|
|
||||||
yMask += pMask->pDrawable->y;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, xSrc, ySrc,
|
|
||||||
xMask, yMask, xDst, yDst, width, height))
|
|
||||||
return;
|
|
||||||
|
|
||||||
n = RegionNumRects (®ion);
|
|
||||||
pbox = RegionRects (®ion);
|
|
||||||
while (n--)
|
|
||||||
{
|
|
||||||
h = pbox->y2 - pbox->y1;
|
|
||||||
y_src = pbox->y1 - yDst + ySrc;
|
|
||||||
y_msk = pbox->y1 - yDst + yMask;
|
|
||||||
y_dst = pbox->y1;
|
|
||||||
while (h)
|
|
||||||
{
|
|
||||||
h_this = h;
|
|
||||||
w = pbox->x2 - pbox->x1;
|
|
||||||
x_src = pbox->x1 - xDst + xSrc;
|
|
||||||
x_msk = pbox->x1 - xDst + xMask;
|
|
||||||
x_dst = pbox->x1;
|
|
||||||
if (maskRepeat)
|
|
||||||
{
|
|
||||||
y_msk = mod (y_msk - pMask->pDrawable->y, pMask->pDrawable->height);
|
|
||||||
if (h_this > pMask->pDrawable->height - y_msk)
|
|
||||||
h_this = pMask->pDrawable->height - y_msk;
|
|
||||||
y_msk += pMask->pDrawable->y;
|
|
||||||
}
|
|
||||||
if (srcRepeat)
|
|
||||||
{
|
|
||||||
y_src = mod (y_src - pSrc->pDrawable->y, pSrc->pDrawable->height);
|
|
||||||
if (h_this > pSrc->pDrawable->height - y_src)
|
|
||||||
h_this = pSrc->pDrawable->height - y_src;
|
|
||||||
y_src += pSrc->pDrawable->y;
|
|
||||||
}
|
|
||||||
while (w)
|
|
||||||
{
|
|
||||||
w_this = w;
|
|
||||||
if (maskRepeat)
|
|
||||||
{
|
|
||||||
x_msk = mod (x_msk - pMask->pDrawable->x, pMask->pDrawable->width);
|
|
||||||
if (w_this > pMask->pDrawable->width - x_msk)
|
|
||||||
w_this = pMask->pDrawable->width - x_msk;
|
|
||||||
x_msk += pMask->pDrawable->x;
|
|
||||||
}
|
|
||||||
if (srcRepeat)
|
|
||||||
{
|
|
||||||
x_src = mod (x_src - pSrc->pDrawable->x, pSrc->pDrawable->width);
|
|
||||||
if (w_this > pSrc->pDrawable->width - x_src)
|
|
||||||
w_this = pSrc->pDrawable->width - x_src;
|
|
||||||
x_src += pSrc->pDrawable->x;
|
|
||||||
}
|
|
||||||
(*compositeRect) (op, pSrc, pMask, pDst,
|
|
||||||
x_src, y_src, x_msk, y_msk, x_dst, y_dst,
|
|
||||||
w_this, h_this);
|
|
||||||
w -= w_this;
|
|
||||||
x_src += w_this;
|
|
||||||
x_msk += w_this;
|
|
||||||
x_dst += w_this;
|
|
||||||
}
|
|
||||||
h -= h_this;
|
|
||||||
y_src += h_this;
|
|
||||||
y_msk += h_this;
|
|
||||||
y_dst += h_this;
|
|
||||||
}
|
|
||||||
pbox++;
|
|
||||||
}
|
|
||||||
RegionUninit(®ion);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
fbComposite (CARD8 op,
|
fbComposite (CARD8 op,
|
||||||
PicturePtr pSrc,
|
PicturePtr pSrc,
|
||||||
|
@ -182,25 +76,6 @@ fbComposite (CARD8 op,
|
||||||
free_pixman_pict (pDst, dest);
|
free_pixman_pict (pDst, dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeGeneral (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height)
|
|
||||||
{
|
|
||||||
fbComposite (op, pSrc, pMask, pDst,
|
|
||||||
xSrc, ySrc, xMask, yMask, xDst, yDst,
|
|
||||||
width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
static pixman_image_t *
|
static pixman_image_t *
|
||||||
create_solid_fill_image (PicturePtr pict)
|
create_solid_fill_image (PicturePtr pict)
|
||||||
{
|
{
|
||||||
|
|
416
fb/fbpict.h
416
fb/fbpict.h
|
@ -28,392 +28,6 @@
|
||||||
#ifndef _FBPICT_H_
|
#ifndef _FBPICT_H_
|
||||||
#define _FBPICT_H_
|
#define _FBPICT_H_
|
||||||
|
|
||||||
#include "renderedge.h"
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
#define INLINE __inline__
|
|
||||||
#else
|
|
||||||
#define INLINE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define FbIntMult(a,b,t) ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) )
|
|
||||||
#define FbIntDiv(a,b) (((CARD16) (a) * 255) / (b))
|
|
||||||
|
|
||||||
#define FbGet8(v,i) ((CARD16) (CARD8) ((v) >> i))
|
|
||||||
|
|
||||||
/*
|
|
||||||
* There are two ways of handling alpha -- either as a single unified value or
|
|
||||||
* a separate value for each component, hence each macro must have two
|
|
||||||
* versions. The unified alpha version has a 'U' at the end of the name,
|
|
||||||
* the component version has a 'C'. Similarly, functions which deal with
|
|
||||||
* this difference will have two versions using the same convention.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define FbOverU(x,y,i,a,t) ((t) = FbIntMult(FbGet8(y,i),(a),(t)) + FbGet8(x,i),\
|
|
||||||
(CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))
|
|
||||||
|
|
||||||
#define FbOverC(x,y,i,a,t) ((t) = FbIntMult(FbGet8(y,i),FbGet8(a,i),(t)) + FbGet8(x,i),\
|
|
||||||
(CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))
|
|
||||||
|
|
||||||
#define FbInU(x,i,a,t) ((CARD32) FbIntMult(FbGet8(x,i),(a),(t)) << (i))
|
|
||||||
|
|
||||||
#define FbInC(x,i,a,t) ((CARD32) FbIntMult(FbGet8(x,i),FbGet8(a,i),(t)) << (i))
|
|
||||||
|
|
||||||
#define FbGen(x,y,i,ax,ay,t,u,v) ((t) = (FbIntMult(FbGet8(y,i),ay,(u)) + \
|
|
||||||
FbIntMult(FbGet8(x,i),ax,(v))),\
|
|
||||||
(CARD32) ((CARD8) ((t) | \
|
|
||||||
(0 - ((t) >> 8)))) << (i))
|
|
||||||
|
|
||||||
#define FbAdd(x,y,i,t) ((t) = FbGet8(x,i) + FbGet8(y,i), \
|
|
||||||
(CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))
|
|
||||||
|
|
||||||
|
|
||||||
#define Alpha(x) ((x) >> 24)
|
|
||||||
#define Red(x) (((x) >> 16) & 0xff)
|
|
||||||
#define Green(x) (((x) >> 8) & 0xff)
|
|
||||||
#define Blue(x) ((x) & 0xff)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns TRUE if the fbComposeGetSolid can be used to get a single solid
|
|
||||||
* color representing every source sampling location of the picture.
|
|
||||||
*/
|
|
||||||
static INLINE Bool
|
|
||||||
fbCanGetSolid(PicturePtr pict)
|
|
||||||
{
|
|
||||||
if (pict->pDrawable == NULL ||
|
|
||||||
pict->pDrawable->width != 1 ||
|
|
||||||
pict->pDrawable->height != 1)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
if (pict->repeat != RepeatNormal)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
switch (pict->format) {
|
|
||||||
case PICT_a8r8g8b8:
|
|
||||||
case PICT_x8r8g8b8:
|
|
||||||
case PICT_a8b8g8r8:
|
|
||||||
case PICT_x8b8g8r8:
|
|
||||||
case PICT_b8g8r8a8:
|
|
||||||
case PICT_b8g8r8x8:
|
|
||||||
case PICT_r8g8b8:
|
|
||||||
case PICT_b8g8r8:
|
|
||||||
case PICT_r5g6b5:
|
|
||||||
case PICT_b5g6r5:
|
|
||||||
return TRUE;
|
|
||||||
default:
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define fbComposeGetSolid(pict, bits, fmt) { \
|
|
||||||
FbBits *__bits__; \
|
|
||||||
FbStride __stride__; \
|
|
||||||
int __bpp__; \
|
|
||||||
int __xoff__,__yoff__; \
|
|
||||||
\
|
|
||||||
fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \
|
|
||||||
switch (__bpp__) { \
|
|
||||||
case 32: \
|
|
||||||
(bits) = READ((CARD32 *) __bits__); \
|
|
||||||
break; \
|
|
||||||
case 24: \
|
|
||||||
(bits) = Fetch24 ((CARD8 *) __bits__); \
|
|
||||||
break; \
|
|
||||||
case 16: \
|
|
||||||
(bits) = READ((CARD16 *) __bits__); \
|
|
||||||
(bits) = cvt0565to0888(bits); \
|
|
||||||
break; \
|
|
||||||
case 8: \
|
|
||||||
(bits) = READ((CARD8 *) __bits__); \
|
|
||||||
(bits) = (bits) << 24; \
|
|
||||||
break; \
|
|
||||||
case 1: \
|
|
||||||
(bits) = READ((CARD32 *) __bits__); \
|
|
||||||
(bits) = FbLeftStipBits((bits),1) ? 0xff000000 : 0x00000000;\
|
|
||||||
break; \
|
|
||||||
default: \
|
|
||||||
return; \
|
|
||||||
} \
|
|
||||||
/* If necessary, convert RGB <--> BGR. */ \
|
|
||||||
if (PICT_FORMAT_TYPE((pict)->format) != PICT_FORMAT_TYPE(fmt)) \
|
|
||||||
{ \
|
|
||||||
(bits) = (((bits) & 0xff000000) | \
|
|
||||||
(((bits) & 0x00ff0000) >> 16) | \
|
|
||||||
(((bits) & 0x0000ff00) >> 0) | \
|
|
||||||
(((bits) & 0x000000ff) << 16)); \
|
|
||||||
} \
|
|
||||||
/* manage missing src alpha */ \
|
|
||||||
if ((pict)->pFormat->direct.alphaMask == 0) \
|
|
||||||
(bits) |= 0xff000000; \
|
|
||||||
fbFinishAccess ((pict)->pDrawable); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define fbComposeGetStart(pict,x,y,type,stride,line,mul) {\
|
|
||||||
FbBits *__bits__; \
|
|
||||||
FbStride __stride__; \
|
|
||||||
int __bpp__; \
|
|
||||||
int __xoff__,__yoff__; \
|
|
||||||
\
|
|
||||||
fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \
|
|
||||||
(stride) = __stride__ * sizeof (FbBits) / sizeof (type); \
|
|
||||||
(line) = ((type *) __bits__) + (stride) * ((y) + __yoff__) + (mul) * ((x) + __xoff__); \
|
|
||||||
}
|
|
||||||
#define cvt8888to0565(s) ((((s) >> 3) & 0x001f) | \
|
|
||||||
(((s) >> 5) & 0x07e0) | \
|
|
||||||
(((s) >> 8) & 0xf800))
|
|
||||||
#define cvt0565to0888(s) (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \
|
|
||||||
((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \
|
|
||||||
((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))
|
|
||||||
|
|
||||||
#if IMAGE_BYTE_ORDER == MSBFirst
|
|
||||||
#define Fetch24(a) ((unsigned long) (a) & 1 ? \
|
|
||||||
((READ(a) << 16) | READ((CARD16 *) ((a)+1))) : \
|
|
||||||
((READ((CARD16 *) (a)) << 8) | READ((a)+2)))
|
|
||||||
#define Store24(a,v) ((unsigned long) (a) & 1 ? \
|
|
||||||
(WRITE(a, (CARD8) ((v) >> 16)), \
|
|
||||||
WRITE((CARD16 *) ((a)+1), (CARD16) (v))) : \
|
|
||||||
(WRITE((CARD16 *) (a), (CARD16) ((v) >> 8)), \
|
|
||||||
WRITE((a)+2, (CARD8) (v))))
|
|
||||||
#else
|
|
||||||
#define Fetch24(a) ((unsigned long) (a) & 1 ? \
|
|
||||||
(READ(a) | (READ((CARD16 *) ((a)+1)) << 8)) : \
|
|
||||||
(READ((CARD16 *) (a)) | (READ((a)+2) << 16)))
|
|
||||||
#define Store24(a,v) ((unsigned long) (a) & 1 ? \
|
|
||||||
(WRITE(a, (CARD8) (v)), \
|
|
||||||
WRITE((CARD16 *) ((a)+1), (CARD16) ((v) >> 8))) : \
|
|
||||||
(WRITE((CARD16 *) (a), (CARD16) (v)),\
|
|
||||||
WRITE((a)+2, (CARD8) ((v) >> 16))))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
The methods below use some tricks to be able to do two color
|
|
||||||
components at the same time.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
x_c = (x_c * a) / 255
|
|
||||||
*/
|
|
||||||
#define FbByteMul(x, a) do { \
|
|
||||||
CARD32 t = ((x & 0xff00ff) * a) + 0x800080; \
|
|
||||||
t = (t + ((t >> 8) & 0xff00ff)) >> 8; \
|
|
||||||
t &= 0xff00ff; \
|
|
||||||
\
|
|
||||||
x = (((x >> 8) & 0xff00ff) * a) + 0x800080; \
|
|
||||||
x = (x + ((x >> 8) & 0xff00ff)); \
|
|
||||||
x &= 0xff00ff00; \
|
|
||||||
x += t; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/*
|
|
||||||
x_c = (x_c * a) / 255 + y
|
|
||||||
*/
|
|
||||||
#define FbByteMulAdd(x, a, y) do { \
|
|
||||||
CARD32 t = ((x & 0xff00ff) * a) + 0x800080; \
|
|
||||||
t = (t + ((t >> 8) & 0xff00ff)) >> 8; \
|
|
||||||
t &= 0xff00ff; \
|
|
||||||
t += y & 0xff00ff; \
|
|
||||||
t |= 0x1000100 - ((t >> 8) & 0xff00ff); \
|
|
||||||
t &= 0xff00ff; \
|
|
||||||
\
|
|
||||||
x = (((x >> 8) & 0xff00ff) * a) + 0x800080; \
|
|
||||||
x = (x + ((x >> 8) & 0xff00ff)) >> 8; \
|
|
||||||
x &= 0xff00ff; \
|
|
||||||
x += (y >> 8) & 0xff00ff; \
|
|
||||||
x |= 0x1000100 - ((x >> 8) & 0xff00ff); \
|
|
||||||
x &= 0xff00ff; \
|
|
||||||
x <<= 8; \
|
|
||||||
x += t; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/*
|
|
||||||
x_c = (x_c * a + y_c * b) / 255
|
|
||||||
*/
|
|
||||||
#define FbByteAddMul(x, a, y, b) do { \
|
|
||||||
CARD32 t; \
|
|
||||||
CARD32 r = (x >> 24) * a + (y >> 24) * b + 0x80; \
|
|
||||||
r += (r >> 8); \
|
|
||||||
r >>= 8; \
|
|
||||||
\
|
|
||||||
t = (x & 0xff00) * a + (y & 0xff00) * b; \
|
|
||||||
t += (t >> 8) + 0x8000; \
|
|
||||||
t >>= 16; \
|
|
||||||
\
|
|
||||||
t |= r << 16; \
|
|
||||||
t |= 0x1000100 - ((t >> 8) & 0xff00ff); \
|
|
||||||
t &= 0xff00ff; \
|
|
||||||
t <<= 8; \
|
|
||||||
\
|
|
||||||
r = ((x >> 16) & 0xff) * a + ((y >> 16) & 0xff) * b + 0x80; \
|
|
||||||
r += (r >> 8); \
|
|
||||||
r >>= 8; \
|
|
||||||
\
|
|
||||||
x = (x & 0xff) * a + (y & 0xff) * b + 0x80; \
|
|
||||||
x += (x >> 8); \
|
|
||||||
x >>= 8; \
|
|
||||||
x |= r << 16; \
|
|
||||||
x |= 0x1000100 - ((x >> 8) & 0xff00ff); \
|
|
||||||
x &= 0xff00ff; \
|
|
||||||
x |= t; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/*
|
|
||||||
x_c = (x_c * a + y_c *b) / 256
|
|
||||||
*/
|
|
||||||
#define FbByteAddMul_256(x, a, y, b) do { \
|
|
||||||
CARD32 t = (x & 0xff00ff) * a + (y & 0xff00ff) * b; \
|
|
||||||
t >>= 8; \
|
|
||||||
t &= 0xff00ff; \
|
|
||||||
\
|
|
||||||
x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b; \
|
|
||||||
x &= 0xff00ff00; \
|
|
||||||
x += t; \
|
|
||||||
} while (0)
|
|
||||||
/*
|
|
||||||
x_c = (x_c * a_c) / 255
|
|
||||||
*/
|
|
||||||
#define FbByteMulC(x, a) do { \
|
|
||||||
CARD32 t; \
|
|
||||||
CARD32 r = (x & 0xff) * (a & 0xff); \
|
|
||||||
r |= (x & 0xff0000) * ((a >> 16) & 0xff); \
|
|
||||||
r += 0x800080; \
|
|
||||||
r = (r + ((r >> 8) & 0xff00ff)) >> 8; \
|
|
||||||
r &= 0xff00ff; \
|
|
||||||
\
|
|
||||||
x >>= 8; \
|
|
||||||
t = (x & 0xff) * ((a >> 8) & 0xff); \
|
|
||||||
t |= (x & 0xff0000) * (a >> 24); \
|
|
||||||
t += 0x800080; \
|
|
||||||
t = t + ((t >> 8) & 0xff00ff); \
|
|
||||||
x = r | (t & 0xff00ff00); \
|
|
||||||
\
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/*
|
|
||||||
x_c = (x_c * a) / 255 + y
|
|
||||||
*/
|
|
||||||
#define FbByteMulAddC(x, a, y) do { \
|
|
||||||
CARD32 t; \
|
|
||||||
CARD32 r = (x & 0xff) * (a & 0xff); \
|
|
||||||
r |= (x & 0xff0000) * ((a >> 16) & 0xff); \
|
|
||||||
r += 0x800080; \
|
|
||||||
r = (r + ((r >> 8) & 0xff00ff)) >> 8; \
|
|
||||||
r &= 0xff00ff; \
|
|
||||||
r += y & 0xff00ff; \
|
|
||||||
r |= 0x1000100 - ((r >> 8) & 0xff00ff); \
|
|
||||||
r &= 0xff00ff; \
|
|
||||||
\
|
|
||||||
x >>= 8; \
|
|
||||||
t = (x & 0xff) * ((a >> 8) & 0xff); \
|
|
||||||
t |= (x & 0xff0000) * (a >> 24); \
|
|
||||||
t += 0x800080; \
|
|
||||||
t = (t + ((t >> 8) & 0xff00ff)) >> 8; \
|
|
||||||
t &= 0xff00ff; \
|
|
||||||
t += (y >> 8) & 0xff00ff; \
|
|
||||||
t |= 0x1000100 - ((t >> 8) & 0xff00ff); \
|
|
||||||
t &= 0xff00ff; \
|
|
||||||
x = r | (t << 8); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/*
|
|
||||||
x_c = (x_c * a_c + y_c * b) / 255
|
|
||||||
*/
|
|
||||||
#define FbByteAddMulC(x, a, y, b) do { \
|
|
||||||
CARD32 t; \
|
|
||||||
CARD32 r = (x >> 24) * (a >> 24) + (y >> 24) * b; \
|
|
||||||
r += (r >> 8) + 0x80; \
|
|
||||||
r >>= 8; \
|
|
||||||
\
|
|
||||||
t = (x & 0xff00) * ((a >> 8) & 0xff) + (y & 0xff00) * b; \
|
|
||||||
t += (t >> 8) + 0x8000; \
|
|
||||||
t >>= 16; \
|
|
||||||
\
|
|
||||||
t |= r << 16; \
|
|
||||||
t |= 0x1000100 - ((t >> 8) & 0xff00ff); \
|
|
||||||
t &= 0xff00ff; \
|
|
||||||
t <<= 8; \
|
|
||||||
\
|
|
||||||
r = ((x >> 16) & 0xff) * ((a >> 16) & 0xff) + ((y >> 16) & 0xff) * b + 0x80; \
|
|
||||||
r += (r >> 8); \
|
|
||||||
r >>= 8; \
|
|
||||||
\
|
|
||||||
x = (x & 0xff) * (a & 0xff) + (y & 0xff) * b + 0x80; \
|
|
||||||
x += (x >> 8); \
|
|
||||||
x >>= 8; \
|
|
||||||
x |= r << 16; \
|
|
||||||
x |= 0x1000100 - ((x >> 8) & 0xff00ff); \
|
|
||||||
x &= 0xff00ff; \
|
|
||||||
x |= t; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/*
|
|
||||||
x_c = min(x_c + y_c, 255)
|
|
||||||
*/
|
|
||||||
#define FbByteAdd(x, y) do { \
|
|
||||||
CARD32 t; \
|
|
||||||
CARD32 r = (x & 0xff00ff) + (y & 0xff00ff); \
|
|
||||||
r |= 0x1000100 - ((r >> 8) & 0xff00ff); \
|
|
||||||
r &= 0xff00ff; \
|
|
||||||
\
|
|
||||||
t = ((x >> 8) & 0xff00ff) + ((y >> 8) & 0xff00ff); \
|
|
||||||
t |= 0x1000100 - ((t >> 8) & 0xff00ff); \
|
|
||||||
r |= (t & 0xff00ff) << 8; \
|
|
||||||
x = r; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define div_255(x) (((x) + 0x80 + (((x) + 0x80) >> 8)) >> 8)
|
|
||||||
|
|
||||||
#if defined(__i386__) && defined(__GNUC__)
|
|
||||||
#define FASTCALL __attribute__((regparm(3)))
|
|
||||||
#else
|
|
||||||
#define FASTCALL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct _FbComposeData {
|
|
||||||
CARD8 op;
|
|
||||||
PicturePtr src;
|
|
||||||
PicturePtr mask;
|
|
||||||
PicturePtr dest;
|
|
||||||
INT16 xSrc;
|
|
||||||
INT16 ySrc;
|
|
||||||
INT16 xMask;
|
|
||||||
INT16 yMask;
|
|
||||||
INT16 xDest;
|
|
||||||
INT16 yDest;
|
|
||||||
CARD16 width;
|
|
||||||
CARD16 height;
|
|
||||||
} FbComposeData;
|
|
||||||
|
|
||||||
extern _X_EXPORT void
|
|
||||||
fbCompositeRect (const FbComposeData *data, CARD32 *scanline_buffer);
|
|
||||||
|
|
||||||
typedef FASTCALL void (*CombineMaskU) (CARD32 *src, const CARD32 *mask, int width);
|
|
||||||
typedef FASTCALL void (*CombineFuncU) (CARD32 *dest, const CARD32 *src, int width);
|
|
||||||
typedef FASTCALL void (*CombineFuncC) (CARD32 *dest, CARD32 *src, CARD32 *mask, int width);
|
|
||||||
|
|
||||||
typedef struct _FbComposeFunctions {
|
|
||||||
CombineFuncU *combineU;
|
|
||||||
CombineFuncC *combineC;
|
|
||||||
CombineMaskU combineMaskU;
|
|
||||||
} FbComposeFunctions;
|
|
||||||
|
|
||||||
/* fbcompose.c */
|
|
||||||
|
|
||||||
extern _X_EXPORT void
|
|
||||||
fbCompositeGeneral (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
/* fbpict.c */
|
/* fbpict.c */
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
fbComposite (CARD8 op,
|
fbComposite (CARD8 op,
|
||||||
|
@ -429,36 +43,6 @@ fbComposite (CARD8 op,
|
||||||
CARD16 width,
|
CARD16 width,
|
||||||
CARD16 height);
|
CARD16 height);
|
||||||
|
|
||||||
typedef void (*CompositeFunc) (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
extern _X_EXPORT void
|
|
||||||
fbWalkCompositeRegion (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height,
|
|
||||||
Bool srcRepeat,
|
|
||||||
Bool maskRepeat,
|
|
||||||
CompositeFunc compositeRect);
|
|
||||||
|
|
||||||
/* fbtrap.c */
|
/* fbtrap.c */
|
||||||
|
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
#include "picturestr.h"
|
#include "picturestr.h"
|
||||||
#include "mipict.h"
|
#include "mipict.h"
|
||||||
#include "renderedge.h"
|
|
||||||
#include "fbpict.h"
|
#include "fbpict.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -39,20 +39,6 @@
|
||||||
#define fbClearVisualTypes wfbClearVisualTypes
|
#define fbClearVisualTypes wfbClearVisualTypes
|
||||||
#define fbCloseScreen wfbCloseScreen
|
#define fbCloseScreen wfbCloseScreen
|
||||||
#define fbComposite wfbComposite
|
#define fbComposite wfbComposite
|
||||||
#define fbCompositeGeneral wfbCompositeGeneral
|
|
||||||
#define fbCompositeSolidMask_nx1xn wfbCompositeSolidMask_nx1xn
|
|
||||||
#define fbCompositeSolidMask_nx8888x0565C wfbCompositeSolidMask_nx8888x0565C
|
|
||||||
#define fbCompositeSolidMask_nx8888x8888C wfbCompositeSolidMask_nx8888x8888C
|
|
||||||
#define fbCompositeSolidMask_nx8x0565 wfbCompositeSolidMask_nx8x0565
|
|
||||||
#define fbCompositeSolidMask_nx8x0888 wfbCompositeSolidMask_nx8x0888
|
|
||||||
#define fbCompositeSolidMask_nx8x8888 wfbCompositeSolidMask_nx8x8888
|
|
||||||
#define fbCompositeSrc_0565x0565 wfbCompositeSrc_0565x0565
|
|
||||||
#define fbCompositeSrc_8888x0565 wfbCompositeSrc_8888x0565
|
|
||||||
#define fbCompositeSrc_8888x0888 wfbCompositeSrc_8888x0888
|
|
||||||
#define fbCompositeSrc_8888x8888 wfbCompositeSrc_8888x8888
|
|
||||||
#define fbCompositeSrcAdd_1000x1000 wfbCompositeSrcAdd_1000x1000
|
|
||||||
#define fbCompositeSrcAdd_8000x8000 wfbCompositeSrcAdd_8000x8000
|
|
||||||
#define fbCompositeSrcAdd_8888x8888 wfbCompositeSrcAdd_8888x8888
|
|
||||||
#define fbCopy1toN wfbCopy1toN
|
#define fbCopy1toN wfbCopy1toN
|
||||||
#define fbCopyArea wfbCopyArea
|
#define fbCopyArea wfbCopyArea
|
||||||
#define fbCopyNto1 wfbCopyNto1
|
#define fbCopyNto1 wfbCopyNto1
|
||||||
|
@ -149,7 +135,6 @@
|
||||||
#define fbPutXYImage wfbPutXYImage
|
#define fbPutXYImage wfbPutXYImage
|
||||||
#define fbPutZImage wfbPutZImage
|
#define fbPutZImage wfbPutZImage
|
||||||
#define fbQueryBestSize wfbQueryBestSize
|
#define fbQueryBestSize wfbQueryBestSize
|
||||||
#define fbRasterizeEdges wfbRasterizeEdges
|
|
||||||
#define fbRasterizeTrapezoid wfbRasterizeTrapezoid
|
#define fbRasterizeTrapezoid wfbRasterizeTrapezoid
|
||||||
#define fbRealizeFont wfbRealizeFont
|
#define fbRealizeFont wfbRealizeFont
|
||||||
#define fbReduceRasterOp wfbReduceRasterOp
|
#define fbReduceRasterOp wfbReduceRasterOp
|
||||||
|
@ -179,10 +164,8 @@
|
||||||
#define fbUnmapWindow wfbUnmapWindow
|
#define fbUnmapWindow wfbUnmapWindow
|
||||||
#define fbUnrealizeFont wfbUnrealizeFont
|
#define fbUnrealizeFont wfbUnrealizeFont
|
||||||
#define fbValidateGC wfbValidateGC
|
#define fbValidateGC wfbValidateGC
|
||||||
#define fbWalkCompositeRegion wfbWalkCompositeRegion
|
|
||||||
#define fbWinPrivateKeyRec wfbWinPrivateKeyRec
|
#define fbWinPrivateKeyRec wfbWinPrivateKeyRec
|
||||||
#define fbZeroLine wfbZeroLine
|
#define fbZeroLine wfbZeroLine
|
||||||
#define fbZeroSegment wfbZeroSegment
|
#define fbZeroSegment wfbZeroSegment
|
||||||
#define free_pixman_pict wfb_free_pixman_pict
|
#define free_pixman_pict wfb_free_pixman_pict
|
||||||
#define image_from_pict wfb_image_from_pict
|
#define image_from_pict wfb_image_from_pict
|
||||||
#define composeFunctions wfbComposeFunctions
|
|
||||||
|
|
|
@ -834,9 +834,7 @@ static void __glXReportDamage(__DRIdrawable *driDraw,
|
||||||
|
|
||||||
RegionInit(®ion, (BoxPtr) rects, num_rects);
|
RegionInit(®ion, (BoxPtr) rects, num_rects);
|
||||||
RegionTranslate(®ion, pDraw->x, pDraw->y);
|
RegionTranslate(®ion, pDraw->x, pDraw->y);
|
||||||
DamageRegionAppend(pDraw, ®ion);
|
DamageDamageRegion(pDraw, ®ion);
|
||||||
/* This is wrong, this needs a seperate function. */
|
|
||||||
DamageRegionProcessPending(pDraw);
|
|
||||||
RegionUninit(®ion);
|
RegionUninit(®ion);
|
||||||
|
|
||||||
__glXleaveServer(GL_FALSE);
|
__glXleaveServer(GL_FALSE);
|
||||||
|
@ -1160,9 +1158,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
||||||
*/
|
*/
|
||||||
buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
|
buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
|
||||||
if (buffer_size > 0) {
|
if (buffer_size > 0) {
|
||||||
if (screen->base.GLXextensions != NULL) {
|
free(screen->base.GLXextensions);
|
||||||
free(screen->base.GLXextensions);
|
|
||||||
}
|
|
||||||
|
|
||||||
screen->base.GLXextensions = xnfalloc(buffer_size);
|
screen->base.GLXextensions = xnfalloc(buffer_size);
|
||||||
(void) __glXGetExtensionString(screen->glx_enable_bits,
|
(void) __glXGetExtensionString(screen->glx_enable_bits,
|
||||||
|
|
|
@ -792,9 +792,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
||||||
*/
|
*/
|
||||||
buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
|
buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
|
||||||
if (buffer_size > 0) {
|
if (buffer_size > 0) {
|
||||||
if (screen->base.GLXextensions != NULL) {
|
free(screen->base.GLXextensions);
|
||||||
free(screen->base.GLXextensions);
|
|
||||||
}
|
|
||||||
|
|
||||||
screen->base.GLXextensions = xnfalloc(buffer_size);
|
screen->base.GLXextensions = xnfalloc(buffer_size);
|
||||||
(void) __glXGetExtensionString(screen->glx_enable_bits,
|
(void) __glXGetExtensionString(screen->glx_enable_bits,
|
||||||
|
|
|
@ -346,9 +346,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
|
||||||
cl->GLClientextensions);
|
cl->GLClientextensions);
|
||||||
buf = __glXcombine_strings(buf1,
|
buf = __glXcombine_strings(buf1,
|
||||||
cx->pGlxScreen->GLextensions);
|
cx->pGlxScreen->GLextensions);
|
||||||
if (buf1 != NULL) {
|
free(buf1);
|
||||||
free(buf1);
|
|
||||||
}
|
|
||||||
string = buf;
|
string = buf;
|
||||||
}
|
}
|
||||||
else if ( name == GL_VERSION ) {
|
else if ( name == GL_VERSION ) {
|
||||||
|
@ -377,8 +375,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
|
||||||
|
|
||||||
__GLX_SEND_HEADER();
|
__GLX_SEND_HEADER();
|
||||||
WriteToClient(client, length, (char *) string);
|
WriteToClient(client, length, (char *) string);
|
||||||
if (buf != NULL)
|
free(buf);
|
||||||
free(buf);
|
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2565,7 +2565,7 @@ int __glXClientInfo(__GLXclientState *cl, GLbyte *pc)
|
||||||
|
|
||||||
cl->GLClientmajorVersion = req->major;
|
cl->GLClientmajorVersion = req->major;
|
||||||
cl->GLClientminorVersion = req->minor;
|
cl->GLClientminorVersion = req->minor;
|
||||||
if (cl->GLClientextensions) free(cl->GLClientextensions);
|
free(cl->GLClientextensions);
|
||||||
buf = (const char *)(req+1);
|
buf = (const char *)(req+1);
|
||||||
cl->GLClientextensions = strdup(buf);
|
cl->GLClientextensions = strdup(buf);
|
||||||
|
|
||||||
|
|
|
@ -77,10 +77,10 @@ static void ResetClientState(int clientIndex)
|
||||||
Display **keep_be_displays;
|
Display **keep_be_displays;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (cl->returnBuf) free(cl->returnBuf);
|
free(cl->returnBuf);
|
||||||
if (cl->currentContexts) free(cl->currentContexts);
|
free(cl->currentContexts);
|
||||||
if (cl->currentDrawables) free(cl->currentDrawables);
|
free(cl->currentDrawables);
|
||||||
if (cl->largeCmdBuf) free(cl->largeCmdBuf);
|
free(cl->largeCmdBuf);
|
||||||
|
|
||||||
for (i=0; i< screenInfo.numScreens; i++) {
|
for (i=0; i< screenInfo.numScreens; i++) {
|
||||||
if (cl->be_displays[i])
|
if (cl->be_displays[i])
|
||||||
|
@ -97,7 +97,7 @@ static void ResetClientState(int clientIndex)
|
||||||
*/
|
*/
|
||||||
cl->GLClientmajorVersion = 1;
|
cl->GLClientmajorVersion = 1;
|
||||||
cl->GLClientminorVersion = 0;
|
cl->GLClientminorVersion = 0;
|
||||||
if (cl->GLClientextensions) free(cl->GLClientextensions);
|
free(cl->GLClientextensions);
|
||||||
|
|
||||||
memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
|
memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
|
||||||
}
|
}
|
||||||
|
@ -222,10 +222,10 @@ GLboolean __glXFreeContext(__GLXcontext *cx)
|
||||||
{
|
{
|
||||||
if (cx->idExists || cx->isCurrent) return GL_FALSE;
|
if (cx->idExists || cx->isCurrent) return GL_FALSE;
|
||||||
|
|
||||||
if (cx->feedbackBuf) free(cx->feedbackBuf);
|
free(cx->feedbackBuf);
|
||||||
if (cx->selectBuf) free(cx->selectBuf);
|
free(cx->selectBuf);
|
||||||
if (cx->real_ids) free(cx->real_ids);
|
free(cx->real_ids);
|
||||||
if (cx->real_vids) free(cx->real_vids);
|
free(cx->real_vids);
|
||||||
|
|
||||||
if (cx->pGlxPixmap) {
|
if (cx->pGlxPixmap) {
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -215,11 +215,8 @@ fakeUnmapFramebuffer (KdScreenInfo *screen)
|
||||||
{
|
{
|
||||||
FakePriv *priv = screen->card->driver;
|
FakePriv *priv = screen->card->driver;
|
||||||
KdShadowFbFree (screen);
|
KdShadowFbFree (screen);
|
||||||
if (priv->base)
|
free(priv->base);
|
||||||
{
|
priv->base = NULL;
|
||||||
free (priv->base);
|
|
||||||
priv->base = 0;
|
|
||||||
}
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,15 +117,22 @@ TslibEnable (KdPointerInfo *pi)
|
||||||
pi->path = strdup("/dev/input/touchscreen0");
|
pi->path = strdup("/dev/input/touchscreen0");
|
||||||
ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", pi->path);
|
ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", pi->path);
|
||||||
}
|
}
|
||||||
|
|
||||||
private->tsDev = ts_open(pi->path, 0);
|
private->tsDev = ts_open(pi->path, 0);
|
||||||
private->fd = ts_fd(private->tsDev);
|
if (!private->tsDev) {
|
||||||
if (!private->tsDev || ts_config(private->tsDev) || private->fd < 0) {
|
|
||||||
ErrorF("[tslib/TslibEnable] failed to open %s\n", pi->path);
|
ErrorF("[tslib/TslibEnable] failed to open %s\n", pi->path);
|
||||||
if (private->fd >= 0)
|
|
||||||
close(private->fd);
|
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ts_config(private->tsDev)) {
|
||||||
|
ErrorF("[tslib/TslibEnable] failed to load configuration\n");
|
||||||
|
ts_close(private->tsDev);
|
||||||
|
private->tsDev = NULL;
|
||||||
|
return BadValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
private->fd = ts_fd(private->tsDev);
|
||||||
|
|
||||||
KdRegisterFd(private->fd, TsRead, pi);
|
KdRegisterFd(private->fd, TsRead, pi);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
@ -17,8 +17,6 @@ if DGA
|
||||||
DGASOURCES = xf86DGA.c
|
DGASOURCES = xf86DGA.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
XISOURCES = xf86Xinput.c xisb.c
|
|
||||||
XISDKINCS = xf86Xinput.h xisb.h
|
|
||||||
RANDRSOURCES = xf86RandR.c
|
RANDRSOURCES = xf86RandR.c
|
||||||
|
|
||||||
BUSSOURCES = xf86pciBus.c xf86fbBus.c xf86noBus.c $(SBUS_SOURCES)
|
BUSSOURCES = xf86pciBus.c xf86fbBus.c xf86noBus.c $(SBUS_SOURCES)
|
||||||
|
|
|
@ -77,19 +77,19 @@
|
||||||
"/etc/X11/%R," "%P/etc/X11/%R," \
|
"/etc/X11/%R," "%P/etc/X11/%R," \
|
||||||
"%E," "%F," \
|
"%E," "%F," \
|
||||||
"/etc/X11/%F," "%P/etc/X11/%F," \
|
"/etc/X11/%F," "%P/etc/X11/%F," \
|
||||||
"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
|
"/etc/X11/%X," "/etc/%X," \
|
||||||
"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
|
"%P/etc/X11/%X.%H," \
|
||||||
"%P/etc/X11/%X," \
|
"%P/etc/X11/%X," \
|
||||||
"%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
|
"%P/lib/X11/%X.%H," \
|
||||||
"%P/lib/X11/%X"
|
"%P/lib/X11/%X"
|
||||||
#endif
|
#endif
|
||||||
#ifndef USER_CONFIGPATH
|
#ifndef USER_CONFIGPATH
|
||||||
#define USER_CONFIGPATH "/etc/X11/%S," "%P/etc/X11/%S," \
|
#define USER_CONFIGPATH "/etc/X11/%S," "%P/etc/X11/%S," \
|
||||||
"/etc/X11/%G," "%P/etc/X11/%G," \
|
"/etc/X11/%G," "%P/etc/X11/%G," \
|
||||||
"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
|
"/etc/X11/%X," "/etc/%X," \
|
||||||
"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
|
"%P/etc/X11/%X.%H," \
|
||||||
"%P/etc/X11/%X," \
|
"%P/etc/X11/%X," \
|
||||||
"%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
|
"%P/lib/X11/%X.%H," \
|
||||||
"%P/lib/X11/%X"
|
"%P/lib/X11/%X"
|
||||||
#endif
|
#endif
|
||||||
#ifndef ROOT_CONFIGDIRPATH
|
#ifndef ROOT_CONFIGDIRPATH
|
||||||
|
@ -503,7 +503,6 @@ fixup_video_driver_list(char **drivers)
|
||||||
static const char *fallback[4] = { "vesa", "fbdev", "wsfb", NULL };
|
static const char *fallback[4] = { "vesa", "fbdev", "wsfb", NULL };
|
||||||
char **end, **drv;
|
char **end, **drv;
|
||||||
char *x;
|
char *x;
|
||||||
char **ati, **atimisc;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* walk to the end of the list */
|
/* walk to the end of the list */
|
||||||
|
@ -523,24 +522,6 @@ fixup_video_driver_list(char **drivers)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* since the ati wrapper driver is gross and awful, sort ati before
|
|
||||||
* atimisc, which makes sure all the ati symbols are visible in xorgcfg.
|
|
||||||
*/
|
|
||||||
for (drv = drivers; drv != end; drv++) {
|
|
||||||
if (!strcmp(*drv, "atimisc")) {
|
|
||||||
atimisc = drv;
|
|
||||||
for (drv = atimisc; drv != end; drv++) {
|
|
||||||
if (!strcmp(*drv, "ati")) {
|
|
||||||
ati = drv;
|
|
||||||
x = *ati; *ati = *atimisc; *atimisc = x;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* if we get here, ati was already ahead of atimisc */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static char **
|
static char **
|
||||||
|
@ -548,7 +529,7 @@ GenerateDriverlist(char * dirname)
|
||||||
{
|
{
|
||||||
char **ret;
|
char **ret;
|
||||||
const char *subdirs[] = { dirname, NULL };
|
const char *subdirs[] = { dirname, NULL };
|
||||||
static const char *patlist[] = {"(.*)_drv\\.so", "(.*)_drv\\.o", NULL};
|
static const char *patlist[] = {"(.*)_drv\\.so", NULL};
|
||||||
ret = LoaderListDirs(subdirs, patlist);
|
ret = LoaderListDirs(subdirs, patlist);
|
||||||
|
|
||||||
/* fix up the probe order for video drivers */
|
/* fix up the probe order for video drivers */
|
||||||
|
@ -760,8 +741,6 @@ static OptionInfoRec FlagOptions[] = {
|
||||||
{0}, FALSE },
|
{0}, FALSE },
|
||||||
{ FLAG_AIGLX, "AIGLX", OPTV_BOOLEAN,
|
{ FLAG_AIGLX, "AIGLX", OPTV_BOOLEAN,
|
||||||
{0}, FALSE },
|
{0}, FALSE },
|
||||||
{ FLAG_ALLOW_EMPTY_INPUT, "AllowEmptyInput", OPTV_BOOLEAN,
|
|
||||||
{0}, FALSE },
|
|
||||||
{ FLAG_IGNORE_ABI, "IgnoreABI", OPTV_BOOLEAN,
|
{ FLAG_IGNORE_ABI, "IgnoreABI", OPTV_BOOLEAN,
|
||||||
{0}, FALSE },
|
{0}, FALSE },
|
||||||
{ FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN,
|
{ FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN,
|
||||||
|
@ -974,7 +953,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
|
|
||||||
/* AllowEmptyInput is automatically true if we're hotplugging */
|
/* AllowEmptyInput is automatically true if we're hotplugging */
|
||||||
xf86Info.allowEmptyInput = (xf86Info.autoAddDevices && xf86Info.autoEnableDevices);
|
xf86Info.allowEmptyInput = (xf86Info.autoAddDevices && xf86Info.autoEnableDevices);
|
||||||
xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput);
|
|
||||||
|
|
||||||
/* AEI on? Then we're not using kbd, so use the evdev rules set. */
|
/* AEI on? Then we're not using kbd, so use the evdev rules set. */
|
||||||
#if defined(linux)
|
#if defined(linux)
|
||||||
|
@ -1433,8 +1411,10 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
||||||
"reconfigure %s or disable AutoAddDevices.\n",
|
"reconfigure %s or disable AutoAddDevices.\n",
|
||||||
config_backend, config_backend);
|
config_backend, config_backend);
|
||||||
#else
|
#else
|
||||||
xf86Msg(X_INFO, "Hotplugging is disabled and no input devices were configured.\n"
|
xf86Msg(X_WARNING, "Hotplugging requested but the server was "
|
||||||
"\tTry disabling AllowEmptyInput.\n");
|
"compiled without a config backend. "
|
||||||
|
"No input devices were configured, the server "
|
||||||
|
"will start without any input devices.\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2206,15 +2186,10 @@ configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device, Bool active)
|
||||||
static void
|
static void
|
||||||
configDRI(XF86ConfDRIPtr drip)
|
configDRI(XF86ConfDRIPtr drip)
|
||||||
{
|
{
|
||||||
int count = 0;
|
|
||||||
XF86ConfBuffersPtr bufs;
|
|
||||||
int i;
|
|
||||||
struct group *grp;
|
struct group *grp;
|
||||||
|
|
||||||
xf86ConfigDRI.group = -1;
|
xf86ConfigDRI.group = -1;
|
||||||
xf86ConfigDRI.mode = 0;
|
xf86ConfigDRI.mode = 0;
|
||||||
xf86ConfigDRI.bufs_count = 0;
|
|
||||||
xf86ConfigDRI.bufs = NULL;
|
|
||||||
|
|
||||||
if (drip) {
|
if (drip) {
|
||||||
if (drip->dri_group_name) {
|
if (drip->dri_group_name) {
|
||||||
|
@ -2225,24 +2200,6 @@ configDRI(XF86ConfDRIPtr drip)
|
||||||
xf86ConfigDRI.group = drip->dri_group;
|
xf86ConfigDRI.group = drip->dri_group;
|
||||||
}
|
}
|
||||||
xf86ConfigDRI.mode = drip->dri_mode;
|
xf86ConfigDRI.mode = drip->dri_mode;
|
||||||
for (bufs = drip->dri_buffers_lst; bufs; bufs = bufs->list.next)
|
|
||||||
++count;
|
|
||||||
|
|
||||||
xf86ConfigDRI.bufs_count = count;
|
|
||||||
xf86ConfigDRI.bufs = xnfalloc(count * sizeof(*xf86ConfigDRI.bufs));
|
|
||||||
|
|
||||||
for (i = 0, bufs = drip->dri_buffers_lst;
|
|
||||||
i < count;
|
|
||||||
i++, bufs = bufs->list.next) {
|
|
||||||
|
|
||||||
xf86ConfigDRI.bufs[i].count = bufs->buf_count;
|
|
||||||
xf86ConfigDRI.bufs[i].size = bufs->buf_size;
|
|
||||||
/* FIXME: Flags not implemented. These
|
|
||||||
could be used, for example, to specify a
|
|
||||||
contiguous block and/or write-combining
|
|
||||||
cache policy. */
|
|
||||||
xf86ConfigDRI.bufs[i].flags = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2371,7 +2328,7 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout) {
|
||||||
InputInfoPtr *current;
|
InputInfoPtr *current;
|
||||||
if (!warned)
|
if (!warned)
|
||||||
{
|
{
|
||||||
xf86Msg(X_WARNING, "AllowEmptyInput is on, devices using "
|
xf86Msg(X_WARNING, "Hotplugging is on, devices using "
|
||||||
"drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.\n");
|
"drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.\n");
|
||||||
warned = TRUE;
|
warned = TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1133,6 +1133,10 @@ DGAProcessPointerEvent (ScreenPtr pScreen, DGAEvent *event, DeviceIntPtr mouse)
|
||||||
ev.root_x = event->dx;
|
ev.root_x = event->dx;
|
||||||
ev.root_y = event->dy;
|
ev.root_y = event->dy;
|
||||||
ev.corestate = event->state;
|
ev.corestate = event->state;
|
||||||
|
/* DGA is core only, so valuators.data doesn't actually matter.
|
||||||
|
* Mask must be set for EventToCore to create motion events. */
|
||||||
|
SetBit(ev.valuators.mask, 0);
|
||||||
|
SetBit(ev.valuators.mask, 1);
|
||||||
DeliverGrabbedEvent ((InternalEvent*)&ev, mouse, FALSE);
|
DeliverGrabbedEvent ((InternalEvent*)&ev, mouse, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1831,8 +1831,6 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
|
||||||
numModes++;
|
numModes++;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef _VIRTUALX
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we estimated the virtual size above, we may have filtered away all
|
* If we estimated the virtual size above, we may have filtered away all
|
||||||
* the modes that maximally match that size; scan again to find out and
|
* the modes that maximally match that size; scan again to find out and
|
||||||
|
@ -1847,13 +1845,69 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (vx < virtX || vy < virtY) {
|
if (vx < virtX || vy < virtY) {
|
||||||
|
const int types[] = {
|
||||||
|
M_T_BUILTIN | M_T_PREFERRED,
|
||||||
|
M_T_BUILTIN,
|
||||||
|
M_T_DRIVER | M_T_PREFERRED,
|
||||||
|
M_T_DRIVER,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
const int ntypes = sizeof(types) / sizeof(int);
|
||||||
|
int n;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We did not find the estimated virtual size. So now we want to
|
||||||
|
* find the largest mode available, but we want to search in the
|
||||||
|
* modes in the order of "types" listed above.
|
||||||
|
*/
|
||||||
|
for (n = 0; n < ntypes; n++) {
|
||||||
|
int type = types[n];
|
||||||
|
|
||||||
|
vx = 0; vy = 0;
|
||||||
|
for (p = scrp->modes; p; p = p->next) {
|
||||||
|
/* scan through the modes in the sort order above */
|
||||||
|
if ((p->type & type) != type)
|
||||||
|
continue;
|
||||||
|
if (p->HDisplay > vx && p->VDisplay > vy) {
|
||||||
|
vx = p->HDisplay;
|
||||||
|
vy = p->VDisplay;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (vx && vy)
|
||||||
|
/* Found one */
|
||||||
|
break;
|
||||||
|
}
|
||||||
xf86DrvMsg(scrp->scrnIndex, X_WARNING,
|
xf86DrvMsg(scrp->scrnIndex, X_WARNING,
|
||||||
"Shrinking virtual size estimate from %dx%d to %dx%d\n",
|
"Shrinking virtual size estimate from %dx%d to %dx%d\n",
|
||||||
virtX, virtY, vx, vy);
|
virtX, virtY, vx, vy);
|
||||||
virtX = vx;
|
virtX = _VIRTUALX(vx);
|
||||||
virtY = vy;
|
virtY = vy;
|
||||||
linePitch = scanLineWidth(vx, vy, minPitch, apertureSize,
|
for (p = scrp->modes; p; p = p->next) {
|
||||||
BankFormat, pitchInc);
|
if (numModes > 0) {
|
||||||
|
if (p->HDisplay > virtX)
|
||||||
|
p->status = MODE_VIRTUAL_X;
|
||||||
|
if (p->VDisplay > virtY)
|
||||||
|
p->status = MODE_VIRTUAL_Y;
|
||||||
|
if (p->status != MODE_OK) {
|
||||||
|
numModes--;
|
||||||
|
printModeRejectMessage(scrp->scrnIndex, p, p->status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (linePitches != NULL) {
|
||||||
|
for (i = 0; linePitches[i] != 0; i++) {
|
||||||
|
if ((linePitches[i] >= virtX) &&
|
||||||
|
(linePitches[i] ==
|
||||||
|
scanLineWidth(virtX, virtY, linePitches[i],
|
||||||
|
apertureSize, BankFormat, pitchInc))) {
|
||||||
|
linePitch = linePitches[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
linePitch = scanLineWidth(virtX, virtY, minPitch,
|
||||||
|
apertureSize, BankFormat, pitchInc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1266,40 +1266,43 @@ xf86FirstLocalDevice(void)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cx - raw data from touch screen
|
* Cx - raw data from touch screen
|
||||||
* Sxhigh - scaled highest dimension
|
* to_max - scaled highest dimension
|
||||||
* (remember, this is of rows - 1 because of 0 origin)
|
* (remember, this is of rows - 1 because of 0 origin)
|
||||||
* Sxlow - scaled lowest dimension
|
* to_min - scaled lowest dimension
|
||||||
* Rxhigh - highest raw value from touch screen calibration
|
* from_max - highest raw value from touch screen calibration
|
||||||
* Rxlow - lowest raw value from touch screen calibration
|
* from_min - lowest raw value from touch screen calibration
|
||||||
*
|
*
|
||||||
* This function is the same for X or Y coordinates.
|
* This function is the same for X or Y coordinates.
|
||||||
* You may have to reverse the high and low values to compensate for
|
* You may have to reverse the high and low values to compensate for
|
||||||
* different orgins on the touch screen vs X.
|
* different orgins on the touch screen vs X.
|
||||||
|
*
|
||||||
|
* e.g. to scale from device coordinates into screen coordinates, call
|
||||||
|
* xf86ScaleAxis(x, 0, screen_width, dev_min, dev_max);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
xf86ScaleAxis(int Cx,
|
xf86ScaleAxis(int Cx,
|
||||||
int Sxhigh,
|
int to_max,
|
||||||
int Sxlow,
|
int to_min,
|
||||||
int Rxhigh,
|
int from_max,
|
||||||
int Rxlow )
|
int from_min )
|
||||||
{
|
{
|
||||||
int X;
|
int X;
|
||||||
int64_t dSx = Sxhigh - Sxlow;
|
int64_t to_width = to_max - to_min;
|
||||||
int64_t dRx = Rxhigh - Rxlow;
|
int64_t from_width = from_max - from_min;
|
||||||
|
|
||||||
if (dRx) {
|
if (from_width) {
|
||||||
X = (int)(((dSx * (Cx - Rxlow)) / dRx) + Sxlow);
|
X = (int)(((to_width * (Cx - from_min)) / from_width) + to_min);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
X = 0;
|
X = 0;
|
||||||
ErrorF ("Divide by Zero in xf86ScaleAxis");
|
ErrorF ("Divide by Zero in xf86ScaleAxis");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (X > Sxhigh)
|
if (X > to_max)
|
||||||
X = Sxhigh;
|
X = to_max;
|
||||||
if (X < Sxlow)
|
if (X < to_min)
|
||||||
X = Sxlow;
|
X = to_min;
|
||||||
|
|
||||||
return X;
|
return X;
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ extern _X_EXPORT void xf86PostKeyEventP(DeviceIntPtr device, unsigned int key_co
|
||||||
extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code,
|
extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code,
|
||||||
int is_down);
|
int is_down);
|
||||||
extern _X_EXPORT InputInfoPtr xf86FirstLocalDevice(void);
|
extern _X_EXPORT InputInfoPtr xf86FirstLocalDevice(void);
|
||||||
extern _X_EXPORT int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, int Rxhigh, int Rxlow);
|
extern _X_EXPORT int xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min);
|
||||||
extern _X_EXPORT void xf86XInputSetScreen(InputInfoPtr pInfo, int screen_number, int x, int y);
|
extern _X_EXPORT void xf86XInputSetScreen(InputInfoPtr pInfo, int screen_number, int x, int y);
|
||||||
extern _X_EXPORT void xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer options);
|
extern _X_EXPORT void xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer options);
|
||||||
extern _X_EXPORT void xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval,
|
extern _X_EXPORT void xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval,
|
||||||
|
|
|
@ -314,10 +314,6 @@ DDC2Init(int scrnIndex, I2CBusPtr pBus)
|
||||||
dev = DDC2MakeDevice(pBus, 0x00A0, "ddc2");
|
dev = DDC2MakeDevice(pBus, 0x00A0, "ddc2");
|
||||||
if (xf86I2CProbeAddress(pBus, 0x0060))
|
if (xf86I2CProbeAddress(pBus, 0x0060))
|
||||||
DDC2MakeDevice(pBus, 0x0060, "E-EDID segment register");
|
DDC2MakeDevice(pBus, 0x0060, "E-EDID segment register");
|
||||||
if (xf86I2CProbeAddress(pBus, 0x0062))
|
|
||||||
DDC2MakeDevice(pBus, 0x0062, "EDID EEPROM interface");
|
|
||||||
if (xf86I2CProbeAddress(pBus, 0x006E))
|
|
||||||
DDC2MakeDevice(pBus, 0x006E, "DDC control interface");
|
|
||||||
|
|
||||||
return dev;
|
return dev;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,14 +39,11 @@ server is started as a normal user:
|
||||||
.IR __projectroot__/etc/X11/ <cmdline>
|
.IR __projectroot__/etc/X11/ <cmdline>
|
||||||
.IB /etc/X11/ $XORGCONFIG
|
.IB /etc/X11/ $XORGCONFIG
|
||||||
.IB __projectroot__/etc/X11/ $XORGCONFIG
|
.IB __projectroot__/etc/X11/ $XORGCONFIG
|
||||||
.I /etc/X11/__xconfigfile__\-4
|
|
||||||
.I /etc/X11/__xconfigfile__
|
.I /etc/X11/__xconfigfile__
|
||||||
.I /etc/__xconfigfile__
|
.I /etc/__xconfigfile__
|
||||||
.IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
|
.IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
|
||||||
.I __projectroot__/etc/X11/__xconfigfile__\-4
|
|
||||||
.I __projectroot__/etc/X11/__xconfigfile__
|
.I __projectroot__/etc/X11/__xconfigfile__
|
||||||
.IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
|
.IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
|
||||||
.I __projectroot__/lib/X11/__xconfigfile__\-4
|
|
||||||
.I __projectroot__/lib/X11/__xconfigfile__
|
.I __projectroot__/lib/X11/__xconfigfile__
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
|
@ -74,14 +71,11 @@ search locations are as follows:
|
||||||
.B $XORGCONFIG
|
.B $XORGCONFIG
|
||||||
.IB /etc/X11/ $XORGCONFIG
|
.IB /etc/X11/ $XORGCONFIG
|
||||||
.IB __projectroot__/etc/X11/ $XORGCONFIG
|
.IB __projectroot__/etc/X11/ $XORGCONFIG
|
||||||
.I /etc/X11/__xconfigfile__\-4
|
|
||||||
.I /etc/X11/__xconfigfile__
|
.I /etc/X11/__xconfigfile__
|
||||||
.I /etc/__xconfigfile__
|
.I /etc/__xconfigfile__
|
||||||
.IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
|
.IR __projectroot__/etc/X11/__xconfigfile__. <hostname>
|
||||||
.I __projectroot__/etc/X11/__xconfigfile__\-4
|
|
||||||
.I __projectroot__/etc/X11/__xconfigfile__
|
.I __projectroot__/etc/X11/__xconfigfile__
|
||||||
.IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
|
.IR __projectroot__/lib/X11/__xconfigfile__. <hostname>
|
||||||
.I __projectroot__/lib/X11/__xconfigfile__\-4
|
|
||||||
.I __projectroot__/lib/X11/__xconfigfile__
|
.I __projectroot__/lib/X11/__xconfigfile__
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
|
@ -564,9 +558,6 @@ Default: off.
|
||||||
This tells the mousedrv(__drivermansuffix__) and vmmouse(__drivermansuffix__)
|
This tells the mousedrv(__drivermansuffix__) and vmmouse(__drivermansuffix__)
|
||||||
drivers to not report failure if the mouse device can't be opened/initialised.
|
drivers to not report failure if the mouse device can't be opened/initialised.
|
||||||
It has no effect on the evdev(__drivermansuffix__) or other drivers.
|
It has no effect on the evdev(__drivermansuffix__) or other drivers.
|
||||||
The previous functionality of allowing the server to start up even if
|
|
||||||
the mouse device can't be opened/initialised is now handled by the
|
|
||||||
AllowEmptyInput option.
|
|
||||||
Default: false.
|
Default: false.
|
||||||
.TP 7
|
.TP 7
|
||||||
.BI "Option \*qVTSysReq\*q \*q" boolean \*q
|
.BI "Option \*qVTSysReq\*q \*q" boolean \*q
|
||||||
|
@ -683,12 +674,6 @@ default.
|
||||||
Allow modules built for a different, potentially incompatible version of
|
Allow modules built for a different, potentially incompatible version of
|
||||||
the X server to load. Disabled by default.
|
the X server to load. Disabled by default.
|
||||||
.TP 7
|
.TP 7
|
||||||
.BI "Option \*qAllowEmptyInput\*q \*q" boolean \*q
|
|
||||||
If enabled, don't add the standard keyboard and mouse drivers, if there are no
|
|
||||||
input devices in the config file. Enabled by default if AutoAddDevices and
|
|
||||||
AutoEnableDevices is enabled, otherwise disabled.
|
|
||||||
If AllowEmptyInput is on, devices using the kbd, mouse or vmmouse driver are ignored.
|
|
||||||
.TP 7
|
|
||||||
.BI "Option \*qAutoAddDevices\*q \*q" boolean \*q
|
.BI "Option \*qAutoAddDevices\*q \*q" boolean \*q
|
||||||
If this option is disabled, then no devices will be added from HAL events.
|
If this option is disabled, then no devices will be added from HAL events.
|
||||||
Enabled by default.
|
Enabled by default.
|
||||||
|
|
|
@ -828,11 +828,14 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
|
||||||
* is moved to a crtc with a lower refresh rate, or a crtc that just
|
* is moved to a crtc with a lower refresh rate, or a crtc that just
|
||||||
* got enabled.
|
* got enabled.
|
||||||
*/
|
*/
|
||||||
if (!(*ds->GetMSC)(pDraw, &ust, ¤t_msc))
|
if (ds->GetMSC) {
|
||||||
pPriv->last_swap_target = 0;
|
if (!(*ds->GetMSC)(pDraw, &ust, ¤t_msc))
|
||||||
|
pPriv->last_swap_target = 0;
|
||||||
|
|
||||||
if (current_msc < pPriv->last_swap_target)
|
if (current_msc < pPriv->last_swap_target)
|
||||||
pPriv->last_swap_target = current_msc;
|
pPriv->last_swap_target = current_msc;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Swap target for this swap is last swap target + swap interval since
|
* Swap target for this swap is last swap target + swap interval since
|
||||||
|
|
|
@ -19,7 +19,6 @@ cat > sdksyms.c << EOF
|
||||||
#include "mipict.h"
|
#include "mipict.h"
|
||||||
#include "glyphstr.h"
|
#include "glyphstr.h"
|
||||||
#include "picturestr.h"
|
#include "picturestr.h"
|
||||||
#include "renderedge.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* fb/Makefile.am -- module */
|
/* fb/Makefile.am -- module */
|
||||||
|
|
|
@ -2964,8 +2964,7 @@ xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon)
|
||||||
int size;
|
int size;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (output->MonInfo != NULL)
|
free(output->MonInfo);
|
||||||
free(output->MonInfo);
|
|
||||||
|
|
||||||
output->MonInfo = edid_mon;
|
output->MonInfo = edid_mon;
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ xf86CrtcDamageShadow (xf86CrtcPtr crtc)
|
||||||
if (damage_box.x2 > pScreen->width) damage_box.x2 = pScreen->width;
|
if (damage_box.x2 > pScreen->width) damage_box.x2 = pScreen->width;
|
||||||
if (damage_box.y2 > pScreen->height) damage_box.y2 = pScreen->height;
|
if (damage_box.y2 > pScreen->height) damage_box.y2 = pScreen->height;
|
||||||
RegionInit(&damage_region, &damage_box, 1);
|
RegionInit(&damage_region, &damage_box, 1);
|
||||||
DamageRegionAppend (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
DamageDamageRegion (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
||||||
&damage_region);
|
&damage_region);
|
||||||
RegionUninit(&damage_region);
|
RegionUninit(&damage_region);
|
||||||
crtc->shadowClear = TRUE;
|
crtc->shadowClear = TRUE;
|
||||||
|
|
|
@ -39,8 +39,8 @@
|
||||||
int
|
int
|
||||||
xf86ReadBIOS(unsigned long Base,unsigned long Offset,unsigned char *Buf,int Len)
|
xf86ReadBIOS(unsigned long Base,unsigned long Offset,unsigned char *Buf,int Len)
|
||||||
{
|
{
|
||||||
mach_port_t device,iopl_dev;
|
mach_port_t device,mem_dev;
|
||||||
memory_object_t iopl_mem;
|
memory_object_t mem_obj;
|
||||||
vm_address_t addr = (vm_address_t)0; /* serach starting address */
|
vm_address_t addr = (vm_address_t)0; /* serach starting address */
|
||||||
kern_return_t err;
|
kern_return_t err;
|
||||||
|
|
||||||
|
@ -51,14 +51,14 @@ xf86ReadBIOS(unsigned long Base,unsigned long Offset,unsigned char *Buf,int Len)
|
||||||
errno = err;
|
errno = err;
|
||||||
FatalError("xf86ReadBIOS() can't get_privileged_ports. (%s)\n",strerror(errno));
|
FatalError("xf86ReadBIOS() can't get_privileged_ports. (%s)\n",strerror(errno));
|
||||||
}
|
}
|
||||||
err = device_open(device,D_READ|D_WRITE,"iopl",&iopl_dev);
|
err = device_open(device,D_READ|D_WRITE,"mem",&mem_dev);
|
||||||
mach_port_deallocate (mach_task_self (), device);
|
mach_port_deallocate (mach_task_self (), device);
|
||||||
if( err )
|
if( err )
|
||||||
{
|
{
|
||||||
errno = err;
|
errno = err;
|
||||||
FatalError("xf86ReadBIOS() can't device_open. (%s)\n",strerror(errno));
|
FatalError("xf86ReadBIOS() can't device_open. (%s)\n",strerror(errno));
|
||||||
}
|
}
|
||||||
err = device_map(iopl_dev,VM_PROT_READ|VM_PROT_WRITE, Base , BIOS_SIZE ,&iopl_mem,0);
|
err = device_map(mem_dev,VM_PROT_READ|VM_PROT_WRITE, Base , BIOS_SIZE ,&mem_obj,0);
|
||||||
if( err )
|
if( err )
|
||||||
{
|
{
|
||||||
errno = err;
|
errno = err;
|
||||||
|
@ -69,13 +69,13 @@ xf86ReadBIOS(unsigned long Base,unsigned long Offset,unsigned char *Buf,int Len)
|
||||||
BIOS_SIZE,
|
BIOS_SIZE,
|
||||||
0,
|
0,
|
||||||
TRUE,
|
TRUE,
|
||||||
iopl_mem,
|
mem_obj,
|
||||||
Base,
|
Base,
|
||||||
FALSE,
|
FALSE,
|
||||||
VM_PROT_READ|VM_PROT_WRITE,
|
VM_PROT_READ|VM_PROT_WRITE,
|
||||||
VM_PROT_READ|VM_PROT_WRITE,
|
VM_PROT_READ|VM_PROT_WRITE,
|
||||||
VM_INHERIT_SHARE);
|
VM_INHERIT_SHARE);
|
||||||
mach_port_deallocate(mach_task_self(),iopl_mem);
|
mach_port_deallocate(mach_task_self(),mem_obj);
|
||||||
if( err )
|
if( err )
|
||||||
{
|
{
|
||||||
errno = err;
|
errno = err;
|
||||||
|
|
|
@ -44,8 +44,8 @@
|
||||||
static pointer
|
static pointer
|
||||||
mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags)
|
mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags)
|
||||||
{
|
{
|
||||||
mach_port_t device,iopl_dev;
|
mach_port_t device,mem_dev;
|
||||||
memory_object_t iopl_mem;
|
memory_object_t mem_obj;
|
||||||
kern_return_t err;
|
kern_return_t err;
|
||||||
vm_address_t addr=(vm_address_t)0;
|
vm_address_t addr=(vm_address_t)0;
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags)
|
||||||
errno = err;
|
errno = err;
|
||||||
FatalError("xf86MapVidMem() can't get_privileged_ports. (%s)\n",strerror(errno));
|
FatalError("xf86MapVidMem() can't get_privileged_ports. (%s)\n",strerror(errno));
|
||||||
}
|
}
|
||||||
err = device_open(device,D_READ|D_WRITE,"iopl",&iopl_dev);
|
err = device_open(device,D_READ|D_WRITE,"mem",&mem_dev);
|
||||||
mach_port_deallocate (mach_task_self(), device);
|
mach_port_deallocate (mach_task_self(), device);
|
||||||
if( err )
|
if( err )
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags)
|
||||||
FatalError("xf86MapVidMem() can't device_open. (%s)\n",strerror(errno));
|
FatalError("xf86MapVidMem() can't device_open. (%s)\n",strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
err = device_map(iopl_dev,VM_PROT_READ|VM_PROT_WRITE, Base , Size ,&iopl_mem,0);
|
err = device_map(mem_dev,VM_PROT_READ|VM_PROT_WRITE, Base , Size ,&mem_obj,0);
|
||||||
if( err )
|
if( err )
|
||||||
{
|
{
|
||||||
errno = err;
|
errno = err;
|
||||||
|
@ -74,23 +74,23 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags)
|
||||||
Size,
|
Size,
|
||||||
0, /* mask */
|
0, /* mask */
|
||||||
TRUE, /* anywhere */
|
TRUE, /* anywhere */
|
||||||
iopl_mem,
|
mem_obj,
|
||||||
(vm_offset_t)Base,
|
(vm_offset_t)Base,
|
||||||
FALSE, /* copy on write */
|
FALSE, /* copy on write */
|
||||||
VM_PROT_READ|VM_PROT_WRITE,
|
VM_PROT_READ|VM_PROT_WRITE,
|
||||||
VM_PROT_READ|VM_PROT_WRITE,
|
VM_PROT_READ|VM_PROT_WRITE,
|
||||||
VM_INHERIT_SHARE);
|
VM_INHERIT_SHARE);
|
||||||
mach_port_deallocate(mach_task_self(),iopl_mem);
|
mach_port_deallocate(mach_task_self(),mem_obj);
|
||||||
if( err )
|
if( err )
|
||||||
{
|
{
|
||||||
errno = err;
|
errno = err;
|
||||||
FatalError("xf86MapVidMem() can't vm_map.(iopl_mem) (%s)\n",strerror(errno));
|
FatalError("xf86MapVidMem() can't vm_map.(mem_obj) (%s)\n",strerror(errno));
|
||||||
}
|
}
|
||||||
mach_port_deallocate(mach_task_self(),iopl_dev);
|
mach_port_deallocate(mach_task_self(),mem_dev);
|
||||||
if( err )
|
if( err )
|
||||||
{
|
{
|
||||||
errno = err;
|
errno = err;
|
||||||
FatalError("xf86MapVidMem() can't mach_port_deallocate.(iopl_dev) (%s)\n",strerror(errno));
|
FatalError("xf86MapVidMem() can't mach_port_deallocate.(mem_dev) (%s)\n",strerror(errno));
|
||||||
}
|
}
|
||||||
return (pointer)addr;
|
return (pointer)addr;
|
||||||
}
|
}
|
||||||
|
@ -124,8 +124,17 @@ xf86EnableIO()
|
||||||
FatalError("xf86EnableIO: ioperm() failed (%s)\n", strerror(errno));
|
FatalError("xf86EnableIO: ioperm() failed (%s)\n", strerror(errno));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
|
/*
|
||||||
|
* Trapping disabled for now, as some VBIOSes (mga-g450 notably) use these
|
||||||
|
* ports, and the int10 wrapper is not emulating them. (Note that it's
|
||||||
|
* effectively what happens in the Linux variant too, as iopl() is used
|
||||||
|
* there, making the ioperm() meaningless.)
|
||||||
|
*
|
||||||
|
* Reenable this when int10 gets fixed. */
|
||||||
ioperm(0x40,4,0); /* trap access to the timer chip */
|
ioperm(0x40,4,0); /* trap access to the timer chip */
|
||||||
ioperm(0x60,4,0); /* trap access to the keyboard controller */
|
ioperm(0x60,4,0); /* trap access to the keyboard controller */
|
||||||
|
#endif
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -530,6 +530,8 @@ xf86EnableIO(void)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
# if !defined(__alpha__)
|
# if !defined(__alpha__)
|
||||||
|
/* XXX: this is actually not trapping anything because of iopl(3)
|
||||||
|
* above */
|
||||||
ioperm(0x40,4,0); /* trap access to the timer chip */
|
ioperm(0x40,4,0); /* trap access to the timer chip */
|
||||||
ioperm(0x60,4,0); /* trap access to the keyboard controller */
|
ioperm(0x60,4,0); /* trap access to the keyboard controller */
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/* sigio.c -- Support for SIGIO handler installation and removal
|
/* sigio.c -- Support for SIGIO handler installation and removal
|
||||||
* Created: Thu Jun 3 15:39:18 1999 by faith@precisioninsight.com
|
* Created: Thu Jun 3 15:39:18 1999 by faith@precisioninsight.com
|
||||||
*
|
*
|
||||||
|
@ -67,14 +66,6 @@
|
||||||
# include <stropts.h>
|
# include <stropts.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* Linux libc5 defines FASYNC, but not O_ASYNC. Don't know if it is
|
|
||||||
* functional or not.
|
|
||||||
*/
|
|
||||||
#if defined(FASYNC) && !defined(O_ASYNC)
|
|
||||||
# define O_ASYNC FASYNC
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MAXDEVICES
|
#ifdef MAXDEVICES
|
||||||
/* MAXDEVICES represents the maximimum number of input devices usable
|
/* MAXDEVICES represents the maximimum number of input devices usable
|
||||||
* at the same time plus one entry for DRM support.
|
* at the same time plus one entry for DRM support.
|
||||||
|
|
|
@ -41,58 +41,10 @@ static xf86ConfigSymTabRec DRITab[] =
|
||||||
{
|
{
|
||||||
{ENDSECTION, "endsection"},
|
{ENDSECTION, "endsection"},
|
||||||
{GROUP, "group"},
|
{GROUP, "group"},
|
||||||
{BUFFERS, "buffers"},
|
|
||||||
{MODE, "mode"},
|
{MODE, "mode"},
|
||||||
{-1, ""},
|
{-1, ""},
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CLEANUP xf86freeBuffersList
|
|
||||||
|
|
||||||
static void
|
|
||||||
xf86freeBuffersList (XF86ConfBuffersPtr ptr)
|
|
||||||
{
|
|
||||||
XF86ConfBuffersPtr prev;
|
|
||||||
|
|
||||||
while (ptr) {
|
|
||||||
TestFree (ptr->buf_flags);
|
|
||||||
TestFree (ptr->buf_comment);
|
|
||||||
prev = ptr;
|
|
||||||
ptr = ptr->list.next;
|
|
||||||
free (prev);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static XF86ConfBuffersPtr
|
|
||||||
xf86parseBuffers (void)
|
|
||||||
{
|
|
||||||
int token;
|
|
||||||
parsePrologue (XF86ConfBuffersPtr, XF86ConfBuffersRec)
|
|
||||||
|
|
||||||
if (xf86getSubToken (&(ptr->buf_comment)) != NUMBER)
|
|
||||||
Error ("Buffers count expected", NULL);
|
|
||||||
ptr->buf_count = val.num;
|
|
||||||
|
|
||||||
if (xf86getSubToken (&(ptr->buf_comment)) != NUMBER)
|
|
||||||
Error ("Buffers size expected", NULL);
|
|
||||||
ptr->buf_size = val.num;
|
|
||||||
|
|
||||||
if ((token = xf86getSubToken (&(ptr->buf_comment))) == STRING) {
|
|
||||||
ptr->buf_flags = val.str;
|
|
||||||
if ((token = xf86getToken (NULL)) == COMMENT)
|
|
||||||
ptr->buf_comment = xf86addComment(ptr->buf_comment, val.str);
|
|
||||||
else
|
|
||||||
xf86unGetToken(token);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
printf ("Buffers parsed\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef CLEANUP
|
|
||||||
|
|
||||||
#define CLEANUP xf86freeDRI
|
#define CLEANUP xf86freeDRI
|
||||||
|
|
||||||
XF86ConfDRIPtr
|
XF86ConfDRIPtr
|
||||||
|
@ -121,10 +73,6 @@ xf86parseDRISection (void)
|
||||||
Error (MUST_BE_OCTAL_MSG, val.num);
|
Error (MUST_BE_OCTAL_MSG, val.num);
|
||||||
ptr->dri_mode = val.num;
|
ptr->dri_mode = val.num;
|
||||||
break;
|
break;
|
||||||
case BUFFERS:
|
|
||||||
HANDLE_LIST (dri_buffers_lst, xf86parseBuffers,
|
|
||||||
XF86ConfBuffersPtr);
|
|
||||||
break;
|
|
||||||
case EOF_TOKEN:
|
case EOF_TOKEN:
|
||||||
Error (UNEXPECTED_EOF_MSG, NULL);
|
Error (UNEXPECTED_EOF_MSG, NULL);
|
||||||
break;
|
break;
|
||||||
|
@ -149,8 +97,6 @@ xf86parseDRISection (void)
|
||||||
void
|
void
|
||||||
xf86printDRISection (FILE * cf, XF86ConfDRIPtr ptr)
|
xf86printDRISection (FILE * cf, XF86ConfDRIPtr ptr)
|
||||||
{
|
{
|
||||||
XF86ConfBuffersPtr bufs;
|
|
||||||
|
|
||||||
if (ptr == NULL)
|
if (ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -163,15 +109,6 @@ xf86printDRISection (FILE * cf, XF86ConfDRIPtr ptr)
|
||||||
fprintf (cf, "\tGroup %d\n", ptr->dri_group);
|
fprintf (cf, "\tGroup %d\n", ptr->dri_group);
|
||||||
if (ptr->dri_mode)
|
if (ptr->dri_mode)
|
||||||
fprintf (cf, "\tMode 0%o\n", ptr->dri_mode);
|
fprintf (cf, "\tMode 0%o\n", ptr->dri_mode);
|
||||||
for (bufs = ptr->dri_buffers_lst; bufs; bufs = bufs->list.next) {
|
|
||||||
fprintf (cf, "\tBuffers %d %d",
|
|
||||||
bufs->buf_count, bufs->buf_size);
|
|
||||||
if (bufs->buf_flags) fprintf (cf, " \"%s\"", bufs->buf_flags);
|
|
||||||
if (bufs->buf_comment)
|
|
||||||
fprintf(cf, "%s", bufs->buf_comment);
|
|
||||||
else
|
|
||||||
fprintf (cf, "\n");
|
|
||||||
}
|
|
||||||
fprintf (cf, "EndSection\n\n");
|
fprintf (cf, "EndSection\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,7 +118,6 @@ xf86freeDRI (XF86ConfDRIPtr ptr)
|
||||||
if (ptr == NULL)
|
if (ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
xf86freeBuffersList (ptr->dri_buffers_lst);
|
|
||||||
TestFree (ptr->dri_comment);
|
TestFree (ptr->dri_comment);
|
||||||
free (ptr);
|
free (ptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,53 +115,6 @@ static int pushToken = LOCK_TOKEN;
|
||||||
static int eol_seen = 0; /* private state to handle comments */
|
static int eol_seen = 0; /* private state to handle comments */
|
||||||
LexRec val;
|
LexRec val;
|
||||||
|
|
||||||
/*
|
|
||||||
* xf86strToUL --
|
|
||||||
*
|
|
||||||
* A portable, but restricted, version of strtoul(). It only understands
|
|
||||||
* hex, octal, and decimal. But it's good enough for our needs.
|
|
||||||
*/
|
|
||||||
static unsigned int
|
|
||||||
xf86strToUL (char *str)
|
|
||||||
{
|
|
||||||
int base = 10;
|
|
||||||
char *p = str;
|
|
||||||
unsigned int tot = 0;
|
|
||||||
|
|
||||||
if (*p == '0')
|
|
||||||
{
|
|
||||||
p++;
|
|
||||||
if ((*p == 'x') || (*p == 'X'))
|
|
||||||
{
|
|
||||||
p++;
|
|
||||||
base = 16;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
base = 8;
|
|
||||||
}
|
|
||||||
while (*p)
|
|
||||||
{
|
|
||||||
if ((*p >= '0') && (*p <= ((base == 8) ? '7' : '9')))
|
|
||||||
{
|
|
||||||
tot = tot * base + (*p - '0');
|
|
||||||
}
|
|
||||||
else if ((base == 16) && (*p >= 'a') && (*p <= 'f'))
|
|
||||||
{
|
|
||||||
tot = tot * base + 10 + (*p - 'a');
|
|
||||||
}
|
|
||||||
else if ((base == 16) && (*p >= 'A') && (*p <= 'F'))
|
|
||||||
{
|
|
||||||
tot = tot * base + 10 + (*p - 'A');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return tot;
|
|
||||||
}
|
|
||||||
p++;
|
|
||||||
}
|
|
||||||
return tot;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* xf86getNextLine --
|
* xf86getNextLine --
|
||||||
*
|
*
|
||||||
|
@ -434,7 +387,7 @@ again:
|
||||||
configRBuf[i++] = c;
|
configRBuf[i++] = c;
|
||||||
configPos--; /* GJA -- one too far */
|
configPos--; /* GJA -- one too far */
|
||||||
configRBuf[i] = '\0';
|
configRBuf[i] = '\0';
|
||||||
val.num = xf86strToUL (configRBuf);
|
val.num = strtoul (configRBuf, NULL, 0);
|
||||||
val.realnum = atof (configRBuf);
|
val.realnum = atof (configRBuf);
|
||||||
return NUMBER;
|
return NUMBER;
|
||||||
}
|
}
|
||||||
|
@ -601,7 +554,6 @@ xf86pathIsSafe(const char *path)
|
||||||
* %P projroot
|
* %P projroot
|
||||||
* %C sysconfdir
|
* %C sysconfdir
|
||||||
* %D datadir
|
* %D datadir
|
||||||
* %M config file format version number
|
|
||||||
* %% %
|
* %% %
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -626,11 +578,6 @@ xf86pathIsSafe(const char *path)
|
||||||
#ifndef XCONFENV
|
#ifndef XCONFENV
|
||||||
#define XCONFENV "XORGCONFIG"
|
#define XCONFENV "XORGCONFIG"
|
||||||
#endif
|
#endif
|
||||||
/* xorg.conf is based on XF86Config version 4. If we ever break
|
|
||||||
compatibility of the xorg.conf syntax, we'll bump this version number. */
|
|
||||||
#ifndef CONFIG_FILE_VERSION
|
|
||||||
#define CONFIG_FILE_VERSION 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define BAIL_OUT do { \
|
#define BAIL_OUT do { \
|
||||||
free(result); \
|
free(result); \
|
||||||
|
@ -661,7 +608,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
|
||||||
int i, l;
|
int i, l;
|
||||||
static const char *env = NULL;
|
static const char *env = NULL;
|
||||||
static char *hostname = NULL;
|
static char *hostname = NULL;
|
||||||
static char majorvers[3] = "";
|
|
||||||
|
|
||||||
if (!template)
|
if (!template)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -762,13 +708,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
|
||||||
case 'D':
|
case 'D':
|
||||||
APPEND_STR(DATADIR);
|
APPEND_STR(DATADIR);
|
||||||
break;
|
break;
|
||||||
case 'M':
|
|
||||||
if (!majorvers[0]) {
|
|
||||||
snprintf(majorvers, sizeof(majorvers),
|
|
||||||
"%d", CONFIG_FILE_VERSION);
|
|
||||||
}
|
|
||||||
APPEND_STR(majorvers);
|
|
||||||
break;
|
|
||||||
case '%':
|
case '%':
|
||||||
result[l++] = '%';
|
result[l++] = '%';
|
||||||
CHECK_LENGTH;
|
CHECK_LENGTH;
|
||||||
|
|
|
@ -440,22 +440,11 @@ typedef struct
|
||||||
}
|
}
|
||||||
XF86ConfVendorRec, *XF86ConfVendorPtr;
|
XF86ConfVendorRec, *XF86ConfVendorPtr;
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
GenericListRec list;
|
|
||||||
int buf_count;
|
|
||||||
int buf_size;
|
|
||||||
char *buf_flags;
|
|
||||||
char *buf_comment;
|
|
||||||
}
|
|
||||||
XF86ConfBuffersRec, *XF86ConfBuffersPtr;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char *dri_group_name;
|
char *dri_group_name;
|
||||||
int dri_group;
|
int dri_group;
|
||||||
int dri_mode;
|
int dri_mode;
|
||||||
XF86ConfBuffersPtr dri_buffers_lst;
|
|
||||||
char *dri_comment;
|
char *dri_comment;
|
||||||
}
|
}
|
||||||
XF86ConfDRIRec, *XF86ConfDRIPtr;
|
XF86ConfDRIRec, *XF86ConfDRIPtr;
|
||||||
|
|
|
@ -273,7 +273,6 @@ typedef enum {
|
||||||
|
|
||||||
/* DRI Tokens */
|
/* DRI Tokens */
|
||||||
GROUP,
|
GROUP,
|
||||||
BUFFERS,
|
|
||||||
|
|
||||||
/* InputClass Tokens */
|
/* InputClass Tokens */
|
||||||
MATCH_PRODUCT,
|
MATCH_PRODUCT,
|
||||||
|
|
|
@ -9691,15 +9691,23 @@ Handles opcode 0xe9
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
static void x86emuOp_jump_near_IMM(u8 X86EMU_UNUSED(op1))
|
static void x86emuOp_jump_near_IMM(u8 X86EMU_UNUSED(op1))
|
||||||
{
|
{
|
||||||
int ip;
|
u32 ip;
|
||||||
|
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
DECODE_PRINTF("JMP\t");
|
DECODE_PRINTF("JMP\t");
|
||||||
ip = (s16)fetch_word_imm();
|
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
||||||
ip += (s16)M.x86.R_IP;
|
ip = (u32)fetch_long_imm();
|
||||||
DECODE_PRINTF2("%04x\n", (u16)ip);
|
ip += (u32)M.x86.R_EIP;
|
||||||
TRACE_AND_STEP();
|
DECODE_PRINTF2("%08x\n", (u32)ip);
|
||||||
M.x86.R_IP = (u16)ip;
|
TRACE_AND_STEP();
|
||||||
|
M.x86.R_EIP = (u32)ip;
|
||||||
|
} else {
|
||||||
|
ip = (s16)fetch_word_imm();
|
||||||
|
ip += (s16)M.x86.R_IP;
|
||||||
|
DECODE_PRINTF2("%04x\n", (u16)ip);
|
||||||
|
TRACE_AND_STEP();
|
||||||
|
M.x86.R_IP = (u16)ip;
|
||||||
|
}
|
||||||
DECODE_CLEAR_SEGOVR();
|
DECODE_CLEAR_SEGOVR();
|
||||||
END_OF_INSTR();
|
END_OF_INSTR();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,21 +52,6 @@ int winProcSetSelectionOwner(ClientPtr /* client */);
|
||||||
DeviceIntPtr g_pwinPointer;
|
DeviceIntPtr g_pwinPointer;
|
||||||
DeviceIntPtr g_pwinKeyboard;
|
DeviceIntPtr g_pwinKeyboard;
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* References to external symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef HAS_DEVWINDOWS
|
|
||||||
extern int g_fdMessageQueue;
|
|
||||||
#endif
|
|
||||||
extern Bool g_fXdmcpEnabled;
|
|
||||||
#ifdef XWIN_CLIPBOARD
|
|
||||||
extern winDispatchProcPtr winProcEstablishConnectionOrig;
|
|
||||||
extern winDispatchProcPtr winProcQueryTreeOrig;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Called from dix/devices.c */
|
/* Called from dix/devices.c */
|
||||||
/*
|
/*
|
||||||
* All of our keys generate up and down transition notifications,
|
* All of our keys generate up and down transition notifications,
|
||||||
|
|
|
@ -58,29 +58,9 @@ typedef HRESULT (*SHGETFOLDERPATHPROC)(
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* References to external symbols
|
* References to external symbols
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern int g_iNumScreens;
|
|
||||||
extern winScreenInfo * g_ScreenInfo;
|
|
||||||
extern char * g_pszCommandLine;
|
|
||||||
extern Bool g_fSilentFatalError;
|
|
||||||
|
|
||||||
extern const char * g_pszLogFile;
|
|
||||||
extern Bool g_fLogFileChanged;
|
|
||||||
extern int g_iLogVerbose;
|
|
||||||
Bool g_fLogInited;
|
|
||||||
|
|
||||||
extern Bool g_fXdmcpEnabled;
|
|
||||||
extern Bool g_fAuthEnabled;
|
|
||||||
#ifdef HAS_DEVWINDOWS
|
|
||||||
extern int g_fdMessageQueue;
|
|
||||||
#endif
|
|
||||||
extern const char * g_pszQueryHost;
|
|
||||||
extern HINSTANCE g_hInstance;
|
|
||||||
|
|
||||||
#ifdef XWIN_CLIPBOARD
|
#ifdef XWIN_CLIPBOARD
|
||||||
extern Bool g_fUnicodeClipboard;
|
extern Bool g_fUnicodeClipboard;
|
||||||
extern Bool g_fClipboardLaunched;
|
extern Bool g_fClipboardLaunched;
|
||||||
|
@ -90,15 +70,11 @@ extern HWND g_hwndClipboard;
|
||||||
extern Bool g_fClipboard;
|
extern Bool g_fClipboard;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern HMODULE g_hmodDirectDraw;
|
|
||||||
extern FARPROC g_fpDirectDrawCreate;
|
/*
|
||||||
extern FARPROC g_fpDirectDrawCreateClipper;
|
module handle for dynamically loaded comctl32 library
|
||||||
|
*/
|
||||||
extern HMODULE g_hmodCommonControls;
|
static HMODULE g_hmodCommonControls = NULL;
|
||||||
extern FARPROC g_fpTrackMouseEvent;
|
|
||||||
extern Bool g_fNoHelpMessageBox;
|
|
||||||
extern Bool g_fSilentDupError;
|
|
||||||
extern Bool g_fNativeGl;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function prototypes
|
* Function prototypes
|
||||||
|
@ -258,15 +234,9 @@ ddxGiveUp (void)
|
||||||
* At this point we aren't creating any new screens, so
|
* At this point we aren't creating any new screens, so
|
||||||
* we are guaranteed to not need the DirectDraw functions.
|
* we are guaranteed to not need the DirectDraw functions.
|
||||||
*/
|
*/
|
||||||
if (g_hmodDirectDraw != NULL)
|
winReleaseDDProcAddresses();
|
||||||
{
|
|
||||||
FreeLibrary (g_hmodDirectDraw);
|
|
||||||
g_hmodDirectDraw = NULL;
|
|
||||||
g_fpDirectDrawCreate = NULL;
|
|
||||||
g_fpDirectDrawCreateClipper = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Unload our TrackMouseEvent funtion pointer */
|
/* Unload our TrackMouseEvent function pointer */
|
||||||
if (g_hmodCommonControls != NULL)
|
if (g_hmodCommonControls != NULL)
|
||||||
{
|
{
|
||||||
FreeLibrary (g_hmodCommonControls);
|
FreeLibrary (g_hmodCommonControls);
|
||||||
|
@ -437,7 +407,7 @@ winFixupPaths (void)
|
||||||
int needs_sep = TRUE;
|
int needs_sep = TRUE;
|
||||||
int comment_block = FALSE;
|
int comment_block = FALSE;
|
||||||
|
|
||||||
/* get defautl fontpath */
|
/* get default fontpath */
|
||||||
char *fontpath = strdup(defaultFontPath);
|
char *fontpath = strdup(defaultFontPath);
|
||||||
size_t size = strlen(fontpath);
|
size_t size = strlen(fontpath);
|
||||||
|
|
||||||
|
@ -873,7 +843,7 @@ winUseMsg (void)
|
||||||
|
|
||||||
ErrorF ("-silent-dup-error\n"
|
ErrorF ("-silent-dup-error\n"
|
||||||
"\tIf another instance of " EXECUTABLE_NAME " with the same display number is running\n"
|
"\tIf another instance of " EXECUTABLE_NAME " with the same display number is running\n"
|
||||||
"\texit silently and don’t display any error message.\n");
|
"\texit silently and don't display any error message.\n");
|
||||||
|
|
||||||
ErrorF ("-swcursor\n"
|
ErrorF ("-swcursor\n"
|
||||||
"\tDisable the usage of the Windows cursor and use the X11 software\n"
|
"\tDisable the usage of the Windows cursor and use the X11 software\n"
|
||||||
|
|
|
@ -162,8 +162,8 @@ AM_YFLAGS = -d
|
||||||
AM_LFLAGS = -i
|
AM_LFLAGS = -i
|
||||||
AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
|
AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \
|
||||||
$(XWINMODULES_CFLAGS) \
|
$(XWINMODULES_CFLAGS) \
|
||||||
-DXFree86Server \
|
-I$(top_srcdir) \
|
||||||
-I$(top_srcdir)
|
-Wno-bad-function-cast
|
||||||
|
|
||||||
MAN_SRCS = XWin.man.pre XWinrc.man.pre
|
MAN_SRCS = XWin.man.pre XWinrc.man.pre
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ exit silently and don't display any error message.
|
||||||
.B "\-xkbrules \fIrule\fP"
|
.B "\-xkbrules \fIrule\fP"
|
||||||
.TP 8
|
.TP 8
|
||||||
.B "\-xkbvariant \fIvariant\fp"
|
.B "\-xkbvariant \fIvariant\fp"
|
||||||
These options implement the xkeyboard extension for loading
|
These options configure the xkeyboard extension to load
|
||||||
a particular keyboard map as the X server starts. The behavior is similar
|
a particular keyboard map as the X server starts. The behavior is similar
|
||||||
to the \fIsetxkbmap\fP program. The layout data is located at \fI
|
to the \fIsetxkbmap\fP program. The layout data is located at \fI
|
||||||
__datadir__/X11/xkb/\fP. Additional information is found in the
|
__datadir__/X11/xkb/\fP. Additional information is found in the
|
||||||
|
@ -264,9 +264,9 @@ the options:
|
||||||
Alternatively one may use the \fIsetxkbmap\fP program after \fIXWin\fP is
|
Alternatively one may use the \fIsetxkbmap\fP program after \fIXWin\fP is
|
||||||
running.
|
running.
|
||||||
|
|
||||||
The default is to select a layout matching your current layout as
|
The default is to select a configuration matching your current layout as
|
||||||
reported by \fIWindows\fP if known, or the default X server layout
|
reported by \fIWindows\fP, if known, or the default X server configuration
|
||||||
if no matching keyboard layout was found.
|
if no matching keyboard configuration was found.
|
||||||
|
|
||||||
.SH UNDOCUMENTED OPTIONS
|
.SH UNDOCUMENTED OPTIONS
|
||||||
These options are undocumented. Do not use them.
|
These options are undocumented. Do not use them.
|
||||||
|
|
|
@ -682,10 +682,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
|
||||||
unsigned int buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
|
unsigned int buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
|
||||||
if (buffer_size > 0)
|
if (buffer_size > 0)
|
||||||
{
|
{
|
||||||
if (screen->base.GLXextensions != NULL)
|
free(screen->base.GLXextensions);
|
||||||
{
|
|
||||||
free(screen->base.GLXextensions);
|
|
||||||
}
|
|
||||||
|
|
||||||
screen->base.GLXextensions = xnfalloc(buffer_size);
|
screen->base.GLXextensions = xnfalloc(buffer_size);
|
||||||
__glXGetExtensionString(screen->glx_enable_bits, screen->base.GLXextensions);
|
__glXGetExtensionString(screen->glx_enable_bits, screen->base.GLXextensions);
|
||||||
|
|
|
@ -314,9 +314,6 @@ typedef Bool (*winFinishCreateWindowsWindowProcPtr)(WindowPtr pWin);
|
||||||
|
|
||||||
typedef Bool (*winCreateScreenResourcesProc)(ScreenPtr);
|
typedef Bool (*winCreateScreenResourcesProc)(ScreenPtr);
|
||||||
|
|
||||||
/* Typedef for DIX wrapper functions */
|
|
||||||
typedef int (*winDispatchProcPtr) (ClientPtr);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GC (graphics context) privates
|
* GC (graphics context) privates
|
||||||
|
@ -622,6 +619,8 @@ typedef struct {
|
||||||
* Extern declares for general global variables
|
* Extern declares for general global variables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "winglobals.h"
|
||||||
|
|
||||||
extern winScreenInfo * g_ScreenInfo;
|
extern winScreenInfo * g_ScreenInfo;
|
||||||
extern miPointerScreenFuncRec g_winPointerCursorFuncs;
|
extern miPointerScreenFuncRec g_winPointerCursorFuncs;
|
||||||
extern DWORD g_dwEvents;
|
extern DWORD g_dwEvents;
|
||||||
|
@ -648,16 +647,12 @@ extern const char * g_pszQueryHost;
|
||||||
extern DeviceIntPtr g_pwinPointer;
|
extern DeviceIntPtr g_pwinPointer;
|
||||||
extern DeviceIntPtr g_pwinKeyboard;
|
extern DeviceIntPtr g_pwinKeyboard;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Extern declares for dynamically loaded libraries and function pointers
|
* Extern declares for dynamically loaded library function pointers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern HMODULE g_hmodDirectDraw;
|
|
||||||
extern FARPROC g_fpDirectDrawCreate;
|
extern FARPROC g_fpDirectDrawCreate;
|
||||||
extern FARPROC g_fpDirectDrawCreateClipper;
|
extern FARPROC g_fpDirectDrawCreateClipper;
|
||||||
|
|
||||||
extern HMODULE g_hmodCommonControls;
|
|
||||||
extern FARPROC g_fpTrackMouseEvent;
|
extern FARPROC g_fpTrackMouseEvent;
|
||||||
|
|
||||||
|
|
||||||
|
@ -859,6 +854,9 @@ winSetEngine (ScreenPtr pScreen);
|
||||||
Bool
|
Bool
|
||||||
winGetDDProcAddresses (void);
|
winGetDDProcAddresses (void);
|
||||||
|
|
||||||
|
void
|
||||||
|
winReleaseDDProcAddresses(void);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* winerror.c
|
* winerror.c
|
||||||
|
|
|
@ -34,16 +34,6 @@
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#include "winmsg.h"
|
#include "winmsg.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* References to external symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern HWND g_hDlgDepthChange;
|
|
||||||
extern HWND g_hDlgExit;
|
|
||||||
extern HWND g_hDlgAbout;
|
|
||||||
|
|
||||||
|
|
||||||
/* See Porting Layer Definition - p. 6 */
|
/* See Porting Layer Definition - p. 6 */
|
||||||
void
|
void
|
||||||
winBlockHandler (int nScreen,
|
winBlockHandler (int nScreen,
|
||||||
|
|
|
@ -437,7 +437,7 @@ winClipboardErrorHandler (Display *pDisplay, XErrorEvent *pErr)
|
||||||
pszErrorMsg,
|
pszErrorMsg,
|
||||||
sizeof (pszErrorMsg));
|
sizeof (pszErrorMsg));
|
||||||
ErrorF ("winClipboardErrorHandler - ERROR: \n\t%s\n"
|
ErrorF ("winClipboardErrorHandler - ERROR: \n\t%s\n"
|
||||||
"\tSerial: %d, Request Code: %d, Minor Code: %d\n",
|
"\tSerial: %lu, Request Code: %d, Minor Code: %d\n",
|
||||||
pszErrorMsg,
|
pszErrorMsg,
|
||||||
pErr->serial,
|
pErr->serial,
|
||||||
pErr->request_code,
|
pErr->request_code,
|
||||||
|
|
|
@ -76,7 +76,7 @@ winClipboardFlushXEvents (HWND hwnd,
|
||||||
XEvent event;
|
XEvent event;
|
||||||
XSelectionEvent eventSelection;
|
XSelectionEvent eventSelection;
|
||||||
unsigned long ulReturnBytesLeft;
|
unsigned long ulReturnBytesLeft;
|
||||||
unsigned char *pszReturnData = NULL;
|
char *pszReturnData = NULL;
|
||||||
char *pszGlobalData = NULL;
|
char *pszGlobalData = NULL;
|
||||||
int iReturn;
|
int iReturn;
|
||||||
HGLOBAL hGlobal = NULL;
|
HGLOBAL hGlobal = NULL;
|
||||||
|
@ -221,7 +221,7 @@ winClipboardFlushXEvents (HWND hwnd,
|
||||||
if (!OpenClipboard (hwnd))
|
if (!OpenClipboard (hwnd))
|
||||||
{
|
{
|
||||||
ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
|
ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
|
||||||
"OpenClipboard () failed: %08x\n",
|
"OpenClipboard () failed: %08lx\n",
|
||||||
GetLastError ());
|
GetLastError ());
|
||||||
|
|
||||||
/* Abort */
|
/* Abort */
|
||||||
|
@ -262,7 +262,7 @@ winClipboardFlushXEvents (HWND hwnd,
|
||||||
if (!hGlobal)
|
if (!hGlobal)
|
||||||
{
|
{
|
||||||
ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
|
ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
|
||||||
"GetClipboardData () failed: %08x\n",
|
"GetClipboardData () failed: %08lx\n",
|
||||||
GetLastError ());
|
GetLastError ());
|
||||||
|
|
||||||
/* Abort */
|
/* Abort */
|
||||||
|
|
|
@ -516,11 +516,8 @@ winGetPaletteDD (ScreenPtr pScreen, ColormapPtr pcmap)
|
||||||
pScreen->blackPixel = 0;
|
pScreen->blackPixel = 0;
|
||||||
|
|
||||||
/* Free colormap */
|
/* Free colormap */
|
||||||
if (ppeColors != NULL)
|
free(ppeColors);
|
||||||
{
|
ppeColors = NULL;
|
||||||
free (ppeColors);
|
|
||||||
ppeColors = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Free the DC */
|
/* Free the DC */
|
||||||
if (hdc != NULL)
|
if (hdc != NULL)
|
||||||
|
|
|
@ -712,8 +712,8 @@ winNameCompare (const char *s1, const char *s2)
|
||||||
while (*s2 == '_' || *s2 == ' ' || *s2 == '\t')
|
while (*s2 == '_' || *s2 == ' ' || *s2 == '\t')
|
||||||
s2++;
|
s2++;
|
||||||
|
|
||||||
c1 = (isupper (*s1) ? tolower (*s1) : *s1);
|
c1 = (isupper ((int)*s1) ? tolower ((int)*s1) : *s1);
|
||||||
c2 = (isupper (*s2) ? tolower (*s2) : *s2);
|
c2 = (isupper ((int)*s2) ? tolower ((int)*s2) : *s2);
|
||||||
|
|
||||||
while (c1 == c2)
|
while (c1 == c2)
|
||||||
{
|
{
|
||||||
|
@ -727,8 +727,8 @@ winNameCompare (const char *s1, const char *s2)
|
||||||
while (*s2 == '_' || *s2 == ' ' || *s2 == '\t')
|
while (*s2 == '_' || *s2 == ' ' || *s2 == '\t')
|
||||||
s2++;
|
s2++;
|
||||||
|
|
||||||
c1 = (isupper (*s1) ? tolower (*s1) : *s1);
|
c1 = (isupper ((int)*s1) ? tolower ((int)*s1) : *s1);
|
||||||
c2 = (isupper (*s2) ? tolower (*s2) : *s2);
|
c2 = (isupper ((int)*s2) ? tolower ((int)*s2) : *s2);
|
||||||
}
|
}
|
||||||
return c1 - c2;
|
return c1 - c2;
|
||||||
}
|
}
|
||||||
|
@ -1089,8 +1089,8 @@ winNormalizeName (const char *s)
|
||||||
case '\t':
|
case '\t':
|
||||||
continue;
|
continue;
|
||||||
default:
|
default:
|
||||||
if (isupper (*p))
|
if (isupper ((int)*p))
|
||||||
*q++ = tolower (*p);
|
*q++ = tolower ((int)*p);
|
||||||
else
|
else
|
||||||
*q++ = *p;
|
*q++ = *p;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,6 @@
|
||||||
#include <servermd.h>
|
#include <servermd.h>
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
extern Bool g_fSoftwareCursor;
|
|
||||||
|
|
||||||
#define BRIGHTNESS(x) (x##Red * 0.299 + x##Green * 0.587 + x##Blue * 0.114)
|
#define BRIGHTNESS(x) (x##Red * 0.299 + x##Green * 0.587 + x##Blue * 0.114)
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -557,7 +555,7 @@ static void
|
||||||
winDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScr)
|
winDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScr)
|
||||||
{
|
{
|
||||||
winScreenPriv(pScr);
|
winScreenPriv(pScr);
|
||||||
return pScreenPriv->cursor.spriteFuncs->DeviceCursorCleanup(pDev, pScr);
|
pScreenPriv->cursor.spriteFuncs->DeviceCursorCleanup(pDev, pScr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static miPointerSpriteFuncRec winSpriteFuncsRec = {
|
static miPointerSpriteFuncRec winSpriteFuncsRec = {
|
||||||
|
|
|
@ -44,21 +44,9 @@
|
||||||
* References to external globals
|
* References to external globals
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern Bool g_fCursor;
|
|
||||||
extern HWND g_hDlgDepthChange;
|
|
||||||
extern HWND g_hDlgExit;
|
|
||||||
extern HWND g_hDlgAbout;
|
|
||||||
extern WINPREFS pref;
|
|
||||||
#ifdef XWIN_CLIPBOARD
|
#ifdef XWIN_CLIPBOARD
|
||||||
extern Bool g_fClipboardStarted;
|
extern Bool g_fClipboardStarted;
|
||||||
#endif
|
#endif
|
||||||
extern Bool g_fSoftwareCursor;
|
|
||||||
|
|
||||||
#if defined(XWIN_MULTIWINDOW)
|
|
||||||
extern HICON g_hIconX;
|
|
||||||
extern HICON g_hSmallIconX;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local function prototypes
|
* Local function prototypes
|
||||||
*/
|
*/
|
||||||
|
@ -324,7 +312,7 @@ winDisplayExitDialog (winPrivScreenPtr pScreenPriv)
|
||||||
|
|
||||||
/* Set focus to the Cancel button */
|
/* Set focus to the Cancel button */
|
||||||
PostMessage (g_hDlgExit, WM_NEXTDLGCTL,
|
PostMessage (g_hDlgExit, WM_NEXTDLGCTL,
|
||||||
GetDlgItem (g_hDlgExit, IDCANCEL), TRUE);
|
(WPARAM)GetDlgItem (g_hDlgExit, IDCANCEL), TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CONNECTED_CLIENTS_FORMAT "There %s currently %d client%s connected."
|
#define CONNECTED_CLIENTS_FORMAT "There %s currently %d client%s connected."
|
||||||
|
@ -594,7 +582,7 @@ winDisplayAboutDialog (winPrivScreenPtr pScreenPriv)
|
||||||
|
|
||||||
/* Set focus to the OK button */
|
/* Set focus to the OK button */
|
||||||
PostMessage (g_hDlgAbout, WM_NEXTDLGCTL,
|
PostMessage (g_hDlgAbout, WM_NEXTDLGCTL,
|
||||||
GetDlgItem (g_hDlgAbout, IDOK), TRUE);
|
(WPARAM)GetDlgItem (g_hDlgAbout, IDOK), TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -675,7 +663,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
|
||||||
|
|
||||||
case ID_ABOUT_CHANGELOG:
|
case ID_ABOUT_CHANGELOG:
|
||||||
{
|
{
|
||||||
HINSTANCE iReturn;
|
int iReturn;
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
const char * pszCygPath = "/usr/X11R6/share/doc/"
|
const char * pszCygPath = "/usr/X11R6/share/doc/"
|
||||||
"xorg-x11-xwin/changelog.html";
|
"xorg-x11-xwin/changelog.html";
|
||||||
|
@ -688,7 +676,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
|
||||||
"devel/server/changelog.html";
|
"devel/server/changelog.html";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
iReturn = ShellExecute (NULL,
|
iReturn = (int)ShellExecute (NULL,
|
||||||
"open",
|
"open",
|
||||||
pszWinPath,
|
pszWinPath,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -708,7 +696,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
|
||||||
const char * pszPath = __VENDORDWEBSUPPORT__;
|
const char * pszPath = __VENDORDWEBSUPPORT__;
|
||||||
int iReturn;
|
int iReturn;
|
||||||
|
|
||||||
iReturn = ShellExecute (NULL,
|
iReturn = (int)ShellExecute (NULL,
|
||||||
"open",
|
"open",
|
||||||
pszPath,
|
pszPath,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -728,7 +716,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
|
||||||
const char * pszPath = "http://x.cygwin.com/docs/ug/";
|
const char * pszPath = "http://x.cygwin.com/docs/ug/";
|
||||||
int iReturn;
|
int iReturn;
|
||||||
|
|
||||||
iReturn = ShellExecute (NULL,
|
iReturn = (int)ShellExecute (NULL,
|
||||||
"open",
|
"open",
|
||||||
pszPath,
|
pszPath,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -748,7 +736,7 @@ winAboutDlgProc (HWND hwndDialog, UINT message,
|
||||||
const char * pszPath = "http://x.cygwin.com/docs/faq/";
|
const char * pszPath = "http://x.cygwin.com/docs/faq/";
|
||||||
int iReturn;
|
int iReturn;
|
||||||
|
|
||||||
iReturn = ShellExecute (NULL,
|
iReturn = (int)ShellExecute (NULL,
|
||||||
"open",
|
"open",
|
||||||
pszPath,
|
pszPath,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
|
@ -34,13 +34,17 @@
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#include "winmsg.h"
|
#include "winmsg.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Global variables for function pointers into
|
||||||
|
* dynamically loaded libraries
|
||||||
|
*/
|
||||||
|
FARPROC g_fpDirectDrawCreate = NULL;
|
||||||
|
FARPROC g_fpDirectDrawCreateClipper = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* External global variables
|
module handle for dynamically loaded directdraw library
|
||||||
*/
|
*/
|
||||||
|
static HMODULE g_hmodDirectDraw = NULL;
|
||||||
extern const GUID _IID_IDirectDraw4;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Detect engines supported by current Windows version
|
* Detect engines supported by current Windows version
|
||||||
|
@ -334,3 +338,15 @@ winGetDDProcAddresses (void)
|
||||||
|
|
||||||
return fReturn;
|
return fReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
winReleaseDDProcAddresses(void)
|
||||||
|
{
|
||||||
|
if (g_hmodDirectDraw != NULL)
|
||||||
|
{
|
||||||
|
FreeLibrary (g_hmodDirectDraw);
|
||||||
|
g_hmodDirectDraw = NULL;
|
||||||
|
g_fpDirectDrawCreate = NULL;
|
||||||
|
g_fpDirectDrawCreateClipper = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -31,21 +31,10 @@
|
||||||
#ifdef HAVE_XWIN_CONFIG_H
|
#ifdef HAVE_XWIN_CONFIG_H
|
||||||
#include <xwin-config.h>
|
#include <xwin-config.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef XVENDORNAME
|
|
||||||
#define VENDOR_STRING XVENDORNAME
|
|
||||||
#define VENDOR_CONTACT BUILDERADDR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <../xfree86/common/xorgVersion.h>
|
#include <../xfree86/common/xorgVersion.h>
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
|
||||||
/* References to external symbols */
|
|
||||||
extern char * g_pszCommandLine;
|
|
||||||
extern const char * g_pszLogFile;
|
|
||||||
extern Bool g_fSilentFatalError;
|
|
||||||
extern Bool g_fLogInited;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef DDXOSVERRORF
|
#ifdef DDXOSVERRORF
|
||||||
/* Prototype */
|
/* Prototype */
|
||||||
void
|
void
|
||||||
|
@ -129,11 +118,12 @@ winMessageBoxF (const char *pszError, UINT uType, ...)
|
||||||
"%s\n"
|
"%s\n"
|
||||||
|
|
||||||
pszMsgBox = Xprintf (MESSAGEBOXF,
|
pszMsgBox = Xprintf (MESSAGEBOXF,
|
||||||
pszErrorF, VENDOR_STRING,
|
pszErrorF, XVENDORNAME,
|
||||||
XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT,
|
XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT,
|
||||||
VENDOR_CONTACT,
|
BUILDERADDR,
|
||||||
BUILDERSTRING,
|
BUILDERSTRING,
|
||||||
g_pszCommandLine);
|
g_pszCommandLine);
|
||||||
|
|
||||||
if (!pszMsgBox)
|
if (!pszMsgBox)
|
||||||
goto winMessageBoxF_Cleanup;
|
goto winMessageBoxF_Cleanup;
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,6 @@ char * g_pszCommandLine = NULL;
|
||||||
Bool g_fSilentFatalError = FALSE;
|
Bool g_fSilentFatalError = FALSE;
|
||||||
DWORD g_dwCurrentThreadID = 0;
|
DWORD g_dwCurrentThreadID = 0;
|
||||||
Bool g_fKeyboardHookLL = FALSE;
|
Bool g_fKeyboardHookLL = FALSE;
|
||||||
HHOOK g_hhookKeyboardLL = NULL;
|
|
||||||
HWND g_hwndKeyboardFocus = NULL;
|
|
||||||
Bool g_fNoHelpMessageBox = FALSE;
|
Bool g_fNoHelpMessageBox = FALSE;
|
||||||
Bool g_fSoftwareCursor = FALSE;
|
Bool g_fSoftwareCursor = FALSE;
|
||||||
Bool g_fSilentDupError = FALSE;
|
Bool g_fSilentDupError = FALSE;
|
||||||
|
@ -85,11 +83,6 @@ Bool g_fNativeGl = FALSE;
|
||||||
* their function pointers
|
* their function pointers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
HMODULE g_hmodDirectDraw = NULL;
|
|
||||||
FARPROC g_fpDirectDrawCreate = NULL;
|
|
||||||
FARPROC g_fpDirectDrawCreateClipper = NULL;
|
|
||||||
|
|
||||||
HMODULE g_hmodCommonControls = NULL;
|
|
||||||
FARPROC g_fpTrackMouseEvent = (FARPROC) (void (*)(void))NoopDDA;
|
FARPROC g_fpTrackMouseEvent = (FARPROC) (void (*)(void))NoopDDA;
|
||||||
|
|
||||||
|
|
||||||
|
@ -127,7 +120,6 @@ void
|
||||||
winInitializeGlobals (void)
|
winInitializeGlobals (void)
|
||||||
{
|
{
|
||||||
g_dwCurrentThreadID = GetCurrentThreadId ();
|
g_dwCurrentThreadID = GetCurrentThreadId ();
|
||||||
g_hwndKeyboardFocus = NULL;
|
|
||||||
#ifdef XWIN_CLIPBOARD
|
#ifdef XWIN_CLIPBOARD
|
||||||
g_fClipboardLaunched = FALSE;
|
g_fClipboardLaunched = FALSE;
|
||||||
g_fClipboardStarted = FALSE;
|
g_fClipboardStarted = FALSE;
|
||||||
|
|
|
@ -0,0 +1,88 @@
|
||||||
|
/*
|
||||||
|
File: winglobals.h
|
||||||
|
Purpose: declarations for global variables
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
to deal in the Software without restriction, including without limitation
|
||||||
|
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice (including the next
|
||||||
|
paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef WINGLOBALS_H
|
||||||
|
#define WINGLOBALS_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* References to external symbols
|
||||||
|
*/
|
||||||
|
|
||||||
|
extern int g_iNumScreens;
|
||||||
|
extern int g_iLastScreen;
|
||||||
|
extern char * g_pszCommandLine;
|
||||||
|
extern Bool g_fSilentFatalError;
|
||||||
|
extern const char * g_pszLogFile;
|
||||||
|
#ifdef RELOCATE_PROJECTROOT
|
||||||
|
extern Bool g_fLogFileChanged;
|
||||||
|
#endif
|
||||||
|
extern int g_iLogVerbose;
|
||||||
|
extern Bool g_fLogInited;
|
||||||
|
|
||||||
|
extern Bool g_fAuthEnabled;
|
||||||
|
extern Bool g_fXdmcpEnabled;
|
||||||
|
|
||||||
|
extern Bool g_fNoHelpMessageBox;
|
||||||
|
extern Bool g_fSilentDupError;
|
||||||
|
extern Bool g_fNativeGl;
|
||||||
|
|
||||||
|
extern HWND g_hDlgDepthChange;
|
||||||
|
extern HWND g_hDlgExit;
|
||||||
|
extern HWND g_hDlgAbout;
|
||||||
|
|
||||||
|
extern Bool g_fSoftwareCursor;
|
||||||
|
extern Bool g_fCursor;
|
||||||
|
|
||||||
|
#ifdef XWIN_CLIPBOARD
|
||||||
|
|
||||||
|
/* Typedef for DIX wrapper functions */
|
||||||
|
typedef int (*winDispatchProcPtr) (ClientPtr);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Wrapped DIX functions
|
||||||
|
*/
|
||||||
|
extern winDispatchProcPtr winProcEstablishConnectionOrig;
|
||||||
|
extern winDispatchProcPtr winProcQueryTreeOrig;
|
||||||
|
extern winDispatchProcPtr winProcSetSelectionOwnerOrig;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* The global X default icons */
|
||||||
|
#if defined(XWIN_MULTIWINDOW)
|
||||||
|
extern HICON g_hIconX;
|
||||||
|
extern HICON g_hSmallIconX;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef XWIN_MULTIWINDOW
|
||||||
|
extern DWORD g_dwCurrentThreadID;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern Bool g_fKeyboardHookLL;
|
||||||
|
extern Bool g_fButton[3];
|
||||||
|
|
||||||
|
#ifdef XWIN_MULTIWINDOWEXTWM
|
||||||
|
extern Bool g_fNoConfigureWindow;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* WINGLOBALS_H */
|
|
@ -486,7 +486,7 @@ winSendKeyEvent (DWORD dwKey, Bool fDown)
|
||||||
nevents = GetKeyboardEvents(events, g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE);
|
nevents = GetKeyboardEvents(events, g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE);
|
||||||
|
|
||||||
for (i = 0; i < nevents; i++)
|
for (i = 0; i < nevents; i++)
|
||||||
mieqEnqueue(g_pwinKeyboard, events[i].event);
|
mieqEnqueue(g_pwinKeyboard, (InternalEvent*)events[i].event);
|
||||||
|
|
||||||
#if CYGDEBUG
|
#if CYGDEBUG
|
||||||
ErrorF("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n",
|
ErrorF("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n",
|
||||||
|
|
|
@ -34,13 +34,7 @@
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
static HHOOK g_hhookKeyboardLL = NULL;
|
||||||
* References to external symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern HHOOK g_hhookKeyboardLL;
|
|
||||||
extern DWORD g_dwCurrentThreadID;
|
|
||||||
extern HWND g_hwndKeyboardFocus;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -42,232 +42,52 @@ typedef struct
|
||||||
This table is sorted by low byte of winlayout, then by next byte, etc.
|
This table is sorted by low byte of winlayout, then by next byte, etc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
WinKBLayoutRec winKBLayouts[] =
|
WinKBLayoutRec winKBLayouts[] =
|
||||||
{
|
{
|
||||||
{ 0x404, -1, "pc105", "zh_TW", NULL, NULL, "Chinese (Taiwan)"},
|
{ 0x00000404, -1, "pc105", "zh_TW", NULL, NULL, "Chinese (Taiwan)"},
|
||||||
{ 0x405, -1, "pc105", "cz", NULL, NULL, "Czech"},
|
{ 0x00000405, -1, "pc105", "cz", NULL, NULL, "Czech"},
|
||||||
{0x10405, -1, "pc105", "cz_qwerty", NULL, NULL, "Czech (QWERTY)"},
|
{ 0x00010405, -1, "pc105", "cz_qwerty", NULL, NULL, "Czech (QWERTY)"},
|
||||||
{ 0x406, -1, "pc105", "dk", NULL, NULL, "Danish"},
|
{ 0x00000406, -1, "pc105", "dk", NULL, NULL, "Danish"},
|
||||||
{ 0x407, -1, "pc105", "de", NULL, NULL, "German (Germany)"},
|
{ 0x00000407, -1, "pc105", "de", NULL, NULL, "German (Germany)"},
|
||||||
{0x10407, -1, "pc105", "de", NULL, NULL, "German (Germany, IBM)"},
|
{ 0x00010407, -1, "pc105", "de", NULL, NULL, "German (Germany,IBM)"},
|
||||||
{ 0x807, -1, "pc105", "ch", "de", NULL, "German (Switzerland)"},
|
{ 0x00000807, -1, "pc105", "ch", "de", NULL, "German (Switzerland)"},
|
||||||
{ 0x409, -1, "pc105", "us", NULL, NULL, "English (USA)"},
|
{ 0x00000409, -1, "pc105", "us", NULL, NULL, "English (USA)"},
|
||||||
{0x10409, -1, "pc105", "dvorak", NULL, NULL, "English (USA, Dvorak)"},
|
{ 0x00010409, -1, "pc105", "dvorak", NULL, NULL, "English (USA,Dvorak)"},
|
||||||
{0x20409, -1, "pc105", "us_intl", NULL, NULL, "English (USA, International)"},
|
{ 0x00020409, -1, "pc105", "us_intl", NULL, NULL, "English (USA,International)"},
|
||||||
{ 0x809, -1, "pc105", "gb", NULL, NULL, "English (United Kingdom)"},
|
{ 0x00000809, -1, "pc105", "gb", NULL, NULL, "English (United Kingdom)"},
|
||||||
{ 0x1809, -1, "pc105", "ie", NULL, NULL, "Irish"},
|
{ 0x00001809, -1, "pc105", "ie", NULL, NULL, "Irish"},
|
||||||
{ 0x40a, -1, "pc105", "es", NULL, NULL, "Spanish (Spain, Traditional Sort)"},
|
{ 0x0000040a, -1, "pc105", "es", NULL, NULL, "Spanish (Spain,Traditional Sort)"},
|
||||||
{ 0x80a, -1, "pc105", "latam", NULL, NULL, "Latin American"},
|
{ 0x0000080a, -1, "pc105", "latam", NULL, NULL, "Latin American"},
|
||||||
{ 0x40b, -1, "pc105", "fi", NULL, NULL, "Finnish"},
|
{ 0x0000040b, -1, "pc105", "fi", NULL, NULL, "Finnish"},
|
||||||
{ 0x40c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"},
|
{ 0x0000040c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"},
|
||||||
{ 0x80c, -1, "pc105", "be", NULL, NULL, "French (Belgian)"},
|
{ 0x0000080c, -1, "pc105", "be", NULL, NULL, "French (Belgian)"},
|
||||||
{ 0xc0c, -1, "pc105", "ca", "fr", NULL, "French (Canada)"},
|
{ 0x00000c0c, -1, "pc105", "ca", "fr", NULL, "French (Canada)"},
|
||||||
{ 0x100c, -1, "pc105", "ch", "fr", NULL, "French (Switzerland)"},
|
{ 0x0000100c, -1, "pc105", "ch", "fr", NULL, "French (Switzerland)"},
|
||||||
{ 0x40d, -1, "pc105", "il", NULL, NULL, "Hebrew"},
|
{ 0x0000040d, -1, "pc105", "il", NULL, NULL, "Hebrew"},
|
||||||
{ 0x40e, -1, "pc105", "hu", NULL, NULL, "Hungarian"},
|
{ 0x0000040e, -1, "pc105", "hu", NULL, NULL, "Hungarian"},
|
||||||
{ 0x40f, -1, "pc105", "is", NULL, NULL, "Icelandic"},
|
{ 0x0000040f, -1, "pc105", "is", NULL, NULL, "Icelandic"},
|
||||||
{ 0x410, -1, "pc105", "it", NULL, NULL, "Italian"},
|
{ 0x00000410, -1, "pc105", "it", NULL, NULL, "Italian"},
|
||||||
{0x10410, -1, "pc105", "it", NULL, NULL, "Italian (142)"},
|
{ 0x00010410, -1, "pc105", "it", NULL, NULL, "Italian (142)"},
|
||||||
{0xa0000410,-1, "macbook79","it", "mac",NULL, "Italiano (Apple)"},
|
{ 0xa0000410, -1, "macbook79", "it", "mac", NULL, "Italiano (Apple)"},
|
||||||
{ 0x411, 7, "jp106", "jp", NULL, NULL, "Japanese"},
|
{ 0x00000411, 7, "jp106", "jp", NULL, NULL, "Japanese"},
|
||||||
{ 0x413, -1, "pc105", "nl", NULL, NULL, "Dutch"},
|
{ 0x00000413, -1, "pc105", "nl", NULL, NULL, "Dutch"},
|
||||||
{ 0x813, -1, "pc105", "be", NULL, NULL, "Dutch (Belgian)"},
|
{ 0x00000813, -1, "pc105", "be", NULL, NULL, "Dutch (Belgian)"},
|
||||||
{ 0x414, -1, "pc105", "no", NULL, NULL, "Norwegian"},
|
{ 0x00000414, -1, "pc105", "no", NULL, NULL, "Norwegian"},
|
||||||
{ 0x415, -1, "pc105", "pl", NULL, NULL, "Polish (Programmers)"},
|
{ 0x00000415, -1, "pc105", "pl", NULL, NULL, "Polish (Programmers)"},
|
||||||
{ 0x416, -1, "pc105", "br", NULL, NULL, "Portuguese (Brazil, ABNT)"},
|
{ 0x00000416, -1, "pc105", "br", NULL, NULL, "Portuguese (Brazil,ABNT)"},
|
||||||
{0x10416, -1, "abnt2", "br", NULL, NULL, "Portuguese (Brazil, ABNT2)"},
|
{ 0x00010416, -1, "abnt2", "br", NULL, NULL, "Portuguese (Brazil,ABNT2)"},
|
||||||
{ 0x816, -1, "pc105", "pt", NULL, NULL, "Portuguese (Portugal)"},
|
{ 0x00000816, -1, "pc105", "pt", NULL, NULL, "Portuguese (Portugal)"},
|
||||||
{ 0x41a, -1, "pc105", "hr", NULL, NULL, "Croatian"},
|
{ 0x0000041a, -1, "pc105", "hr", NULL, NULL, "Croatian"},
|
||||||
{ 0x41d, -1, "pc105", "se", NULL, NULL, "Swedish (Sweden)"},
|
{ 0x0000041d, -1, "pc105", "se", NULL, NULL, "Swedish (Sweden)"},
|
||||||
{ 0x424, -1, "pc105", "si", NULL, NULL, "Slovenian"},
|
{ 0x00000424, -1, "pc105", "si", NULL, NULL, "Slovenian"},
|
||||||
{ 0x425, -1, "pc105", "ee", NULL, NULL, "Estonian"},
|
{ 0x00000425, -1, "pc105", "ee", NULL, NULL, "Estonian"},
|
||||||
{ 0x452, -1, "pc105", "gb", "intl", NULL, "United Kingdom (Extended)"},
|
{ 0x00000452, -1, "pc105", "gb", "intl", NULL, "United Kingdom (Extended)"},
|
||||||
{ -1, -1, NULL, NULL, NULL, NULL, NULL}
|
{ -1, -1, NULL, NULL, NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Listing of language codes from MSDN */
|
|
||||||
/*
|
/*
|
||||||
Support ID XKB Language
|
See http://technet.microsoft.com/en-us/library/cc766503%28WS.10%29.aspx
|
||||||
====================================================================
|
for a listing of input locale (keyboard layout) codes
|
||||||
? 0x0000 Language Neutral
|
*/
|
||||||
? 0x0400 Process or User Default Language
|
|
||||||
? 0x0800 System Default Language
|
|
||||||
0x0401 Arabic (Saudi Arabia)
|
|
||||||
0x0801 Arabic (Iraq)
|
|
||||||
0x0c01 Arabic (Egypt)
|
|
||||||
0x1001 Arabic (Libya)
|
|
||||||
0x1401 Arabic (Algeria)
|
|
||||||
0x1801 Arabic (Morocco)
|
|
||||||
0x1c01 Arabic (Tunisia)
|
|
||||||
0x2001 Arabic (Oman)
|
|
||||||
0x2401 Arabic (Yemen)
|
|
||||||
0x2801 Arabic (Syria)
|
|
||||||
0x2c01 Arabic (Jordan)
|
|
||||||
0x3001 Arabic (Lebanon)
|
|
||||||
0x3401 Arabic (Kuwait)
|
|
||||||
0x3801 Arabic (U.A.E.)
|
|
||||||
0x3c01 Arabic (Bahrain)
|
|
||||||
0x4001 Arabic (Qatar)
|
|
||||||
Arabic (102) AZERTY
|
|
||||||
0x0402 Bulgarian
|
|
||||||
0x0403 Catalan
|
|
||||||
0x0404 Chinese (Taiwan)
|
|
||||||
0x0804 Chinese (PRC)
|
|
||||||
0x0c04 Chinese (Hong Kong SAR, PRC)
|
|
||||||
0x1004 Chinese (Singapore)
|
|
||||||
0x1404 Chinese (Macao SAR) (98/ME,2K/XP)
|
|
||||||
X 0x0405 cz Czech
|
|
||||||
X cz_qwerty Czech (QWERTY)
|
|
||||||
Czech (Programmers)
|
|
||||||
X 0x0406 dk Danish
|
|
||||||
X 0x0407 de German (Standard)
|
|
||||||
X 0x0807 de_CH German (Switzerland)
|
|
||||||
0x0c07 German (Austria)
|
|
||||||
0x1007 German (Luxembourg)
|
|
||||||
0x1407 German (Liechtenstein)
|
|
||||||
0x0408 Greek
|
|
||||||
X 0x0409 us English (United States)
|
|
||||||
X 0x0809 gb English (United Kingdom)
|
|
||||||
0x0c09 English (Australian)
|
|
||||||
0x1009 English (Canadian)
|
|
||||||
0x1409 English (New Zealand)
|
|
||||||
X 0x1809 ie English (Ireland)
|
|
||||||
0x1c09 English (South Africa)
|
|
||||||
0x2009 English (Jamaica)
|
|
||||||
0x2409 English (Caribbean)
|
|
||||||
0x2809 English (Belize)
|
|
||||||
0x2c09 English (Trinidad)
|
|
||||||
0x3009 English (Zimbabwe) (98/ME,2K/XP)
|
|
||||||
0x3409 English (Philippines) (98/ME,2K/XP)
|
|
||||||
X 0x040a es Spanish (Spain, Traditional Sort)
|
|
||||||
0x080a Spanish (Mexican)
|
|
||||||
0x0c0a Spanish (Spain, Modern Sort)
|
|
||||||
0x100a Spanish (Guatemala)
|
|
||||||
0x140a Spanish (Costa Rica)
|
|
||||||
0x180a Spanish (Panama)
|
|
||||||
0x1c0a Spanish (Dominican Republic)
|
|
||||||
0x200a Spanish (Venezuela)
|
|
||||||
0x240a Spanish (Colombia)
|
|
||||||
0x280a Spanish (Peru)
|
|
||||||
0x2c0a Spanish (Argentina)
|
|
||||||
0x300a Spanish (Ecuador)
|
|
||||||
0x340a Spanish (Chile)
|
|
||||||
0x380a Spanish (Uruguay)
|
|
||||||
0x3c0a Spanish (Paraguay)
|
|
||||||
0x400a Spanish (Bolivia)
|
|
||||||
0x440a Spanish (El Salvador)
|
|
||||||
0x480a Spanish (Honduras)
|
|
||||||
0x4c0a Spanish (Nicaragua)
|
|
||||||
0x500a Spanish (Puerto Rico)
|
|
||||||
X 0x040b fi Finnish
|
|
||||||
Finnish (with Sami)
|
|
||||||
X 0x040c fr French (Standard)
|
|
||||||
X 0x080c be French (Belgian)
|
|
||||||
. 0x0c0c French (Canadian)
|
|
||||||
French (Canadian, Legacy)
|
|
||||||
Canadian (Multilingual)
|
|
||||||
X 0x100c fr_CH French (Switzerland)
|
|
||||||
0x140c French (Luxembourg)
|
|
||||||
0x180c French (Monaco) (98/ME,2K/XP)
|
|
||||||
0x040d Hebrew
|
|
||||||
X 0x040e hu Hungarian
|
|
||||||
. 0x040f Icelandic
|
|
||||||
X 0x0410 it Italian (Standard)
|
|
||||||
0x0810 Italian (Switzerland)
|
|
||||||
X 0x0411 jp Japanese
|
|
||||||
0x0412 Korean
|
|
||||||
0x0812 Korean (Johab) (95,NT)
|
|
||||||
. 0x0413 Dutch (Netherlands)
|
|
||||||
X 0x0813 be Dutch (Belgium)
|
|
||||||
X 0x0414 no Norwegian (Bokmal)
|
|
||||||
0x0814 Norwegian (Nynorsk)
|
|
||||||
. 0x0415 Polish
|
|
||||||
X 0x0416 br Portuguese (Brazil)
|
|
||||||
X 0x0816 pt Portuguese (Portugal)
|
|
||||||
. 0x0418 Romanian
|
|
||||||
0x0419 Russian
|
|
||||||
. 0x041a Croatian
|
|
||||||
. 0x081a Serbian (Latin)
|
|
||||||
. 0x0c1a Serbian (Cyrillic)
|
|
||||||
0x101a Croatian (Bosnia and Herzegovina)
|
|
||||||
0x141a Bosnian (Bosnia and Herzegovina)
|
|
||||||
0x181a Serbian (Latin, Bosnia, and Herzegovina)
|
|
||||||
0x1c1a Serbian (Cyrillic, Bosnia, and Herzegovina)
|
|
||||||
. 0x041b Slovak
|
|
||||||
. 0x041c Albanian
|
|
||||||
X 0x041d se Swedish
|
|
||||||
0x081d Swedish (Finland)
|
|
||||||
0x041e Thai
|
|
||||||
0x041f Turkish
|
|
||||||
0x0420 Urdu (Pakistan) (98/ME,2K/XP)
|
|
||||||
0x0820 Urdu (India)
|
|
||||||
0x0421 Indonesian
|
|
||||||
0x0422 Ukrainian
|
|
||||||
0x0423 Belarusian
|
|
||||||
. 0x0424 Slovenian
|
|
||||||
0x0425 Estonian
|
|
||||||
0x0426 Latvian
|
|
||||||
0x0427 Lithuanian
|
|
||||||
0x0827 Lithuanian (Classic) (98)
|
|
||||||
0x0429 Farsi
|
|
||||||
0x042a Vietnamese (98/ME,NT,2K/XP)
|
|
||||||
0x042b Armenian. This is Unicode only. (2K/XP)
|
|
||||||
Armenian Eastern
|
|
||||||
Armenian Western
|
|
||||||
0x042c Azeri (Latin)
|
|
||||||
0x082c Azeri (Cyrillic)
|
|
||||||
0x042d Basque
|
|
||||||
0x042f Macedonian (FYROM)
|
|
||||||
0x0430 Sutu
|
|
||||||
0x0432 Setswana/Tswana (South Africa)
|
|
||||||
0x0434 isiXhosa/Xhosa (South Africa)
|
|
||||||
0x0435 isiZulu/Zulu (South Africa)
|
|
||||||
0x0436 Afrikaans
|
|
||||||
0x0437 Georgian. This is Unicode only. (2K/XP)
|
|
||||||
. 0x0438 Faeroese
|
|
||||||
0x0439 Hindi. This is Unicode only. (2K/XP)
|
|
||||||
0x043a Maltese (Malta)
|
|
||||||
0x043b Sami, Northern (Norway)
|
|
||||||
0x083b Sami, Northern (Sweden)
|
|
||||||
0x0c3b Sami, Northern (Finland)
|
|
||||||
0x103b Sami, Lule (Norway)
|
|
||||||
0x143b Sami, Lule (Sweden)
|
|
||||||
0x183b Sami, Southern (Norway)
|
|
||||||
0x1c3b Sami, Southern (Sweden)
|
|
||||||
0x203b Sami, Skolt (Finland)
|
|
||||||
0x243b Sami, Inari (Finland)
|
|
||||||
0x043e Malay (Malaysian)
|
|
||||||
0x083e Malay (Brunei Darussalam)
|
|
||||||
0x0440 Kyrgyz. (XP)
|
|
||||||
0x0441 Swahili (Kenya)
|
|
||||||
0x0443 Uzbek (Latin)
|
|
||||||
0x0843 Uzbek (Cyrillic)
|
|
||||||
0x0444 Tatar (Tatarstan)
|
|
||||||
0x0445 Bengali (India)
|
|
||||||
Bengali (Inscript)
|
|
||||||
0x0446 Punjabi. This is Unicode only. (XP)
|
|
||||||
0x0447 Gujarati. This is Unicode only. (XP)
|
|
||||||
0x0449 Tamil. This is Unicode only. (2K/XP)
|
|
||||||
0x044a Telugu. This is Unicode only. (XP)
|
|
||||||
0x044b Kannada. This is Unicode only. (XP)
|
|
||||||
0x044c Malayalam (India)
|
|
||||||
0x044e Marathi. This is Unicode only. (2K/XP)
|
|
||||||
0x044f Sanskrit. This is Unicode only. (2K/XP)
|
|
||||||
0x0450 Mongolian (XP)
|
|
||||||
0x0452 Welsh (United Kingdom)
|
|
||||||
0x0455 Burmese
|
|
||||||
0x0456 Galician (XP)
|
|
||||||
0x0457 Konkani. This is Unicode only. (2K/XP)
|
|
||||||
0x045a Syriac. This is Unicode only. (XP)
|
|
||||||
0x0465 Divehi. This is Unicode only. (XP)
|
|
||||||
Divehi (Phonetic)
|
|
||||||
Divehi (Typewriter)
|
|
||||||
0x046b Quechua (Bolivia)
|
|
||||||
0x086b Quechua (Ecuador)
|
|
||||||
0x0c6b Quechua (Peru)
|
|
||||||
0x046c Sesotho sa Leboa/Northern Sotho (South Africa)
|
|
||||||
0x007f LOCALE_INVARIANT. See MAKELCID.
|
|
||||||
0x0481 Maori (New Zealand)
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,14 +36,12 @@
|
||||||
#endif
|
#endif
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
|
||||||
#if defined(XFree86Server)
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "exevents.h" /* for button/axes labels */
|
#include "exevents.h" /* for button/axes labels */
|
||||||
#include "xserver-properties.h"
|
#include "xserver-properties.h"
|
||||||
|
|
||||||
/* Peek the internal button mapping */
|
/* Peek the internal button mapping */
|
||||||
static CARD8 const *g_winMouseButtonMap = NULL;
|
static CARD8 const *g_winMouseButtonMap = NULL;
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -123,9 +121,7 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState)
|
||||||
free(map);
|
free(map);
|
||||||
free(btn_labels);
|
free(btn_labels);
|
||||||
|
|
||||||
#if defined(XFree86Server)
|
|
||||||
g_winMouseButtonMap = pDeviceInt->button->map;
|
g_winMouseButtonMap = pDeviceInt->button->map;
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DEVICE_ON:
|
case DEVICE_ON:
|
||||||
|
@ -133,9 +129,8 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DEVICE_CLOSE:
|
case DEVICE_CLOSE:
|
||||||
#if defined(XFree86Server)
|
|
||||||
g_winMouseButtonMap = NULL;
|
g_winMouseButtonMap = NULL;
|
||||||
#endif
|
|
||||||
case DEVICE_OFF:
|
case DEVICE_OFF:
|
||||||
pDevice->on = FALSE;
|
pDevice->on = FALSE;
|
||||||
break;
|
break;
|
||||||
|
@ -242,10 +237,8 @@ winMouseButtonsSendEvent (int iEventType, int iButton)
|
||||||
int i, nevents;
|
int i, nevents;
|
||||||
ValuatorMask mask;
|
ValuatorMask mask;
|
||||||
|
|
||||||
#if defined(XFree86Server)
|
|
||||||
if (g_winMouseButtonMap)
|
if (g_winMouseButtonMap)
|
||||||
iButton = g_winMouseButtonMap[iButton];
|
iButton = g_winMouseButtonMap[iButton];
|
||||||
#endif
|
|
||||||
|
|
||||||
valuator_mask_zero(&mask);
|
valuator_mask_zero(&mask);
|
||||||
GetEventList(&events);
|
GetEventList(&events);
|
||||||
|
@ -253,7 +246,7 @@ winMouseButtonsSendEvent (int iEventType, int iButton)
|
||||||
POINTER_RELATIVE, &mask);
|
POINTER_RELATIVE, &mask);
|
||||||
|
|
||||||
for (i = 0; i < nevents; i++)
|
for (i = 0; i < nevents; i++)
|
||||||
mieqEnqueue(g_pwinPointer, events[i].event);
|
mieqEnqueue(g_pwinPointer, (InternalEvent*)events[i].event);
|
||||||
|
|
||||||
#if CYGDEBUG
|
#if CYGDEBUG
|
||||||
ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n",
|
ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n",
|
||||||
|
@ -388,5 +381,5 @@ void winEnqueueMotion(int x, int y)
|
||||||
POINTER_ABSOLUTE | POINTER_SCREEN, &mask);
|
POINTER_ABSOLUTE | POINTER_SCREEN, &mask);
|
||||||
|
|
||||||
for (i = 0; i < nevents; i++)
|
for (i = 0; i < nevents; i++)
|
||||||
mieqEnqueue(g_pwinPointer, events[i].event);
|
mieqEnqueue(g_pwinPointer, (InternalEvent*)events[i].event);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,13 +41,6 @@
|
||||||
#include "propertyst.h"
|
#include "propertyst.h"
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
|
|
||||||
/*
|
|
||||||
* External global variables
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern HICON g_hIconX;
|
|
||||||
extern HICON g_hSmallIconX;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prototypes for local functions
|
* Prototypes for local functions
|
||||||
|
|
|
@ -38,16 +38,6 @@
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#include "dixevents.h"
|
#include "dixevents.h"
|
||||||
#include "winmultiwindowclass.h"
|
#include "winmultiwindowclass.h"
|
||||||
#include "winprefs.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* External global variables
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern HICON g_hIconX;
|
|
||||||
extern HICON g_hSmallIconX;
|
|
||||||
extern HWND g_hDlgDepthChange;
|
|
||||||
extern Bool g_fNativeGl;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prototypes for local functions
|
* Prototypes for local functions
|
||||||
|
|
|
@ -634,7 +634,7 @@ winMultiWindowWMProc (void *pArg)
|
||||||
ErrorF ("winMultiWindowWMProc ()\n");
|
ErrorF ("winMultiWindowWMProc ()\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Loop until we explicity break out */
|
/* Loop until we explicitly break out */
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
WMMsgNodePtr pNode;
|
WMMsgNodePtr pNode;
|
||||||
|
@ -1553,6 +1553,7 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
|
||||||
int format;
|
int format;
|
||||||
unsigned long hint = 0, maxmin = 0, style, nitems = 0 , left = 0;
|
unsigned long hint = 0, maxmin = 0, style, nitems = 0 , left = 0;
|
||||||
WindowPtr pWin = GetProp (hWnd, WIN_WINDOW_PROP);
|
WindowPtr pWin = GetProp (hWnd, WIN_WINDOW_PROP);
|
||||||
|
MwmHints *mwm_hint = NULL;
|
||||||
|
|
||||||
if (!hWnd) return;
|
if (!hWnd) return;
|
||||||
if (!IsWindow (hWnd)) return;
|
if (!IsWindow (hWnd)) return;
|
||||||
|
@ -1584,7 +1585,6 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
|
||||||
}
|
}
|
||||||
|
|
||||||
nitems = left = 0;
|
nitems = left = 0;
|
||||||
MwmHints *mwm_hint = NULL;
|
|
||||||
if (XGetWindowProperty(pDisplay, iWindow, motif_wm_hints, 0L,
|
if (XGetWindowProperty(pDisplay, iWindow, motif_wm_hints, 0L,
|
||||||
PropMwmHintsElements, False, motif_wm_hints, &type, &format,
|
PropMwmHintsElements, False, motif_wm_hints, &type, &format,
|
||||||
&nitems, &left, (unsigned char **)&mwm_hint) == Success)
|
&nitems, &left, (unsigned char **)&mwm_hint) == Success)
|
||||||
|
|
|
@ -42,15 +42,6 @@
|
||||||
#include "winmsg.h"
|
#include "winmsg.h"
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
|
|
||||||
/*
|
|
||||||
* External global variables
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern Bool g_fCursor;
|
|
||||||
extern Bool g_fKeyboardHookLL;
|
|
||||||
extern Bool g_fSoftwareCursor;
|
|
||||||
extern Bool g_fButton[3];
|
|
||||||
|
|
||||||
extern void winUpdateWindowPosition (HWND hWnd, Bool reshape, HWND *zstyle);
|
extern void winUpdateWindowPosition (HWND hWnd, Bool reshape, HWND *zstyle);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,13 +34,6 @@
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* External symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern HWND g_hDlgExit;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local function prototypes
|
* Local function prototypes
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -37,14 +37,6 @@
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* External symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern const GUID _IID_IDirectDraw2;
|
|
||||||
extern HWND g_hDlgExit;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local function prototypes
|
* Local function prototypes
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -163,11 +163,8 @@ winDestroyPixmapNativeGDI (PixmapPtr pPixmap)
|
||||||
if (pPixmapPriv->hBitmap) DeleteObject (pPixmapPriv->hBitmap);
|
if (pPixmapPriv->hBitmap) DeleteObject (pPixmapPriv->hBitmap);
|
||||||
|
|
||||||
/* Free the bitmap info header memory */
|
/* Free the bitmap info header memory */
|
||||||
if (pPixmapPriv->pbmih != NULL)
|
free(pPixmapPriv->pbmih);
|
||||||
{
|
pPixmapPriv->pbmih = NULL;
|
||||||
free (pPixmapPriv->pbmih);
|
|
||||||
pPixmapPriv->pbmih = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Free the pixmap memory */
|
/* Free the pixmap memory */
|
||||||
free (pPixmap);
|
free (pPixmap);
|
||||||
|
|
|
@ -49,22 +49,11 @@
|
||||||
/* Where will the custom menu commands start counting from? */
|
/* Where will the custom menu commands start counting from? */
|
||||||
#define STARTMENUID WM_USER
|
#define STARTMENUID WM_USER
|
||||||
|
|
||||||
/* External global variables */
|
|
||||||
#ifdef XWIN_MULTIWINDOW
|
|
||||||
extern DWORD g_dwCurrentThreadID;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern const char *winGetBaseDir(void);
|
extern const char *winGetBaseDir(void);
|
||||||
|
|
||||||
/* From winmultiwindowflex.l, the real parser */
|
/* From winmultiwindowflex.l, the real parser */
|
||||||
extern void parse_file (FILE *fp);
|
extern void parse_file (FILE *fp);
|
||||||
|
|
||||||
/* From winprefyacc.y, the pref structure loaded by the parser */
|
|
||||||
extern WINPREFS pref;
|
|
||||||
|
|
||||||
/* The global X default icon */
|
|
||||||
extern HICON g_hIconX;
|
|
||||||
extern HICON g_hSmallIconX;
|
|
||||||
|
|
||||||
/* Currently in use command ID, incremented each new menu item created */
|
/* Currently in use command ID, incremented each new menu item created */
|
||||||
static int g_cmdid = STARTMENUID;
|
static int g_cmdid = STARTMENUID;
|
||||||
|
|
|
@ -151,7 +151,8 @@ typedef struct WINPREFS
|
||||||
|
|
||||||
} WINPREFS;
|
} WINPREFS;
|
||||||
|
|
||||||
|
/* The global pref settings structure loaded by the winprefyacc.y parser */
|
||||||
|
extern WINPREFS pref;
|
||||||
|
|
||||||
|
|
||||||
/* Functions */
|
/* Functions */
|
||||||
|
|
|
@ -30,40 +30,20 @@ from The Open Group.
|
||||||
#ifdef HAVE_XWIN_CONFIG_H
|
#ifdef HAVE_XWIN_CONFIG_H
|
||||||
#include <xwin-config.h>
|
#include <xwin-config.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef XVENDORNAME
|
|
||||||
#define VENDOR_STRING XVENDORNAME
|
|
||||||
#define VENDOR_CONTACT BUILDERADDR
|
|
||||||
#endif
|
|
||||||
#include <../xfree86/common/xorgVersion.h>
|
#include <../xfree86/common/xorgVersion.h>
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#include "winconfig.h"
|
#include "winconfig.h"
|
||||||
#include "winprefs.h"
|
|
||||||
#include "winmsg.h"
|
#include "winmsg.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* References to external symbols
|
* References to external symbols
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern int g_iNumScreens;
|
|
||||||
extern winScreenInfo * g_ScreenInfo;
|
|
||||||
#ifdef XWIN_CLIPBOARD
|
#ifdef XWIN_CLIPBOARD
|
||||||
extern Bool g_fUnicodeClipboard;
|
extern Bool g_fUnicodeClipboard;
|
||||||
extern Bool g_fClipboard;
|
extern Bool g_fClipboard;
|
||||||
#endif
|
#endif
|
||||||
extern int g_iLogVerbose;
|
|
||||||
extern const char * g_pszLogFile;
|
|
||||||
#ifdef RELOCATE_PROJECTROOT
|
|
||||||
extern Bool g_fLogFileChanged;
|
|
||||||
#endif
|
|
||||||
extern Bool g_fXdmcpEnabled;
|
|
||||||
extern Bool g_fAuthEnabled;
|
|
||||||
extern char * g_pszCommandLine;
|
|
||||||
extern Bool g_fKeyboardHookLL;
|
|
||||||
extern Bool g_fNoHelpMessageBox;
|
|
||||||
extern Bool g_fSoftwareCursor;
|
|
||||||
extern Bool g_fSilentDupError;
|
|
||||||
extern Bool g_fNativeGl;
|
|
||||||
|
|
||||||
/* globals required by callback function for monitor information */
|
/* globals required by callback function for monitor information */
|
||||||
struct GetMonitorInfoData {
|
struct GetMonitorInfoData {
|
||||||
int requestedMonitor;
|
int requestedMonitor;
|
||||||
|
@ -1248,10 +1228,10 @@ winLogVersionInfo (void)
|
||||||
s_fBeenHere = TRUE;
|
s_fBeenHere = TRUE;
|
||||||
|
|
||||||
ErrorF ("Welcome to the XWin X Server\n");
|
ErrorF ("Welcome to the XWin X Server\n");
|
||||||
ErrorF ("Vendor: %s\n", VENDOR_STRING);
|
ErrorF ("Vendor: %s\n", XVENDORNAME);
|
||||||
ErrorF ("Release: %d.%d.%d.%d (%d)\n", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT);
|
ErrorF ("Release: %d.%d.%d.%d (%d)\n", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT);
|
||||||
ErrorF ("%s\n\n", BUILDERSTRING);
|
ErrorF ("%s\n\n", BUILDERSTRING);
|
||||||
ErrorF ("Contact: %s\n", VENDOR_CONTACT);
|
ErrorF ("Contact: %s\n", BUILDERADDR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -65,14 +65,6 @@ winMWExtWMProcs = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* References to external symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern Bool g_fSoftwareCursor;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prototypes
|
* Prototypes
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -37,13 +37,6 @@
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* External symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern HWND g_hDlgExit;
|
|
||||||
extern const char *g_pszLogFile;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
|
* FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
|
||||||
* so we have to redefine it here.
|
* so we have to redefine it here.
|
||||||
|
@ -55,7 +48,7 @@ extern const char *g_pszLogFile;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FIXME: Headers are broken, IID_IDirectDraw4 has to be defined
|
* FIXME: Headers are broken, IID_IDirectDraw2 has to be defined
|
||||||
* here manually. Should be handled by ddraw.h
|
* here manually. Should be handled by ddraw.h
|
||||||
*/
|
*/
|
||||||
#ifndef IID_IDirectDraw2
|
#ifndef IID_IDirectDraw2
|
||||||
|
@ -828,7 +821,6 @@ winInitVisualsShadowDD (ScreenPtr pScreen)
|
||||||
case 24:
|
case 24:
|
||||||
case 16:
|
case 16:
|
||||||
case 15:
|
case 15:
|
||||||
#if defined(XFree86Server)
|
|
||||||
/* Create the real visual */
|
/* Create the real visual */
|
||||||
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
||||||
TrueColorMask,
|
TrueColorMask,
|
||||||
|
@ -861,42 +853,9 @@ winInitVisualsShadowDD (ScreenPtr pScreen)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#else /* XFree86Server */
|
|
||||||
/* Create the real visual */
|
|
||||||
if (!fbSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
|
||||||
TrueColorMask,
|
|
||||||
pScreenPriv->dwBitsPerRGB,
|
|
||||||
pScreenPriv->dwRedMask,
|
|
||||||
pScreenPriv->dwGreenMask,
|
|
||||||
pScreenPriv->dwBlueMask))
|
|
||||||
{
|
|
||||||
ErrorF ("winInitVisualsShadowDD - fbSetVisualTypesAndMasks "
|
|
||||||
"failed for TrueColor\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef XWIN_EMULATEPSEUDO
|
|
||||||
if (!pScreenInfo->fEmulatePseudo)
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* Setup a pseudocolor visual */
|
|
||||||
if (!fbSetVisualTypesAndMasks (8,
|
|
||||||
PseudoColorMask,
|
|
||||||
8,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0))
|
|
||||||
{
|
|
||||||
ErrorF ("winInitVisualsShadowDD - fbSetVisualTypesAndMasks "
|
|
||||||
"failed for PseudoColor\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif /* XFree86Server */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
#if defined(XFree86Server)
|
|
||||||
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
||||||
pScreenInfo->fFullScreen
|
pScreenInfo->fFullScreen
|
||||||
? PseudoColorMask : StaticColorMask,
|
? PseudoColorMask : StaticColorMask,
|
||||||
|
@ -911,20 +870,6 @@ winInitVisualsShadowDD (ScreenPtr pScreen)
|
||||||
"failed\n");
|
"failed\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#else /* XFree86Server */
|
|
||||||
if (!fbSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
|
||||||
pScreenInfo->fFullScreen
|
|
||||||
? PseudoColorMask : StaticColorMask,
|
|
||||||
pScreenPriv->dwBitsPerRGB,
|
|
||||||
pScreenPriv->dwRedMask,
|
|
||||||
pScreenPriv->dwGreenMask,
|
|
||||||
pScreenPriv->dwBlueMask))
|
|
||||||
{
|
|
||||||
ErrorF ("winInitVisualsShadowDD - fbSetVisualTypesAndMasks "
|
|
||||||
"failed\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
#endif /* XFree86Server */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -37,13 +37,6 @@
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* External symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern HWND g_hDlgExit;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
|
* FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
|
||||||
* so we have to redefine it here.
|
* so we have to redefine it here.
|
||||||
|
@ -883,7 +876,6 @@ winInitVisualsShadowDDNL (ScreenPtr pScreen)
|
||||||
case 24:
|
case 24:
|
||||||
case 16:
|
case 16:
|
||||||
case 15:
|
case 15:
|
||||||
#if defined(XFree86Server)
|
|
||||||
/* Setup the real visual */
|
/* Setup the real visual */
|
||||||
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
||||||
TrueColorMask,
|
TrueColorMask,
|
||||||
|
@ -916,42 +908,9 @@ winInitVisualsShadowDDNL (ScreenPtr pScreen)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#else /* XFree86Server */
|
|
||||||
/* Setup the real visual */
|
|
||||||
if (!fbSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
|
||||||
TrueColorMask,
|
|
||||||
pScreenPriv->dwBitsPerRGB,
|
|
||||||
pScreenPriv->dwRedMask,
|
|
||||||
pScreenPriv->dwGreenMask,
|
|
||||||
pScreenPriv->dwBlueMask))
|
|
||||||
{
|
|
||||||
ErrorF ("winInitVisualsShadowDDNL - fbSetVisualTypesAndMasks "
|
|
||||||
"failed for TrueColor\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef XWIN_EMULATEPSEUDO
|
|
||||||
if (!pScreenInfo->fEmulatePseudo)
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* Setup a pseudocolor visual */
|
|
||||||
if (!fbSetVisualTypesAndMasks (8,
|
|
||||||
PseudoColorMask,
|
|
||||||
8,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0))
|
|
||||||
{
|
|
||||||
ErrorF ("winInitVisualsShadowDDNL - fbSetVisualTypesAndMasks "
|
|
||||||
"failed for PseudoColor\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif /* XFree86Server */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
#if defined(XFree86Server)
|
|
||||||
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
||||||
pScreenInfo->fFullScreen
|
pScreenInfo->fFullScreen
|
||||||
? PseudoColorMask : StaticColorMask,
|
? PseudoColorMask : StaticColorMask,
|
||||||
|
@ -966,20 +925,6 @@ winInitVisualsShadowDDNL (ScreenPtr pScreen)
|
||||||
"failed\n");
|
"failed\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#else /* XFree86Server */
|
|
||||||
if (!fbSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
|
||||||
pScreenInfo->fFullScreen
|
|
||||||
? PseudoColorMask : StaticColorMask,
|
|
||||||
pScreenPriv->dwBitsPerRGB,
|
|
||||||
pScreenPriv->dwRedMask,
|
|
||||||
pScreenPriv->dwGreenMask,
|
|
||||||
pScreenPriv->dwBlueMask))
|
|
||||||
{
|
|
||||||
ErrorF ("winInitVisualsShadowDDNL - fbSetVisualTypesAndMasks "
|
|
||||||
"failed\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
#endif /* XFree86Server */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -34,16 +34,6 @@
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* External symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef XWIN_MULTIWINDOW
|
|
||||||
extern DWORD g_dwCurrentThreadID;
|
|
||||||
#endif
|
|
||||||
extern HWND g_hDlgExit;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local function prototypes
|
* Local function prototypes
|
||||||
*/
|
*/
|
||||||
|
@ -715,7 +705,6 @@ winInitVisualsShadowGDI (ScreenPtr pScreen)
|
||||||
case 24:
|
case 24:
|
||||||
case 16:
|
case 16:
|
||||||
case 15:
|
case 15:
|
||||||
#if defined(XFree86Server)
|
|
||||||
/* Setup the real visual */
|
/* Setup the real visual */
|
||||||
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
||||||
TrueColorMask,
|
TrueColorMask,
|
||||||
|
@ -748,42 +737,9 @@ winInitVisualsShadowGDI (ScreenPtr pScreen)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#else /* XFree86Server */
|
|
||||||
/* Setup the real visual */
|
|
||||||
if (!fbSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
|
||||||
TrueColorMask,
|
|
||||||
pScreenPriv->dwBitsPerRGB,
|
|
||||||
pScreenPriv->dwRedMask,
|
|
||||||
pScreenPriv->dwGreenMask,
|
|
||||||
pScreenPriv->dwBlueMask))
|
|
||||||
{
|
|
||||||
ErrorF ("winInitVisualsShadowGDI - fbSetVisualTypesAndMasks "
|
|
||||||
"failed for TrueColor\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef XWIN_EMULATEPSEUDO
|
|
||||||
if (!pScreenInfo->fEmulatePseudo)
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* Setup a pseudocolor visual */
|
|
||||||
if (!fbSetVisualTypesAndMasks (8,
|
|
||||||
PseudoColorMask,
|
|
||||||
8,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0))
|
|
||||||
{
|
|
||||||
ErrorF ("winInitVisualsShadowGDI - fbSetVisualTypesAndMasks "
|
|
||||||
"failed for PseudoColor\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif /* XFree86Server */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
#if defined(XFree86Server)
|
|
||||||
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
if (!miSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
||||||
PseudoColorMask,
|
PseudoColorMask,
|
||||||
pScreenPriv->dwBitsPerRGB,
|
pScreenPriv->dwBitsPerRGB,
|
||||||
|
@ -796,19 +752,6 @@ winInitVisualsShadowGDI (ScreenPtr pScreen)
|
||||||
"failed\n");
|
"failed\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#else /* XFree86Server */
|
|
||||||
if (!fbSetVisualTypesAndMasks (pScreenInfo->dwDepth,
|
|
||||||
PseudoColorMask,
|
|
||||||
pScreenPriv->dwBitsPerRGB,
|
|
||||||
pScreenPriv->dwRedMask,
|
|
||||||
pScreenPriv->dwGreenMask,
|
|
||||||
pScreenPriv->dwBlueMask))
|
|
||||||
{
|
|
||||||
ErrorF ("winInitVisualsShadowGDI - fbSetVisualTypesAndMasks "
|
|
||||||
"failed\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -35,13 +35,6 @@
|
||||||
#include "winmsg.h"
|
#include "winmsg.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* References to external symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern int g_iNumScreens;
|
|
||||||
extern winScreenInfo * g_ScreenInfo;
|
|
||||||
extern Bool g_fXdmcpEnabled;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -36,16 +36,6 @@
|
||||||
#endif
|
#endif
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* References to external symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern HWND g_hDlgDepthChange;
|
|
||||||
extern HWND g_hDlgExit;
|
|
||||||
extern HWND g_hDlgAbout;
|
|
||||||
|
|
||||||
|
|
||||||
/* See Porting Layer Definition - p. 7 */
|
/* See Porting Layer Definition - p. 7 */
|
||||||
void
|
void
|
||||||
winWakeupHandler (int nScreen,
|
winWakeupHandler (int nScreen,
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
#include <X11/extensions/windowswmstr.h>
|
#include <X11/extensions/windowswmstr.h>
|
||||||
#include "dixevents.h"
|
#include "dixevents.h"
|
||||||
#include "winmultiwindowclass.h"
|
#include "winmultiwindowclass.h"
|
||||||
#include "winprefs.h"
|
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -52,14 +52,6 @@
|
||||||
#define RAISE_ON_CLICK_DEFAULT FALSE
|
#define RAISE_ON_CLICK_DEFAULT FALSE
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Global variables
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern Bool g_fNoConfigureWindow;
|
|
||||||
extern Bool g_fSoftwareCursor;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local globals
|
* Local globals
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -77,10 +77,10 @@ make_box (int x, int y, int w, int h)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcWindowsWMQueryVersion(register ClientPtr client)
|
ProcWindowsWMQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
xWindowsWMQueryVersionReply rep;
|
xWindowsWMQueryVersionReply rep;
|
||||||
register int n;
|
int n;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xWindowsWMQueryVersionReq);
|
REQUEST_SIZE_MATCH(xWindowsWMQueryVersionReq);
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
@ -158,7 +158,7 @@ WMFreeEvents (pointer data, XID id)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcWindowsWMSelectInput (register ClientPtr client)
|
ProcWindowsWMSelectInput (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xWindowsWMSelectInputReq);
|
REQUEST(xWindowsWMSelectInputReq);
|
||||||
WMEventPtr pEvent, pNewEvent, *pHead;
|
WMEventPtr pEvent, pNewEvent, *pHead;
|
||||||
|
@ -298,7 +298,7 @@ winWindowsWMSendEvent (int type, unsigned int mask, int which, int arg,
|
||||||
/* general utility functions */
|
/* general utility functions */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcWindowsWMDisableUpdate (register ClientPtr client)
|
ProcWindowsWMDisableUpdate (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST_SIZE_MATCH(xWindowsWMDisableUpdateReq);
|
REQUEST_SIZE_MATCH(xWindowsWMDisableUpdateReq);
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ ProcWindowsWMDisableUpdate (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcWindowsWMReenableUpdate (register ClientPtr client)
|
ProcWindowsWMReenableUpdate (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST_SIZE_MATCH(xWindowsWMReenableUpdateReq);
|
REQUEST_SIZE_MATCH(xWindowsWMReenableUpdateReq);
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ ProcWindowsWMReenableUpdate (register ClientPtr client)
|
||||||
/* window functions */
|
/* window functions */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcWindowsWMSetFrontProcess (register ClientPtr client)
|
ProcWindowsWMSetFrontProcess (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST_SIZE_MATCH(xWindowsWMSetFrontProcessReq);
|
REQUEST_SIZE_MATCH(xWindowsWMSetFrontProcessReq);
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ ProcWindowsWMSetFrontProcess (register ClientPtr client)
|
||||||
/* frame functions */
|
/* frame functions */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcWindowsWMFrameGetRect (register ClientPtr client)
|
ProcWindowsWMFrameGetRect (ClientPtr client)
|
||||||
{
|
{
|
||||||
xWindowsWMFrameGetRectReply rep;
|
xWindowsWMFrameGetRectReply rep;
|
||||||
BoxRec ir;
|
BoxRec ir;
|
||||||
|
@ -388,7 +388,7 @@ ProcWindowsWMFrameGetRect (register ClientPtr client)
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcWindowsWMFrameDraw (register ClientPtr client)
|
ProcWindowsWMFrameDraw (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xWindowsWMFrameDrawReq);
|
REQUEST(xWindowsWMFrameDrawReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
@ -478,12 +478,10 @@ ProcWindowsWMFrameDraw (register ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcWindowsWMFrameSetTitle(
|
ProcWindowsWMFrameSetTitle(ClientPtr client)
|
||||||
register ClientPtr client
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
unsigned int title_length, title_max;
|
unsigned int title_length, title_max;
|
||||||
unsigned char *title_bytes;
|
char *title_bytes;
|
||||||
REQUEST(xWindowsWMFrameSetTitleReq);
|
REQUEST(xWindowsWMFrameSetTitleReq);
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
win32RootlessWindowPtr pRLWinPriv;
|
win32RootlessWindowPtr pRLWinPriv;
|
||||||
|
@ -540,7 +538,7 @@ ProcWindowsWMFrameSetTitle(
|
||||||
/* dispatch */
|
/* dispatch */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcWindowsWMDispatch (register ClientPtr client)
|
ProcWindowsWMDispatch (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
|
||||||
|
@ -586,16 +584,16 @@ SNotifyEvent (xWindowsWMNotifyEvent *from, xWindowsWMNotifyEvent *to)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcWindowsWMQueryVersion (register ClientPtr client)
|
SProcWindowsWMQueryVersion (ClientPtr client)
|
||||||
{
|
{
|
||||||
register int n;
|
int n;
|
||||||
REQUEST(xWindowsWMQueryVersionReq);
|
REQUEST(xWindowsWMQueryVersionReq);
|
||||||
swaps(&stuff->length, n);
|
swaps(&stuff->length, n);
|
||||||
return ProcWindowsWMQueryVersion(client);
|
return ProcWindowsWMQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SProcWindowsWMDispatch (register ClientPtr client)
|
SProcWindowsWMDispatch (ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
|
|
||||||
|
|
|
@ -50,18 +50,6 @@ Bool g_fCursor = TRUE;
|
||||||
Bool g_fButton[3] = { FALSE, FALSE, FALSE };
|
Bool g_fButton[3] = { FALSE, FALSE, FALSE };
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* References to external symbols
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern Bool g_fClipboard;
|
|
||||||
extern HWND g_hDlgDepthChange;
|
|
||||||
extern Bool g_fKeyboardHookLL;
|
|
||||||
extern HWND g_hwndKeyboardFocus;
|
|
||||||
extern Bool g_fSoftwareCursor;
|
|
||||||
extern DWORD g_dwCurrentThreadID;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called by winWakeupHandler
|
* Called by winWakeupHandler
|
||||||
* Processes current Windows message
|
* Processes current Windows message
|
||||||
|
@ -964,9 +952,6 @@ winWindowProc (HWND hwnd, UINT message,
|
||||||
if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
|
if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Save handle of our main window that last received focus */
|
|
||||||
g_hwndKeyboardFocus = hwnd;
|
|
||||||
|
|
||||||
/* Restore the state of all mode keys */
|
/* Restore the state of all mode keys */
|
||||||
winRestoreModeKeyStates ();
|
winRestoreModeKeyStates ();
|
||||||
|
|
||||||
|
@ -979,9 +964,6 @@ winWindowProc (HWND hwnd, UINT message,
|
||||||
if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
|
if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Clear handle of our main window that last received focus */
|
|
||||||
g_hwndKeyboardFocus = NULL;
|
|
||||||
|
|
||||||
/* Release any pressed keys */
|
/* Release any pressed keys */
|
||||||
winKeybdReleaseKeys ();
|
winKeybdReleaseKeys ();
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ struct _DeviceEvent
|
||||||
struct {
|
struct {
|
||||||
uint8_t mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */
|
uint8_t mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */
|
||||||
uint8_t mode[(MAX_VALUATORS + 7)/8]; /**< Valuator mode (Abs or Rel)*/
|
uint8_t mode[(MAX_VALUATORS + 7)/8]; /**< Valuator mode (Abs or Rel)*/
|
||||||
uint32_t data[MAX_VALUATORS]; /**< Valuator data */
|
int32_t data[MAX_VALUATORS]; /**< Valuator data */
|
||||||
int32_t data_frac[MAX_VALUATORS]; /**< Fractional part for data */
|
int32_t data_frac[MAX_VALUATORS]; /**< Fractional part for data */
|
||||||
} valuators;
|
} valuators;
|
||||||
struct {
|
struct {
|
||||||
|
|
|
@ -215,7 +215,7 @@ void miAppendSpans(SpanGroup *spanGroup, SpanGroup *otherGroup, Spans *spans)
|
||||||
|
|
||||||
void miFreeSpanGroup(SpanGroup *spanGroup)
|
void miFreeSpanGroup(SpanGroup *spanGroup)
|
||||||
{
|
{
|
||||||
if (spanGroup->group != NULL) free(spanGroup->group);
|
free(spanGroup->group);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void QuickSortSpansX(
|
static void QuickSortSpansX(
|
||||||
|
|
|
@ -403,7 +403,7 @@ miPolyBuildPoly (
|
||||||
i = top;
|
i = top;
|
||||||
j = StepAround (top, -1, count);
|
j = StepAround (top, -1, count);
|
||||||
|
|
||||||
if (slopes[j].dy * slopes[i].dx > slopes[i].dy * slopes[j].dx)
|
if ((int64_t)slopes[j].dy * slopes[i].dx > (int64_t)slopes[i].dy * slopes[j].dx)
|
||||||
{
|
{
|
||||||
clockwise = -1;
|
clockwise = -1;
|
||||||
slopeoff = -1;
|
slopeoff = -1;
|
||||||
|
|
|
@ -92,8 +92,7 @@ RootlessUpdateScreenPixmap(ScreenPtr pScreen)
|
||||||
rowbytes = PixmapBytePad(pScreen->width, pScreen->rootDepth);
|
rowbytes = PixmapBytePad(pScreen->width, pScreen->rootDepth);
|
||||||
|
|
||||||
if (s->pixmap_data_size < rowbytes) {
|
if (s->pixmap_data_size < rowbytes) {
|
||||||
if (s->pixmap_data != NULL)
|
free(s->pixmap_data);
|
||||||
free(s->pixmap_data);
|
|
||||||
|
|
||||||
s->pixmap_data_size = rowbytes;
|
s->pixmap_data_size = rowbytes;
|
||||||
s->pixmap_data = malloc(s->pixmap_data_size);
|
s->pixmap_data = malloc(s->pixmap_data_size);
|
||||||
|
|
|
@ -1140,10 +1140,8 @@ FinishFrameResize(WindowPtr pWin, Bool gravity, int oldX, int oldY,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gResizeDeathBits != NULL) {
|
free(gResizeDeathBits);
|
||||||
free(gResizeDeathBits);
|
gResizeDeathBits = NULL;
|
||||||
gResizeDeathBits = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gravity) {
|
if (gravity) {
|
||||||
pScreen->CopyWindow = gResizeOldCopyWindowProc;
|
pScreen->CopyWindow = gResizeOldCopyWindowProc;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue