mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-06-11 10:48:25 +02:00
Compare commits
92 commits
master
...
xorg-serve
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10c42f5752 | ||
|
|
8039b6b7a3 | ||
|
|
87d7e3e352 | ||
|
|
b1c01839d8 | ||
|
|
4bd8e9ecc3 | ||
|
|
eec5eb2f09 | ||
|
|
f7ac913019 | ||
|
|
4d98c7da78 | ||
|
|
412c4abbae | ||
|
|
e604b19fc5 | ||
|
|
e7b4b83679 | ||
|
|
29a0c87f4d | ||
|
|
d8a09a4b15 | ||
|
|
79f5430ba6 | ||
|
|
fa6cbd099f | ||
|
|
63f928a9d7 | ||
|
|
bc4c3158ba | ||
|
|
b3b7be7d49 | ||
|
|
c260ae1a0c | ||
|
|
b6c59f73d2 | ||
|
|
1c7c7d407e | ||
|
|
e2f4be5ba5 | ||
|
|
a2d9bade38 | ||
|
|
3ffa491426 | ||
|
|
100027127c | ||
|
|
dc1c70f299 | ||
|
|
310ac85080 | ||
|
|
d07dfb11c2 | ||
|
|
f7f566f9e3 | ||
|
|
da0c913da8 | ||
|
|
4cdd3bfc00 | ||
|
|
7b5b7b1467 | ||
|
|
66299cb7b8 | ||
|
|
7c859fd5d1 | ||
|
|
df12c4daa7 | ||
|
|
5272f71cf8 | ||
|
|
041ab46aba | ||
|
|
c201d00014 | ||
|
|
de0ea3544f | ||
|
|
5ed2523f4d | ||
|
|
956700d14d | ||
|
|
39157fd240 | ||
|
|
e162667433 | ||
|
|
b72ffcf6ae | ||
|
|
d5142c4e9d | ||
|
|
7800cf99f5 | ||
|
|
c15bdf3163 | ||
|
|
3a8c618a73 | ||
|
|
95780608df | ||
|
|
a6d89f30dd | ||
|
|
65642ccb78 | ||
|
|
e348e4afc5 | ||
|
|
34fb39a960 | ||
|
|
06e2ecd0df | ||
|
|
92ecbf5f0f | ||
|
|
ede07c1af3 | ||
|
|
e2369dd404 | ||
|
|
79220f4390 | ||
|
|
521f3fb566 | ||
|
|
73bd33b4d4 | ||
|
|
2def985466 | ||
|
|
4a957c9e81 | ||
|
|
d71a17cfab | ||
|
|
72ef659874 | ||
|
|
a2748aa6bd | ||
|
|
c0e68f8e70 | ||
|
|
395c9e1708 | ||
|
|
7914986fb8 | ||
|
|
1a4ec493bf | ||
|
|
2f99b38747 | ||
|
|
10d9cd36b4 | ||
|
|
835737244f | ||
|
|
a3f11d2f60 | ||
|
|
11319a9225 | ||
|
|
9ddc6ad9d0 | ||
|
|
36f9c2d1dd | ||
|
|
b3d25d8d65 | ||
|
|
b87edf1acc | ||
|
|
1e8c960f87 | ||
|
|
c7c0755891 | ||
|
|
39ebf87be7 | ||
|
|
5a612aa44d | ||
|
|
0456d56092 | ||
|
|
018248136a | ||
|
|
d46af34732 | ||
|
|
cdd7413bbe | ||
|
|
8f39a6b0b3 | ||
|
|
bea56fc9c4 | ||
|
|
f9709b8a63 | ||
|
|
f5fad30822 | ||
|
|
aacfc321b4 | ||
|
|
e31e272f4f |
60 changed files with 562 additions and 263 deletions
|
|
@ -393,6 +393,8 @@ ScreenSaverFreeSuspend(pointer value, XID id)
|
||||||
UpdateCurrentTimeIf();
|
UpdateCurrentTimeIf();
|
||||||
nt_list_for_each_entry(dev, inputInfo.devices, next)
|
nt_list_for_each_entry(dev, inputInfo.devices, next)
|
||||||
lastDeviceEventTime[dev->id] = currentTime;
|
lastDeviceEventTime[dev->id] = currentTime;
|
||||||
|
lastDeviceEventTime[XIAllDevices] = currentTime;
|
||||||
|
lastDeviceEventTime[XIAllMasterDevices] = currentTime;
|
||||||
SetScreenSaverTimer();
|
SetScreenSaverTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
110
Xi/exevents.c
110
Xi/exevents.c
|
|
@ -949,8 +949,6 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent *event)
|
||||||
|
|
||||||
if (!(event->flags & TOUCH_POINTER_EMULATED))
|
if (!(event->flags & TOUCH_POINTER_EMULATED))
|
||||||
return DONT_PROCESS;
|
return DONT_PROCESS;
|
||||||
if (!(event->flags & TOUCH_END))
|
|
||||||
return DONT_PROCESS;
|
|
||||||
|
|
||||||
DecreaseButtonCount(device, key, &t->buttonsDown, &t->motionMask,
|
DecreaseButtonCount(device, key, &t->buttonsDown, &t->motionMask,
|
||||||
&t->state);
|
&t->state);
|
||||||
|
|
@ -1199,7 +1197,6 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
|
||||||
TouchOwnershipEvent *ev)
|
TouchOwnershipEvent *ev)
|
||||||
{
|
{
|
||||||
Bool was_owner = (resource == ti->listeners[0].listener);
|
Bool was_owner = (resource == ti->listeners[0].listener);
|
||||||
void *grab;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Send a TouchEnd event to the resource being removed, but only if they
|
/* Send a TouchEnd event to the resource being removed, but only if they
|
||||||
|
|
@ -1214,11 +1211,7 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
|
||||||
|
|
||||||
/* Remove the resource from the listener list, updating
|
/* Remove the resource from the listener list, updating
|
||||||
* ti->num_listeners, as well as ti->num_grabs if it was a grab. */
|
* ti->num_listeners, as well as ti->num_grabs if it was a grab. */
|
||||||
if (TouchRemoveListener(ti, resource)) {
|
TouchRemoveListener(ti, resource);
|
||||||
if (dixLookupResourceByType(&grab, resource, RT_PASSIVEGRAB,
|
|
||||||
serverClient, DixGetAttrAccess) == Success)
|
|
||||||
ti->num_grabs--;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If the current owner was removed and there are further listeners, deliver
|
/* If the current owner was removed and there are further listeners, deliver
|
||||||
* the TouchOwnership or TouchBegin event to the new owner. */
|
* the TouchOwnership or TouchBegin event to the new owner. */
|
||||||
|
|
@ -1312,34 +1305,19 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
|
|
||||||
if (listener->type == LISTENER_GRAB ||
|
if (listener->type == LISTENER_GRAB ||
|
||||||
listener->type == LISTENER_POINTER_GRAB) {
|
listener->type == LISTENER_POINTER_GRAB) {
|
||||||
rc = dixLookupResourceByType((pointer *) grab, listener->listener,
|
|
||||||
RT_PASSIVEGRAB,
|
|
||||||
serverClient, DixSendAccess);
|
|
||||||
if (rc != Success) {
|
|
||||||
/* the grab doesn't exist but we have a grabbing listener - this
|
|
||||||
* is an implicit/active grab */
|
|
||||||
rc = dixLookupClient(client, listener->listener, serverClient,
|
|
||||||
DixSendAccess);
|
|
||||||
if (rc != Success)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
*grab = dev->deviceGrab.grab;
|
*grab = listener->grab;
|
||||||
if (!*grab)
|
|
||||||
return FALSE;
|
BUG_RETURN_VAL(!*grab, FALSE);
|
||||||
}
|
|
||||||
|
|
||||||
*client = rClient(*grab);
|
*client = rClient(*grab);
|
||||||
*win = (*grab)->window;
|
*win = (*grab)->window;
|
||||||
*mask = (*grab)->xi2mask;
|
*mask = (*grab)->xi2mask;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (listener->level == CORE)
|
rc = dixLookupResourceByType((pointer *) win, listener->listener,
|
||||||
rc = dixLookupWindow(win, listener->listener,
|
listener->resource_type,
|
||||||
serverClient, DixSendAccess);
|
serverClient, DixSendAccess);
|
||||||
else
|
|
||||||
rc = dixLookupResourceByType((pointer *) win, listener->listener,
|
|
||||||
RT_INPUTCLIENT,
|
|
||||||
serverClient, DixSendAccess);
|
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
@ -1479,6 +1457,8 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
*/
|
*/
|
||||||
l = &ti->listeners[ti->num_listeners - 1];
|
l = &ti->listeners[ti->num_listeners - 1];
|
||||||
l->listener = devgrab->resource;
|
l->listener = devgrab->resource;
|
||||||
|
l->grab = devgrab;
|
||||||
|
//l->resource_type = RT_NONE;
|
||||||
|
|
||||||
if (devgrab->grabtype != XI2 || devgrab->type != XI_TouchBegin)
|
if (devgrab->grabtype != XI2 || devgrab->type != XI_TouchBegin)
|
||||||
l->type = LISTENER_POINTER_GRAB;
|
l->type = LISTENER_POINTER_GRAB;
|
||||||
|
|
@ -1561,6 +1541,7 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
||||||
uint32_t touchid;
|
uint32_t touchid;
|
||||||
int type = ev->any.type;
|
int type = ev->any.type;
|
||||||
int emulate_pointer = ! !(ev->device_event.flags & TOUCH_POINTER_EMULATED);
|
int emulate_pointer = ! !(ev->device_event.flags & TOUCH_POINTER_EMULATED);
|
||||||
|
DeviceIntPtr kbd;
|
||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
return;
|
return;
|
||||||
|
|
@ -1570,9 +1551,6 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
||||||
else
|
else
|
||||||
touchid = ev->device_event.touchid;
|
touchid = ev->device_event.touchid;
|
||||||
|
|
||||||
if (emulate_pointer)
|
|
||||||
UpdateDeviceState(dev, &ev->device_event);
|
|
||||||
|
|
||||||
if (type == ET_TouchBegin) {
|
if (type == ET_TouchBegin) {
|
||||||
ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid,
|
ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid,
|
||||||
emulate_pointer);
|
emulate_pointer);
|
||||||
|
|
@ -1580,32 +1558,41 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
||||||
else
|
else
|
||||||
ti = TouchFindByClientID(dev, touchid);
|
ti = TouchFindByClientID(dev, touchid);
|
||||||
|
|
||||||
/* Under the following circumstances we create a new touch record for an
|
/* Active pointer grab */
|
||||||
* existing touch:
|
if (emulate_pointer && dev->deviceGrab.grab && !dev->deviceGrab.fromPassiveGrab &&
|
||||||
*
|
|
||||||
* - The touch may be pointer emulated
|
|
||||||
* - An explicit grab is active on the device
|
|
||||||
* - The grab is a pointer grab
|
|
||||||
*
|
|
||||||
* This allows for an explicit grab to receive pointer events for an already
|
|
||||||
* active touch.
|
|
||||||
*/
|
|
||||||
if (!ti && type != ET_TouchBegin && emulate_pointer &&
|
|
||||||
dev->deviceGrab.grab && !dev->deviceGrab.fromPassiveGrab &&
|
|
||||||
(dev->deviceGrab.grab->grabtype == CORE ||
|
(dev->deviceGrab.grab->grabtype == CORE ||
|
||||||
dev->deviceGrab.grab->grabtype == XI ||
|
dev->deviceGrab.grab->grabtype == XI ||
|
||||||
!xi2mask_isset(dev->deviceGrab.grab->xi2mask, dev, XI_TouchBegin))) {
|
!xi2mask_isset(dev->deviceGrab.grab->xi2mask, dev, XI_TouchBegin)))
|
||||||
ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid,
|
{
|
||||||
emulate_pointer);
|
/* Active pointer grab on touch point and we get a TouchEnd - claim this
|
||||||
if (!ti) {
|
* touchpoint accepted, otherwise clients waiting for ownership will
|
||||||
DebugF("[Xi] %s: Failed to create new dix record for explicitly "
|
* wait on this touchpoint until this client ungrabs, or the cows come
|
||||||
"grabbed touchpoint %d\n",
|
* home, whichever is earlier */
|
||||||
dev->name, type, touchid);
|
if (ti && type == ET_TouchEnd)
|
||||||
return;
|
TouchListenerAcceptReject(dev, ti, 0, XIAcceptTouch);
|
||||||
}
|
else if (!ti && type != ET_TouchBegin) {
|
||||||
|
/* Under the following circumstances we create a new touch record for an
|
||||||
|
* existing touch:
|
||||||
|
*
|
||||||
|
* - The touch may be pointer emulated
|
||||||
|
* - An explicit grab is active on the device
|
||||||
|
* - The grab is a pointer grab
|
||||||
|
*
|
||||||
|
* This allows for an explicit grab to receive pointer events for an already
|
||||||
|
* active touch.
|
||||||
|
*/
|
||||||
|
ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid,
|
||||||
|
emulate_pointer);
|
||||||
|
if (!ti) {
|
||||||
|
DebugF("[Xi] %s: Failed to create new dix record for explicitly "
|
||||||
|
"grabbed touchpoint %d\n",
|
||||||
|
dev->name, touchid);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TouchBuildSprite(dev, ti, ev);
|
TouchBuildSprite(dev, ti, ev);
|
||||||
TouchSetupListeners(dev, ti, ev);
|
TouchSetupListeners(dev, ti, ev);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ti) {
|
if (!ti) {
|
||||||
|
|
@ -1619,9 +1606,14 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
||||||
* events which _only_ emulate motion just work normally */
|
* events which _only_ emulate motion just work normally */
|
||||||
if (emulate_pointer && ev->any.type != ET_TouchUpdate)
|
if (emulate_pointer && ev->any.type != ET_TouchUpdate)
|
||||||
DeliverEmulatedMotionEvent(dev, ti, ev);
|
DeliverEmulatedMotionEvent(dev, ti, ev);
|
||||||
|
|
||||||
if (emulate_pointer && IsMaster(dev))
|
if (emulate_pointer && IsMaster(dev))
|
||||||
CheckMotion(&ev->device_event, dev);
|
CheckMotion(&ev->device_event, dev);
|
||||||
|
|
||||||
|
kbd = GetMaster(dev, KEYBOARD_OR_FLOAT);
|
||||||
|
event_set_state(NULL, kbd, &ev->device_event);
|
||||||
|
ev->device_event.corestate = event_get_corestate(NULL, kbd);
|
||||||
|
|
||||||
/* Make sure we have a valid window trace for event delivery; must be
|
/* Make sure we have a valid window trace for event delivery; must be
|
||||||
* called after event type mutation. Touch end events are always processed
|
* called after event type mutation. Touch end events are always processed
|
||||||
* in order to end touch records. */
|
* in order to end touch records. */
|
||||||
|
|
@ -1643,6 +1635,9 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
||||||
if (ev->any.type == ET_TouchEnd)
|
if (ev->any.type == ET_TouchEnd)
|
||||||
TouchEndTouch(dev, ti);
|
TouchEndTouch(dev, ti);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (emulate_pointer)
|
||||||
|
UpdateDeviceState(dev, &ev->device_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1864,6 +1859,11 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (listener->state == LISTENER_AWAITING_BEGIN) {
|
||||||
|
listener->state = LISTENER_HAS_END;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
/* Event in response to reject */
|
/* Event in response to reject */
|
||||||
if (ev->device_event.flags & TOUCH_REJECT) {
|
if (ev->device_event.flags & TOUCH_REJECT) {
|
||||||
if (listener->state != LISTENER_HAS_END)
|
if (listener->state != LISTENER_HAS_END)
|
||||||
|
|
|
||||||
|
|
@ -304,15 +304,16 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo * r, int flags[MAXDEVICES])
|
||||||
flags[keybd->id] |= XIDeviceDisabled;
|
flags[keybd->id] |= XIDeviceDisabled;
|
||||||
flags[ptr->id] |= XIDeviceDisabled;
|
flags[ptr->id] |= XIDeviceDisabled;
|
||||||
|
|
||||||
RemoveDevice(XTestptr, FALSE);
|
|
||||||
RemoveDevice(XTestkeybd, FALSE);
|
|
||||||
RemoveDevice(keybd, FALSE);
|
|
||||||
RemoveDevice(ptr, FALSE);
|
|
||||||
flags[XTestptr->id] |= XISlaveRemoved;
|
flags[XTestptr->id] |= XISlaveRemoved;
|
||||||
flags[XTestkeybd->id] |= XISlaveRemoved;
|
flags[XTestkeybd->id] |= XISlaveRemoved;
|
||||||
flags[keybd->id] |= XIMasterRemoved;
|
flags[keybd->id] |= XIMasterRemoved;
|
||||||
flags[ptr->id] |= XIMasterRemoved;
|
flags[ptr->id] |= XIMasterRemoved;
|
||||||
|
|
||||||
|
RemoveDevice(XTestptr, FALSE);
|
||||||
|
RemoveDevice(XTestkeybd, FALSE);
|
||||||
|
RemoveDevice(keybd, FALSE);
|
||||||
|
RemoveDevice(ptr, FALSE);
|
||||||
|
|
||||||
unwind:
|
unwind:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ int
|
||||||
SProcXIPassiveGrabDevice(ClientPtr client)
|
SProcXIPassiveGrabDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
xXIModifierInfo *mods;
|
uint32_t *mods;
|
||||||
|
|
||||||
REQUEST(xXIPassiveGrabDeviceReq);
|
REQUEST(xXIPassiveGrabDeviceReq);
|
||||||
|
|
||||||
|
|
@ -63,12 +63,10 @@ SProcXIPassiveGrabDevice(ClientPtr client)
|
||||||
swaps(&stuff->mask_len);
|
swaps(&stuff->mask_len);
|
||||||
swaps(&stuff->num_modifiers);
|
swaps(&stuff->num_modifiers);
|
||||||
|
|
||||||
mods = (xXIModifierInfo *) &stuff[1];
|
mods = (uint32_t *) &stuff[1];
|
||||||
|
|
||||||
for (i = 0; i < stuff->num_modifiers; i++, mods++) {
|
for (i = 0; i < stuff->num_modifiers; i++, mods++) {
|
||||||
swapl(&mods->base_mods);
|
swapl(mods);
|
||||||
swapl(&mods->latched_mods);
|
|
||||||
swapl(&mods->locked_mods);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ProcXIPassiveGrabDevice(client);
|
return ProcXIPassiveGrabDevice(client);
|
||||||
|
|
|
||||||
|
|
@ -180,8 +180,13 @@ ProcXISelectEvents(ClientPtr client)
|
||||||
if (CLIENT_ID(iclient->resource) == client->index)
|
if (CLIENT_ID(iclient->resource) == client->index)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
dixLookupDevice(&tmp, evmask->deviceid, serverClient,
|
if (evmask->deviceid == XIAllDevices)
|
||||||
DixReadAccess);
|
tmp = inputInfo.all_devices;
|
||||||
|
else if (evmask->deviceid == XIAllMasterDevices)
|
||||||
|
tmp = inputInfo.all_master_devices;
|
||||||
|
else
|
||||||
|
dixLookupDevice(&tmp, evmask->deviceid, serverClient,
|
||||||
|
DixReadAccess);
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
return BadImplementation; /* this shouldn't happen */
|
return BadImplementation; /* this shouldn't happen */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -300,9 +300,15 @@ wakeup_handler(pointer data, int err, pointer read_mask)
|
||||||
return;
|
return;
|
||||||
action = udev_device_get_action(udev_device);
|
action = udev_device_get_action(udev_device);
|
||||||
if (action) {
|
if (action) {
|
||||||
if (!strcmp(action, "add") || !strcmp(action, "change")) {
|
if (!strcmp(action, "add")) {
|
||||||
device_removed(udev_device);
|
device_removed(udev_device);
|
||||||
device_added(udev_device);
|
device_added(udev_device);
|
||||||
|
} else if (!strcmp(action, "change")) {
|
||||||
|
/* ignore change for the drm devices */
|
||||||
|
if (strcmp(udev_device_get_subsystem(udev_device), "drm")) {
|
||||||
|
device_removed(udev_device);
|
||||||
|
device_added(udev_device);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!strcmp(action, "remove"))
|
else if (!strcmp(action, "remove"))
|
||||||
device_removed(udev_device);
|
device_removed(udev_device);
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,9 @@ dnl
|
||||||
dnl Process this file with autoconf to create configure.
|
dnl Process this file with autoconf to create configure.
|
||||||
|
|
||||||
AC_PREREQ(2.60)
|
AC_PREREQ(2.60)
|
||||||
AC_INIT([xorg-server], 1.13.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
|
AC_INIT([xorg-server], 1.13.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
|
||||||
RELEASE_DATE="2012-09-05"
|
RELEASE_DATE="2013-04-17"
|
||||||
RELEASE_NAME="Iced Tea"
|
RELEASE_NAME="Pokey Stick"
|
||||||
AC_CONFIG_SRCDIR([Makefile.am])
|
AC_CONFIG_SRCDIR([Makefile.am])
|
||||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
|
||||||
|
|
@ -306,6 +306,9 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
|
||||||
/* unity matrix */
|
/* unity matrix */
|
||||||
memset(transform, 0, sizeof(transform));
|
memset(transform, 0, sizeof(transform));
|
||||||
transform[0] = transform[4] = transform[8] = 1.0f;
|
transform[0] = transform[4] = transform[8] = 1.0f;
|
||||||
|
dev->transform.m[0][0] = 1.0;
|
||||||
|
dev->transform.m[1][1] = 1.0;
|
||||||
|
dev->transform.m[2][2] = 1.0;
|
||||||
|
|
||||||
XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_TRANSFORM),
|
XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_TRANSFORM),
|
||||||
XIGetKnownProperty(XATOM_FLOAT), 32,
|
XIGetKnownProperty(XATOM_FLOAT), 32,
|
||||||
|
|
@ -440,6 +443,7 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
|
||||||
if (*prev != dev)
|
if (*prev != dev)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
TouchEndPhysicallyActiveTouches(dev);
|
||||||
ReleaseButtonsAndKeys(dev);
|
ReleaseButtonsAndKeys(dev);
|
||||||
SyncRemoveDeviceIdleTime(dev->idle_counter);
|
SyncRemoveDeviceIdleTime(dev->idle_counter);
|
||||||
dev->idle_counter = NULL;
|
dev->idle_counter = NULL;
|
||||||
|
|
@ -510,6 +514,12 @@ DisableAllDevices(void)
|
||||||
{
|
{
|
||||||
DeviceIntPtr dev, tmp;
|
DeviceIntPtr dev, tmp;
|
||||||
|
|
||||||
|
/* Disable slave devices first, excluding XTest devices */
|
||||||
|
nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) {
|
||||||
|
if (!IsXTestDevice(dev, NULL) && !IsMaster(dev))
|
||||||
|
DisableDevice(dev, FALSE);
|
||||||
|
}
|
||||||
|
/* Disable XTest devices */
|
||||||
nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) {
|
nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) {
|
||||||
if (!IsMaster(dev))
|
if (!IsMaster(dev))
|
||||||
DisableDevice(dev, FALSE);
|
DisableDevice(dev, FALSE);
|
||||||
|
|
|
||||||
68
dix/events.c
68
dix/events.c
|
|
@ -1435,6 +1435,7 @@ UpdateTouchesForGrab(DeviceIntPtr mouse)
|
||||||
ti->listeners[0].type = LISTENER_POINTER_GRAB;
|
ti->listeners[0].type = LISTENER_POINTER_GRAB;
|
||||||
else
|
else
|
||||||
ti->listeners[0].type = LISTENER_GRAB;
|
ti->listeners[0].type = LISTENER_GRAB;
|
||||||
|
ti->listeners[0].grab = grab;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1503,11 +1504,27 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
|
||||||
{
|
{
|
||||||
GrabPtr grab = mouse->deviceGrab.grab;
|
GrabPtr grab = mouse->deviceGrab.grab;
|
||||||
DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
|
Bool wasPassive = mouse->deviceGrab.fromPassiveGrab;
|
||||||
Bool wasImplicit = (mouse->deviceGrab.fromPassiveGrab &&
|
Bool wasImplicit = (mouse->deviceGrab.fromPassiveGrab &&
|
||||||
mouse->deviceGrab.implicitGrab);
|
mouse->deviceGrab.implicitGrab);
|
||||||
XID grab_resource = grab->resource;
|
XID grab_resource = grab->resource;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/* If an explicit grab was deactivated, we must remove it from the head of
|
||||||
|
* all the touches' listener lists. */
|
||||||
|
for (i = 0; !wasPassive && mouse->touch && i < mouse->touch->num_touches; i++) {
|
||||||
|
TouchPointInfoPtr ti = mouse->touch->touches + i;
|
||||||
|
if (ti->active && TouchResourceIsOwner(ti, grab_resource)) {
|
||||||
|
/* Rejecting will generate a TouchEnd, but we must not
|
||||||
|
emulate a ButtonRelease here. So pretend the listener
|
||||||
|
already has the end event */
|
||||||
|
if (grab->grabtype == CORE || grab->grabtype == XI ||
|
||||||
|
!xi2mask_isset(mouse->deviceGrab.grab->xi2mask, mouse, XI_TouchBegin))
|
||||||
|
ti->listeners[0].state = LISTENER_HAS_END;
|
||||||
|
TouchListenerAcceptReject(mouse, ti, 0, XIRejectTouch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TouchRemovePointerGrab(mouse);
|
TouchRemovePointerGrab(mouse);
|
||||||
|
|
||||||
mouse->valuator->motionHintWindow = NullWindow;
|
mouse->valuator->motionHintWindow = NullWindow;
|
||||||
|
|
@ -1531,15 +1548,6 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
|
||||||
ReattachToOldMaster(mouse);
|
ReattachToOldMaster(mouse);
|
||||||
|
|
||||||
ComputeFreezes();
|
ComputeFreezes();
|
||||||
|
|
||||||
/* If an explicit grab was deactivated, we must remove it from the head of
|
|
||||||
* all the touches' listener lists. */
|
|
||||||
for (i = 0; mouse->touch && i < mouse->touch->num_touches; i++) {
|
|
||||||
TouchPointInfoPtr ti = mouse->touch->touches + i;
|
|
||||||
|
|
||||||
if (ti->active && TouchResourceIsOwner(ti, grab_resource))
|
|
||||||
TouchListenerAcceptReject(mouse, ti, 0, XIRejectTouch);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1555,11 +1563,13 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time,
|
||||||
WindowPtr oldWin;
|
WindowPtr oldWin;
|
||||||
|
|
||||||
/* slave devices need to float for the duration of the grab. */
|
/* slave devices need to float for the duration of the grab. */
|
||||||
if (grab->grabtype == XI2 &&
|
if (grab->grabtype == XI2 && keybd->enabled &&
|
||||||
!(passive & ImplicitGrabMask) && !IsMaster(keybd))
|
!(passive & ImplicitGrabMask) && !IsMaster(keybd))
|
||||||
DetachFromMaster(keybd);
|
DetachFromMaster(keybd);
|
||||||
|
|
||||||
if (grabinfo->grab)
|
if (!keybd->enabled)
|
||||||
|
oldWin = NULL;
|
||||||
|
else if (grabinfo->grab)
|
||||||
oldWin = grabinfo->grab->window;
|
oldWin = grabinfo->grab->window;
|
||||||
else if (keybd->focus)
|
else if (keybd->focus)
|
||||||
oldWin = keybd->focus->win;
|
oldWin = keybd->focus->win;
|
||||||
|
|
@ -1569,7 +1579,8 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time,
|
||||||
oldWin = keybd->focus->win;
|
oldWin = keybd->focus->win;
|
||||||
if (keybd->valuator)
|
if (keybd->valuator)
|
||||||
keybd->valuator->motionHintWindow = NullWindow;
|
keybd->valuator->motionHintWindow = NullWindow;
|
||||||
DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab);
|
if (oldWin)
|
||||||
|
DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab);
|
||||||
if (syncEvents.playingEvents)
|
if (syncEvents.playingEvents)
|
||||||
grabinfo->grabTime = syncEvents.time;
|
grabinfo->grabTime = syncEvents.time;
|
||||||
else
|
else
|
||||||
|
|
@ -1590,13 +1601,10 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd)
|
||||||
{
|
{
|
||||||
GrabPtr grab = keybd->deviceGrab.grab;
|
GrabPtr grab = keybd->deviceGrab.grab;
|
||||||
DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
WindowPtr focusWin = keybd->focus ? keybd->focus->win
|
WindowPtr focusWin;
|
||||||
: keybd->spriteInfo->sprite->win;
|
|
||||||
Bool wasImplicit = (keybd->deviceGrab.fromPassiveGrab &&
|
Bool wasImplicit = (keybd->deviceGrab.fromPassiveGrab &&
|
||||||
keybd->deviceGrab.implicitGrab);
|
keybd->deviceGrab.implicitGrab);
|
||||||
|
|
||||||
if (focusWin == FollowKeyboardWin)
|
|
||||||
focusWin = inputInfo.keyboard->focus->win;
|
|
||||||
if (keybd->valuator)
|
if (keybd->valuator)
|
||||||
keybd->valuator->motionHintWindow = NullWindow;
|
keybd->valuator->motionHintWindow = NullWindow;
|
||||||
keybd->deviceGrab.grab = NullGrab;
|
keybd->deviceGrab.grab = NullGrab;
|
||||||
|
|
@ -1607,6 +1615,17 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd)
|
||||||
if (dev->deviceGrab.sync.other == grab)
|
if (dev->deviceGrab.sync.other == grab)
|
||||||
dev->deviceGrab.sync.other = NullGrab;
|
dev->deviceGrab.sync.other = NullGrab;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (keybd->focus)
|
||||||
|
focusWin = keybd->focus->win;
|
||||||
|
else if (keybd->spriteInfo->sprite)
|
||||||
|
focusWin = keybd->spriteInfo->sprite->win;
|
||||||
|
else
|
||||||
|
focusWin = NullWindow;
|
||||||
|
|
||||||
|
if (focusWin == FollowKeyboardWin)
|
||||||
|
focusWin = inputInfo.keyboard->focus->win;
|
||||||
|
|
||||||
DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab);
|
DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab);
|
||||||
|
|
||||||
if (!wasImplicit && grab->grabtype == XI2)
|
if (!wasImplicit && grab->grabtype == XI2)
|
||||||
|
|
@ -2213,7 +2232,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
|
||||||
* @return TRUE if the event should be discarded, FALSE otherwise.
|
* @return TRUE if the event should be discarded, FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
static BOOL
|
static BOOL
|
||||||
FilterRawEvents(const ClientPtr client, const GrabPtr grab)
|
FilterRawEvents(const ClientPtr client, const GrabPtr grab, WindowPtr root)
|
||||||
{
|
{
|
||||||
XIClientPtr client_xi_version;
|
XIClientPtr client_xi_version;
|
||||||
int cmp;
|
int cmp;
|
||||||
|
|
@ -2229,7 +2248,10 @@ FilterRawEvents(const ClientPtr client, const GrabPtr grab)
|
||||||
client_xi_version->minor_version, 2, 0);
|
client_xi_version->minor_version, 2, 0);
|
||||||
/* XI 2.0: if device is grabbed, skip
|
/* XI 2.0: if device is grabbed, skip
|
||||||
XI 2.1: if device is grabbed by us, skip, we've already delivered */
|
XI 2.1: if device is grabbed by us, skip, we've already delivered */
|
||||||
return (cmp == 0) ? TRUE : SameClient(grab, client);
|
if (cmp == 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return (grab->window != root) ? FALSE : SameClient(grab, client);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2282,7 +2304,7 @@ DeliverRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
|
||||||
*/
|
*/
|
||||||
ic.next = NULL;
|
ic.next = NULL;
|
||||||
|
|
||||||
if (!FilterRawEvents(rClient(&ic), grab))
|
if (!FilterRawEvents(rClient(&ic), grab, root))
|
||||||
DeliverEventToInputClients(device, &ic, root, xi, 1,
|
DeliverEventToInputClients(device, &ic, root, xi, 1,
|
||||||
filter, NULL, &c, &m);
|
filter, NULL, &c, &m);
|
||||||
}
|
}
|
||||||
|
|
@ -4539,6 +4561,7 @@ DeviceEnterLeaveEvent(DeviceIntPtr mouse,
|
||||||
{
|
{
|
||||||
GrabPtr grab = mouse->deviceGrab.grab;
|
GrabPtr grab = mouse->deviceGrab.grab;
|
||||||
xXIEnterEvent *event;
|
xXIEnterEvent *event;
|
||||||
|
WindowPtr focus;
|
||||||
int filter;
|
int filter;
|
||||||
int btlen, len, i;
|
int btlen, len, i;
|
||||||
DeviceIntPtr kbd;
|
DeviceIntPtr kbd;
|
||||||
|
|
@ -4580,6 +4603,11 @@ DeviceEnterLeaveEvent(DeviceIntPtr mouse,
|
||||||
event->group.locked_group = kbd->key->xkbInfo->state.locked_group;
|
event->group.locked_group = kbd->key->xkbInfo->state.locked_group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
focus = (kbd) ? kbd->focus->win : None;
|
||||||
|
if ((focus != NoneWin) &&
|
||||||
|
((pWin == focus) || (focus == PointerRootWin) || IsParent(focus, pWin)))
|
||||||
|
event->focus = TRUE;
|
||||||
|
|
||||||
FixUpEventFromWindow(mouse->spriteInfo->sprite, (xEvent *) event, pWin,
|
FixUpEventFromWindow(mouse->spriteInfo->sprite, (xEvent *) event, pWin,
|
||||||
None, FALSE);
|
None, FALSE);
|
||||||
|
|
||||||
|
|
@ -5016,7 +5044,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev,
|
||||||
grab = grabInfo->grab;
|
grab = grabInfo->grab;
|
||||||
if (grab && grab->grabtype != grabtype)
|
if (grab && grab->grabtype != grabtype)
|
||||||
*status = AlreadyGrabbed;
|
*status = AlreadyGrabbed;
|
||||||
if (grab && !SameClient(grab, client))
|
else if (grab && !SameClient(grab, client))
|
||||||
*status = AlreadyGrabbed;
|
*status = AlreadyGrabbed;
|
||||||
else if ((!pWin->realized) ||
|
else if ((!pWin->realized) ||
|
||||||
(confineTo &&
|
(confineTo &&
|
||||||
|
|
|
||||||
|
|
@ -787,11 +787,33 @@ add_to_scroll_valuator(DeviceIntPtr dev, ValuatorMask *mask, int valuator, doubl
|
||||||
* @param[in,out] mask Valuator data for this event, modified in-place.
|
* @param[in,out] mask Valuator data for this event, modified in-place.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
moveRelative(DeviceIntPtr dev, ValuatorMask *mask)
|
moveRelative(DeviceIntPtr dev, int flags, ValuatorMask *mask)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
Bool clip_xy = IsMaster(dev) || !IsFloating(dev);
|
Bool clip_xy = IsMaster(dev) || !IsFloating(dev);
|
||||||
|
|
||||||
|
/* for abs devices in relative mode, we've just scaled wrong, since we
|
||||||
|
mapped the device's shape into the screen shape. Undo this. */
|
||||||
|
if ((flags & POINTER_ABSOLUTE) == 0 && dev->valuator &&
|
||||||
|
dev->valuator->axes[0].min_value < dev->valuator->axes[0].max_value) {
|
||||||
|
|
||||||
|
double ratio = 1.0 * screenInfo.width/screenInfo.height;
|
||||||
|
|
||||||
|
if (ratio > 1.0) {
|
||||||
|
double y;
|
||||||
|
if (valuator_mask_fetch_double(mask, 1, &y)) {
|
||||||
|
y *= ratio;
|
||||||
|
valuator_mask_set_double(mask, 1, y);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
double x;
|
||||||
|
if (valuator_mask_fetch_double(mask, 0, &x)) {
|
||||||
|
x *= ratio;
|
||||||
|
valuator_mask_set_double(mask, 0, x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* calc other axes, clip, drop back into valuators */
|
/* calc other axes, clip, drop back into valuators */
|
||||||
for (i = 0; i < valuator_mask_size(mask); i++) {
|
for (i = 0; i < valuator_mask_size(mask); i++) {
|
||||||
double val = dev->last.valuators[i];
|
double val = dev->last.valuators[i];
|
||||||
|
|
@ -844,14 +866,14 @@ scale_from_screen(DeviceIntPtr dev, ValuatorMask *mask)
|
||||||
scaled = valuator_mask_get_double(mask, 0) + scr->x;
|
scaled = valuator_mask_get_double(mask, 0) + scr->x;
|
||||||
scaled = rescaleValuatorAxis(scaled,
|
scaled = rescaleValuatorAxis(scaled,
|
||||||
NULL, dev->valuator->axes + 0,
|
NULL, dev->valuator->axes + 0,
|
||||||
0, scr->width);
|
screenInfo.x, screenInfo.width);
|
||||||
valuator_mask_set_double(mask, 0, scaled);
|
valuator_mask_set_double(mask, 0, scaled);
|
||||||
}
|
}
|
||||||
if (valuator_mask_isset(mask, 1)) {
|
if (valuator_mask_isset(mask, 1)) {
|
||||||
scaled = valuator_mask_get_double(mask, 1) + scr->y;
|
scaled = valuator_mask_get_double(mask, 1) + scr->y;
|
||||||
scaled = rescaleValuatorAxis(scaled,
|
scaled = rescaleValuatorAxis(scaled,
|
||||||
NULL, dev->valuator->axes + 1,
|
NULL, dev->valuator->axes + 1,
|
||||||
0, scr->height);
|
screenInfo.y, screenInfo.height);
|
||||||
valuator_mask_set_double(mask, 1, scaled);
|
valuator_mask_set_double(mask, 1, scaled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -896,9 +918,9 @@ scale_to_desktop(DeviceIntPtr dev, ValuatorMask *mask,
|
||||||
|
|
||||||
/* scale x&y to desktop coordinates */
|
/* scale x&y to desktop coordinates */
|
||||||
*screenx = rescaleValuatorAxis(x, dev->valuator->axes + 0, NULL,
|
*screenx = rescaleValuatorAxis(x, dev->valuator->axes + 0, NULL,
|
||||||
screenInfo.x, screenInfo.width);
|
screenInfo.x, screenInfo.width - 1);
|
||||||
*screeny = rescaleValuatorAxis(y, dev->valuator->axes + 1, NULL,
|
*screeny = rescaleValuatorAxis(y, dev->valuator->axes + 1, NULL,
|
||||||
screenInfo.y, screenInfo.height);
|
screenInfo.y, screenInfo.height - 1);
|
||||||
|
|
||||||
*devx = x;
|
*devx = x;
|
||||||
*devy = y;
|
*devy = y;
|
||||||
|
|
@ -1387,7 +1409,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
|
||||||
if ((flags & POINTER_NORAW) == 0)
|
if ((flags & POINTER_NORAW) == 0)
|
||||||
set_raw_valuators(raw, &mask, raw->valuators.data);
|
set_raw_valuators(raw, &mask, raw->valuators.data);
|
||||||
|
|
||||||
moveRelative(pDev, &mask);
|
moveRelative(pDev, flags, &mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* valuators are in device coordinate system in absolute coordinates */
|
/* valuators are in device coordinate system in absolute coordinates */
|
||||||
|
|
@ -1400,8 +1422,9 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
|
||||||
coordinates were.
|
coordinates were.
|
||||||
*/
|
*/
|
||||||
if (flags & POINTER_SCREEN) {
|
if (flags & POINTER_SCREEN) {
|
||||||
screenx = sx;
|
scr = miPointerGetScreen(pDev);
|
||||||
screeny = sy;
|
screenx = sx + scr->x;
|
||||||
|
screeny = sy + scr->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
scr = positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative,
|
scr = positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative,
|
||||||
|
|
@ -1950,32 +1973,27 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (t->mode == XIDirectTouch && !(flags & TOUCH_CLIENT_ID)) {
|
|
||||||
if (!valuator_mask_isset(&mask, 0))
|
|
||||||
valuator_mask_set_double(&mask, 0,
|
|
||||||
valuator_mask_get_double(touchpoint.ti->
|
|
||||||
valuators, 0));
|
|
||||||
if (!valuator_mask_isset(&mask, 1))
|
|
||||||
valuator_mask_set_double(&mask, 1,
|
|
||||||
valuator_mask_get_double(touchpoint.ti->
|
|
||||||
valuators, 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get our screen event co-ordinates (root_x/root_y/event_x/event_y):
|
/* Get our screen event co-ordinates (root_x/root_y/event_x/event_y):
|
||||||
* these come from the touchpoint in Absolute mode, or the sprite in
|
* these come from the touchpoint in Absolute mode, or the sprite in
|
||||||
* Relative. */
|
* Relative. */
|
||||||
if (t->mode == XIDirectTouch) {
|
if (t->mode == XIDirectTouch) {
|
||||||
transformAbsolute(dev, &mask);
|
|
||||||
|
|
||||||
if (!(flags & TOUCH_CLIENT_ID)) {
|
if (!(flags & TOUCH_CLIENT_ID)) {
|
||||||
for (i = 0; i < valuator_mask_size(&mask); i++) {
|
for (i = 0; i < max(valuator_mask_size(&mask), 2); i++) {
|
||||||
double val;
|
double val;
|
||||||
|
|
||||||
if (valuator_mask_fetch_double(&mask, i, &val))
|
if (valuator_mask_fetch_double(&mask, i, &val))
|
||||||
valuator_mask_set_double(touchpoint.ti->valuators, i, val);
|
valuator_mask_set_double(touchpoint.ti->valuators, i, val);
|
||||||
}
|
/* If the device doesn't post new X and Y axis values,
|
||||||
|
* use the last values posted.
|
||||||
|
*/
|
||||||
|
else if (i < 2 &&
|
||||||
|
valuator_mask_fetch_double(touchpoint.ti->valuators, i, &val))
|
||||||
|
valuator_mask_set_double(&mask, i, val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
transformAbsolute(dev, &mask);
|
||||||
clipAbsolute(dev, &mask);
|
clipAbsolute(dev, &mask);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,10 @@ CreateGrab(int client, DeviceIntPtr device, DeviceIntPtr modDevice,
|
||||||
grab->resource = FakeClientID(client);
|
grab->resource = FakeClientID(client);
|
||||||
grab->device = device;
|
grab->device = device;
|
||||||
grab->window = window;
|
grab->window = window;
|
||||||
grab->eventMask = mask->core; /* same for XI */
|
if (grabtype == CORE || grabtype == XI)
|
||||||
|
grab->eventMask = mask->core; /* same for XI */
|
||||||
|
else
|
||||||
|
grab->eventMask = 0;
|
||||||
grab->deviceMask = 0;
|
grab->deviceMask = 0;
|
||||||
grab->ownerEvents = param->ownerEvents;
|
grab->ownerEvents = param->ownerEvents;
|
||||||
grab->keyboardMode = param->this_device_mode;
|
grab->keyboardMode = param->this_device_mode;
|
||||||
|
|
|
||||||
72
dix/touch.c
72
dix/touch.c
|
|
@ -572,8 +572,8 @@ TouchBuildSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* Mark which grabs/event selections we're delivering to: max one grab per
|
/* Mark which grabs/event selections we're delivering to: max one grab per
|
||||||
* window plus the bottom-most event selection. */
|
* window plus the bottom-most event selection, plus any active grab. */
|
||||||
ti->listeners = calloc(sprite->spriteTraceGood + 1, sizeof(*ti->listeners));
|
ti->listeners = calloc(sprite->spriteTraceGood + 2, sizeof(*ti->listeners));
|
||||||
if (!ti->listeners) {
|
if (!ti->listeners) {
|
||||||
sprite->spriteTraceGood = 0;
|
sprite->spriteTraceGood = 0;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
@ -682,15 +682,20 @@ TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource)
|
||||||
* Add the resource to this touch's listeners.
|
* Add the resource to this touch's listeners.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
TouchAddListener(TouchPointInfoPtr ti, XID resource, enum InputLevel level,
|
TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type,
|
||||||
enum TouchListenerType type, enum TouchListenerState state,
|
enum InputLevel level, enum TouchListenerType type,
|
||||||
WindowPtr window)
|
enum TouchListenerState state, WindowPtr window,
|
||||||
|
GrabPtr grab)
|
||||||
{
|
{
|
||||||
ti->listeners[ti->num_listeners].listener = resource;
|
ti->listeners[ti->num_listeners].listener = resource;
|
||||||
|
ti->listeners[ti->num_listeners].resource_type = resource_type;
|
||||||
ti->listeners[ti->num_listeners].level = level;
|
ti->listeners[ti->num_listeners].level = level;
|
||||||
ti->listeners[ti->num_listeners].state = state;
|
ti->listeners[ti->num_listeners].state = state;
|
||||||
ti->listeners[ti->num_listeners].type = type;
|
ti->listeners[ti->num_listeners].type = type;
|
||||||
ti->listeners[ti->num_listeners].window = window;
|
ti->listeners[ti->num_listeners].window = window;
|
||||||
|
ti->listeners[ti->num_listeners].grab = grab;
|
||||||
|
if (grab)
|
||||||
|
ti->num_grabs++;
|
||||||
ti->num_listeners++;
|
ti->num_listeners++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -709,6 +714,11 @@ TouchRemoveListener(TouchPointInfoPtr ti, XID resource)
|
||||||
if (ti->listeners[i].listener == resource) {
|
if (ti->listeners[i].listener == resource) {
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
|
if (ti->listeners[i].grab) {
|
||||||
|
ti->listeners[i].grab = NULL;
|
||||||
|
ti->num_grabs--;
|
||||||
|
}
|
||||||
|
|
||||||
for (j = i; j < ti->num_listeners - 1; j++)
|
for (j = i; j < ti->num_listeners - 1; j++)
|
||||||
ti->listeners[j] = ti->listeners[j + 1];
|
ti->listeners[j] = ti->listeners[j + 1];
|
||||||
ti->num_listeners--;
|
ti->num_listeners--;
|
||||||
|
|
@ -739,9 +749,9 @@ TouchAddGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
type = LISTENER_POINTER_GRAB;
|
type = LISTENER_POINTER_GRAB;
|
||||||
}
|
}
|
||||||
|
|
||||||
TouchAddListener(ti, grab->resource, grab->grabtype,
|
/* grab listeners are always RT_NONE since we keep the grab pointer */
|
||||||
type, LISTENER_AWAITING_BEGIN, grab->window);
|
TouchAddListener(ti, grab->resource, RT_NONE, grab->grabtype,
|
||||||
ti->num_grabs++;
|
type, LISTENER_AWAITING_BEGIN, grab->window, grab);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -796,8 +806,8 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
if (!xi2mask_isset(iclients->xi2mask, dev, XI_TouchOwnership))
|
if (!xi2mask_isset(iclients->xi2mask, dev, XI_TouchOwnership))
|
||||||
TouchEventHistoryAllocate(ti);
|
TouchEventHistoryAllocate(ti);
|
||||||
|
|
||||||
TouchAddListener(ti, iclients->resource, XI2,
|
TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI2,
|
||||||
type, LISTENER_AWAITING_BEGIN, win);
|
type, LISTENER_AWAITING_BEGIN, win, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -811,9 +821,9 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
TouchEventHistoryAllocate(ti);
|
TouchEventHistoryAllocate(ti);
|
||||||
TouchAddListener(ti, iclients->resource, XI,
|
TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI,
|
||||||
LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
|
LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
|
||||||
win);
|
win, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -826,9 +836,9 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
/* window owner */
|
/* window owner */
|
||||||
if (IsMaster(dev) && (win->eventMask & core_filter)) {
|
if (IsMaster(dev) && (win->eventMask & core_filter)) {
|
||||||
TouchEventHistoryAllocate(ti);
|
TouchEventHistoryAllocate(ti);
|
||||||
TouchAddListener(ti, win->drawable.id, CORE,
|
TouchAddListener(ti, win->drawable.id, RT_WINDOW, CORE,
|
||||||
LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
|
LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
|
||||||
win);
|
win, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -838,8 +848,8 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
TouchEventHistoryAllocate(ti);
|
TouchEventHistoryAllocate(ti);
|
||||||
TouchAddListener(ti, oclients->resource, CORE,
|
TouchAddListener(ti, oclients->resource, RT_OTHERCLIENT, CORE,
|
||||||
type, LISTENER_AWAITING_BEGIN, win);
|
type, LISTENER_AWAITING_BEGIN, win, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -994,8 +1004,6 @@ TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti, int listener,
|
||||||
for (i = 0; i < nev; i++)
|
for (i = 0; i < nev; i++)
|
||||||
mieqProcessDeviceEvent(dev, events + i, NULL);
|
mieqProcessDeviceEvent(dev, events + i, NULL);
|
||||||
|
|
||||||
ProcessInputEvents();
|
|
||||||
|
|
||||||
FreeEventList(events, GetMaximumEventsNum());
|
FreeEventList(events, GetMaximumEventsNum());
|
||||||
|
|
||||||
return nev ? Success : BadMatch;
|
return nev ? Success : BadMatch;
|
||||||
|
|
@ -1029,3 +1037,31 @@ TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
|
||||||
|
|
||||||
return TouchListenerAcceptReject(dev, ti, i, mode);
|
return TouchListenerAcceptReject(dev, ti, i, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* End physically active touches for a device.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
TouchEndPhysicallyActiveTouches(DeviceIntPtr dev)
|
||||||
|
{
|
||||||
|
InternalEvent *eventlist = InitEventList(GetMaximumEventsNum());
|
||||||
|
int i;
|
||||||
|
|
||||||
|
OsBlockSignals();
|
||||||
|
mieqProcessInputEvents();
|
||||||
|
for (i = 0; i < dev->last.num_touches; i++) {
|
||||||
|
DDXTouchPointInfoPtr ddxti = dev->last.touches + i;
|
||||||
|
|
||||||
|
if (ddxti->active) {
|
||||||
|
int j;
|
||||||
|
int nevents = GetTouchEvents(eventlist, dev, ddxti->ddx_id,
|
||||||
|
XI_TouchEnd, 0, NULL);
|
||||||
|
|
||||||
|
for (j = 0; j < nevents; j++)
|
||||||
|
mieqProcessDeviceEvent(dev, eventlist + j, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
OsReleaseSignals();
|
||||||
|
|
||||||
|
FreeEventList(eventlist, GetMaximumEventsNum());
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1431,6 +1431,8 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CursorVisible = TRUE;
|
||||||
|
|
||||||
if (pWin->realized)
|
if (pWin->realized)
|
||||||
WindowHasNewCursor(pWin);
|
WindowHasNewCursor(pWin);
|
||||||
|
|
||||||
|
|
@ -3132,6 +3134,8 @@ dixSaveScreens(ClientPtr client, int on, int mode)
|
||||||
UpdateCurrentTimeIf();
|
UpdateCurrentTimeIf();
|
||||||
nt_list_for_each_entry(dev, inputInfo.devices, next)
|
nt_list_for_each_entry(dev, inputInfo.devices, next)
|
||||||
lastDeviceEventTime[dev->id] = currentTime;
|
lastDeviceEventTime[dev->id] = currentTime;
|
||||||
|
lastDeviceEventTime[XIAllDevices] = currentTime;
|
||||||
|
lastDeviceEventTime[XIAllMasterDevices] = currentTime;
|
||||||
}
|
}
|
||||||
SetScreenSaverTimer();
|
SetScreenSaverTimer();
|
||||||
}
|
}
|
||||||
|
|
@ -3465,6 +3469,8 @@ ChangeWindowDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev, CursorPtr pCursor)
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
CursorVisible = TRUE;
|
||||||
|
|
||||||
if (pWin->realized)
|
if (pWin->realized)
|
||||||
WindowHasNewCursor(pWin);
|
WindowHasNewCursor(pWin);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -209,6 +209,7 @@ typedef struct {
|
||||||
RegionRec srcReg;
|
RegionRec srcReg;
|
||||||
RegionRec maskReg;
|
RegionRec maskReg;
|
||||||
PixmapPtr srcPix;
|
PixmapPtr srcPix;
|
||||||
|
PixmapPtr maskPix;
|
||||||
|
|
||||||
DevPrivateKeyRec pixmapPrivateKeyRec;
|
DevPrivateKeyRec pixmapPrivateKeyRec;
|
||||||
DevPrivateKeyRec gcPrivateKeyRec;
|
DevPrivateKeyRec gcPrivateKeyRec;
|
||||||
|
|
|
||||||
|
|
@ -442,6 +442,13 @@ ExaSrcValidate(DrawablePtr pDrawable,
|
||||||
RegionPtr dst;
|
RegionPtr dst;
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
|
|
||||||
|
if (pExaScr->srcPix == pPix)
|
||||||
|
dst = &pExaScr->srcReg;
|
||||||
|
else if (pExaScr->maskPix == pPix)
|
||||||
|
dst = &pExaScr->maskReg;
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff);
|
exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff);
|
||||||
|
|
||||||
box.x1 = x + xoff;
|
box.x1 = x + xoff;
|
||||||
|
|
@ -449,8 +456,6 @@ ExaSrcValidate(DrawablePtr pDrawable,
|
||||||
box.x2 = box.x1 + width;
|
box.x2 = box.x1 + width;
|
||||||
box.y2 = box.y1 + height;
|
box.y2 = box.y1 + height;
|
||||||
|
|
||||||
dst = (pExaScr->srcPix == pPix) ? &pExaScr->srcReg : &pExaScr->maskReg;
|
|
||||||
|
|
||||||
RegionInit(®, &box, 1);
|
RegionInit(®, &box, 1);
|
||||||
RegionUnion(dst, dst, ®);
|
RegionUnion(dst, dst, ®);
|
||||||
RegionUninit(®);
|
RegionUninit(®);
|
||||||
|
|
@ -495,16 +500,19 @@ ExaPrepareCompositeReg(ScreenPtr pScreen,
|
||||||
if (pSrc != pDst)
|
if (pSrc != pDst)
|
||||||
RegionTranslate(pSrc->pCompositeClip,
|
RegionTranslate(pSrc->pCompositeClip,
|
||||||
-pSrc->pDrawable->x, -pSrc->pDrawable->y);
|
-pSrc->pDrawable->x, -pSrc->pDrawable->y);
|
||||||
}
|
} else
|
||||||
|
pExaScr->srcPix = NULL;
|
||||||
|
|
||||||
if (pMask && pMask->pDrawable) {
|
if (pMask && pMask->pDrawable) {
|
||||||
pMaskPix = exaGetDrawablePixmap(pMask->pDrawable);
|
pMaskPix = exaGetDrawablePixmap(pMask->pDrawable);
|
||||||
RegionNull(&pExaScr->maskReg);
|
RegionNull(&pExaScr->maskReg);
|
||||||
maskReg = &pExaScr->maskReg;
|
maskReg = &pExaScr->maskReg;
|
||||||
|
pExaScr->maskPix = pMaskPix;
|
||||||
if (pMask != pDst && pMask != pSrc)
|
if (pMask != pDst && pMask != pSrc)
|
||||||
RegionTranslate(pMask->pCompositeClip,
|
RegionTranslate(pMask->pCompositeClip,
|
||||||
-pMask->pDrawable->x, -pMask->pDrawable->y);
|
-pMask->pDrawable->x, -pMask->pDrawable->y);
|
||||||
}
|
} else
|
||||||
|
pExaScr->maskPix = NULL;
|
||||||
|
|
||||||
RegionTranslate(pDst->pCompositeClip,
|
RegionTranslate(pDst->pCompositeClip,
|
||||||
-pDst->pDrawable->x, -pDst->pDrawable->y);
|
-pDst->pDrawable->x, -pDst->pDrawable->y);
|
||||||
|
|
|
||||||
|
|
@ -514,7 +514,7 @@ create_driver_context(__GLXDRIcontext * context,
|
||||||
unsigned minor_ver;
|
unsigned minor_ver;
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
int reset;
|
int reset;
|
||||||
int api;
|
int api = __DRI_API_OPENGL;
|
||||||
|
|
||||||
if (num_attribs != 0) {
|
if (num_attribs != 0) {
|
||||||
if (!dri2_convert_glx_attribs(screen, num_attribs, attribs,
|
if (!dri2_convert_glx_attribs(screen, num_attribs, attribs,
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_DMX_CONFIG_H
|
|
||||||
#include <dmx-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
||||||
|
|
@ -346,6 +346,8 @@ dmxComputeScreenOrigins(void)
|
||||||
screenInfo.screens[i]->y -= minY;
|
screenInfo.screens[i]->y -= minY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_desktop_dimensions();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Recompute origin information in the #dmxScreens list. This is
|
/** Recompute origin information in the #dmxScreens list. This is
|
||||||
|
|
|
||||||
|
|
@ -237,13 +237,11 @@ ephyrMapFramebuffer(KdScreenInfo * screen)
|
||||||
KdComputePointerMatrix(&m, ephyrRandr, screen->width, screen->height);
|
KdComputePointerMatrix(&m, ephyrRandr, screen->width, screen->height);
|
||||||
KdSetPointerMatrix(&m);
|
KdSetPointerMatrix(&m);
|
||||||
|
|
||||||
priv->bytes_per_line =
|
|
||||||
((screen->width * screen->fb.bitsPerPixel + 31) >> 5) << 2;
|
|
||||||
|
|
||||||
buffer_height = ephyrBufferHeight(screen);
|
buffer_height = ephyrBufferHeight(screen);
|
||||||
|
|
||||||
priv->base =
|
priv->base =
|
||||||
hostx_screen_init(screen, screen->width, screen->height, buffer_height);
|
hostx_screen_init(screen, screen->width, screen->height, buffer_height,
|
||||||
|
&priv->bytes_per_line, &screen->fb.bitsPerPixel);
|
||||||
|
|
||||||
if ((scrpriv->randr & RR_Rotate_0) && !(scrpriv->randr & RR_Reflect_All)) {
|
if ((scrpriv->randr & RR_Rotate_0) && !(scrpriv->randr & RR_Reflect_All)) {
|
||||||
scrpriv->shadow = FALSE;
|
scrpriv->shadow = FALSE;
|
||||||
|
|
|
||||||
|
|
@ -617,7 +617,8 @@ hostx_set_cmap_entry(unsigned char idx,
|
||||||
*/
|
*/
|
||||||
void *
|
void *
|
||||||
hostx_screen_init(EphyrScreenInfo screen,
|
hostx_screen_init(EphyrScreenInfo screen,
|
||||||
int width, int height, int buffer_height)
|
int width, int height, int buffer_height,
|
||||||
|
int *bytes_per_line, int *bits_per_pixel)
|
||||||
{
|
{
|
||||||
int bitmap_pad;
|
int bitmap_pad;
|
||||||
Bool shm_success = False;
|
Bool shm_success = False;
|
||||||
|
|
@ -694,6 +695,9 @@ hostx_screen_init(EphyrScreenInfo screen,
|
||||||
malloc(host_screen->ximg->bytes_per_line * buffer_height);
|
malloc(host_screen->ximg->bytes_per_line * buffer_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*bytes_per_line = host_screen->ximg->bytes_per_line;
|
||||||
|
*bits_per_pixel = host_screen->ximg->bits_per_pixel;
|
||||||
|
|
||||||
XResizeWindow(HostX.dpy, host_screen->win, width, height);
|
XResizeWindow(HostX.dpy, host_screen->win, width, height);
|
||||||
|
|
||||||
/* Ask the WM to keep our size static */
|
/* Ask the WM to keep our size static */
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,8 @@ hostx_set_cmap_entry(unsigned char idx,
|
||||||
unsigned char r, unsigned char g, unsigned char b);
|
unsigned char r, unsigned char g, unsigned char b);
|
||||||
|
|
||||||
void *hostx_screen_init(EphyrScreenInfo screen,
|
void *hostx_screen_init(EphyrScreenInfo screen,
|
||||||
int width, int height, int buffer_height);
|
int width, int height, int buffer_height,
|
||||||
|
int *bytes_per_line, int *bits_per_pixel);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ from The Open Group.
|
||||||
#endif /* HAS_SHM */
|
#endif /* HAS_SHM */
|
||||||
#include "dix.h"
|
#include "dix.h"
|
||||||
#include "miline.h"
|
#include "miline.h"
|
||||||
|
#include "glx_extinit.h"
|
||||||
|
|
||||||
#define VFB_DEFAULT_WIDTH 1280
|
#define VFB_DEFAULT_WIDTH 1280
|
||||||
#define VFB_DEFAULT_HEIGHT 1024
|
#define VFB_DEFAULT_HEIGHT 1024
|
||||||
|
|
@ -885,12 +886,30 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
||||||
|
|
||||||
} /* end vfbScreenInit */
|
} /* end vfbScreenInit */
|
||||||
|
|
||||||
|
static const ExtensionModule vfbExtensions[] = {
|
||||||
|
#ifdef GLXEXT
|
||||||
|
{ GlxExtensionInit, "GLX", &noGlxExtension },
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
static
|
||||||
|
void vfbExtensionInit(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(vfbExtensions); i++)
|
||||||
|
LoadExtension(&vfbExtensions[i], TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
InitOutput(ScreenInfo * screenInfo, int argc, char **argv)
|
InitOutput(ScreenInfo * screenInfo, int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int NumFormats = 0;
|
int NumFormats = 0;
|
||||||
|
|
||||||
|
if (serverGeneration == 1)
|
||||||
|
vfbExtensionInit();
|
||||||
|
|
||||||
/* initialize pixmap formats */
|
/* initialize pixmap formats */
|
||||||
|
|
||||||
/* must have a pixmap depth to match every screen depth */
|
/* must have a pixmap depth to match every screen depth */
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ XVSDKINCS = xf86xv.h xf86xvmc.h xf86xvpriv.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if XF86VIDMODE
|
if XF86VIDMODE
|
||||||
|
XF86VMODESOURCES = xf86vmode.c
|
||||||
XF86VMODE_SDK = vidmodeproc.h
|
XF86VMODE_SDK = vidmodeproc.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
@ -47,7 +48,7 @@ libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
|
||||||
xf86VidMode.c xf86fbman.c xf86cmap.c \
|
xf86VidMode.c xf86fbman.c xf86cmap.c \
|
||||||
xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \
|
xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \
|
||||||
xf86Mode.c xorgHelper.c xf86Extensions.h \
|
xf86Mode.c xorgHelper.c xf86Extensions.h \
|
||||||
xf86Extensions.c xf86vmode.c \
|
xf86Extensions.c $(XF86VMODESOURCES) \
|
||||||
$(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES)
|
$(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES)
|
||||||
nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h
|
nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h
|
||||||
libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la
|
libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la
|
||||||
|
|
|
||||||
|
|
@ -468,4 +468,8 @@ extern _X_EXPORT ScreenPtr xf86ScrnToScreen(ScrnInfoPtr pScrn);
|
||||||
/* flags passed to xf86 allocate screen */
|
/* flags passed to xf86 allocate screen */
|
||||||
#define XF86_ALLOCATE_GPU_SCREEN 1
|
#define XF86_ALLOCATE_GPU_SCREEN 1
|
||||||
|
|
||||||
|
/* Update the internal total dimensions of all ScreenRecs together */
|
||||||
|
extern _X_EXPORT void
|
||||||
|
xf86UpdateDesktopDimensions(void);
|
||||||
|
|
||||||
#endif /* _XF86_H */
|
#endif /* _XF86_H */
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,8 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
|
||||||
if (drv->platformProbe != NULL) {
|
if (drv->platformProbe != NULL) {
|
||||||
foundScreen = xf86platformProbeDev(drv);
|
foundScreen = xf86platformProbeDev(drv);
|
||||||
}
|
}
|
||||||
|
if (ServerIsNotSeat0())
|
||||||
|
return foundScreen;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XSERVER_LIBPCIACCESS
|
#ifdef XSERVER_LIBPCIACCESS
|
||||||
|
|
@ -214,6 +216,8 @@ xf86BusProbe(void)
|
||||||
{
|
{
|
||||||
#ifdef XSERVER_PLATFORM_BUS
|
#ifdef XSERVER_PLATFORM_BUS
|
||||||
xf86platformProbe();
|
xf86platformProbe();
|
||||||
|
if (ServerIsNotSeat0())
|
||||||
|
return;
|
||||||
#endif
|
#endif
|
||||||
#ifdef XSERVER_LIBPCIACCESS
|
#ifdef XSERVER_LIBPCIACCESS
|
||||||
xf86PciProbe();
|
xf86PciProbe();
|
||||||
|
|
|
||||||
|
|
@ -1033,6 +1033,9 @@ DGAProcessKeyboardEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr keybd)
|
||||||
|
|
||||||
UpdateDeviceState(keybd, &ev);
|
UpdateDeviceState(keybd, &ev);
|
||||||
|
|
||||||
|
if (!IsMaster(keybd))
|
||||||
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Deliver the DGA event
|
* Deliver the DGA event
|
||||||
*/
|
*/
|
||||||
|
|
@ -1074,6 +1077,7 @@ DGAProcessPointerEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr mouse)
|
||||||
DeviceEvent ev = {
|
DeviceEvent ev = {
|
||||||
.header = ET_Internal,
|
.header = ET_Internal,
|
||||||
.length = sizeof(ev),
|
.length = sizeof(ev),
|
||||||
|
.detail.key = event->detail,
|
||||||
.type = event->subtype,
|
.type = event->subtype,
|
||||||
.corestate = butc ? butc->state : 0
|
.corestate = butc ? butc->state : 0
|
||||||
};
|
};
|
||||||
|
|
@ -1083,6 +1087,9 @@ DGAProcessPointerEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr mouse)
|
||||||
|
|
||||||
UpdateDeviceState(mouse, &ev);
|
UpdateDeviceState(mouse, &ev);
|
||||||
|
|
||||||
|
if (!IsMaster(mouse))
|
||||||
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Deliver the DGA event
|
* Deliver the DGA event
|
||||||
*/
|
*/
|
||||||
|
|
@ -1190,9 +1197,6 @@ DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device)
|
||||||
if (!pScreenPriv)
|
if (!pScreenPriv)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!IsMaster(device))
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (event->subtype) {
|
switch (event->subtype) {
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
case KeyRelease:
|
case KeyRelease:
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case ACTION_TERMINATE:
|
case ACTION_TERMINATE:
|
||||||
if (!xf86Info.dontZap) {
|
if (!xf86Info.dontZap) {
|
||||||
|
xf86Msg(X_INFO, "Server zapped. Shutting down.\n");
|
||||||
#ifdef XFreeXDGA
|
#ifdef XFreeXDGA
|
||||||
DGAShutdown();
|
DGAShutdown();
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -271,9 +272,9 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err >= 0) { /* we don't want the handlers called if select() */
|
if (err >= 0) { /* we don't want the handlers called if select() */
|
||||||
IHPtr ih; /* returned with an error condition, do we? */
|
IHPtr ih, ih_tmp; /* returned with an error condition, do we? */
|
||||||
|
|
||||||
for (ih = InputHandlers; ih; ih = ih->next) {
|
nt_list_for_each_entry_safe(ih, ih_tmp, InputHandlers, next) {
|
||||||
if (ih->enabled && ih->fd >= 0 && ih->ihproc &&
|
if (ih->enabled && ih->fd >= 0 && ih->ihproc &&
|
||||||
(FD_ISSET(ih->fd, ((fd_set *) pReadmask)) != 0)) {
|
(FD_ISSET(ih->fd, ((fd_set *) pReadmask)) != 0)) {
|
||||||
ih->ihproc(ih->fd, ih->data);
|
ih->ihproc(ih->fd, ih->data);
|
||||||
|
|
@ -618,14 +619,16 @@ InputHandlerProc
|
||||||
xf86SetConsoleHandler(InputHandlerProc proc, pointer data)
|
xf86SetConsoleHandler(InputHandlerProc proc, pointer data)
|
||||||
{
|
{
|
||||||
static IHPtr handler = NULL;
|
static IHPtr handler = NULL;
|
||||||
IHPtr old_handler = handler;
|
InputHandlerProc old_proc = NULL;
|
||||||
|
|
||||||
if (old_handler)
|
if (handler) {
|
||||||
xf86RemoveGeneralHandler(old_handler);
|
old_proc = handler->ihproc;
|
||||||
|
xf86RemoveGeneralHandler(handler);
|
||||||
|
}
|
||||||
|
|
||||||
handler = xf86AddGeneralHandler(xf86Info.consoleFd, proc, data);
|
handler = xf86AddGeneralHandler(xf86Info.consoleFd, proc, data);
|
||||||
|
|
||||||
return (old_handler) ? old_handler->ihproc : NULL;
|
return old_proc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -1898,3 +1898,9 @@ xf86ScrnToScreen(ScrnInfoPtr pScrn)
|
||||||
return screenInfo.screens[pScrn->scrnIndex];
|
return screenInfo.screens[pScrn->scrnIndex];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
xf86UpdateDesktopDimensions(void)
|
||||||
|
{
|
||||||
|
update_desktop_dimensions();
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ typedef enum {
|
||||||
* mask is 0xFFFF0000.
|
* mask is 0xFFFF0000.
|
||||||
*/
|
*/
|
||||||
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
|
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
|
||||||
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(13, 0)
|
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(13, 1)
|
||||||
#define ABI_XINPUT_VERSION SET_ABI_VERSION(18, 0)
|
#define ABI_XINPUT_VERSION SET_ABI_VERSION(18, 0)
|
||||||
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(7, 0)
|
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(7, 0)
|
||||||
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
|
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
|
||||||
|
|
|
||||||
|
|
@ -213,11 +213,12 @@ xf86platformProbe(void)
|
||||||
int i;
|
int i;
|
||||||
Bool pci = TRUE;
|
Bool pci = TRUE;
|
||||||
|
|
||||||
|
config_odev_probe(xf86PlatformDeviceProbe);
|
||||||
|
|
||||||
if (!xf86scanpci()) {
|
if (!xf86scanpci()) {
|
||||||
pci = FALSE;
|
pci = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
config_odev_probe(&xf86PlatformDeviceProbe);
|
|
||||||
for (i = 0; i < xf86_num_platform_devices; i++) {
|
for (i = 0; i < xf86_num_platform_devices; i++) {
|
||||||
char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID);
|
char *busid = xf86_get_platform_attrib(i, ODEV_ATTRIB_BUSID);
|
||||||
|
|
||||||
|
|
@ -358,6 +359,9 @@ xf86platformProbeDev(DriverPtr drvp)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
/* for non-seat0 servers assume first device is the master */
|
||||||
|
if (ServerIsNotSeat0())
|
||||||
|
break;
|
||||||
if (xf86_platform_devices[j].pdev) {
|
if (xf86_platform_devices[j].pdev) {
|
||||||
if (xf86IsPrimaryPlatform(&xf86_platform_devices[j]))
|
if (xf86IsPrimaryPlatform(&xf86_platform_devices[j]))
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -766,6 +766,44 @@ static inline PixmapPtr GetDrawablePixmap(DrawablePtr drawable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A TraverseTree callback to invalidate all windows using the same
|
||||||
|
* pixmap
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
DRI2InvalidateWalk(WindowPtr pWin, pointer data)
|
||||||
|
{
|
||||||
|
if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data)
|
||||||
|
return WT_DONTWALKCHILDREN;
|
||||||
|
DRI2InvalidateDrawable(&pWin->drawable);
|
||||||
|
return WT_WALKCHILDREN;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
DRI2InvalidateDrawableAll(DrawablePtr pDraw)
|
||||||
|
{
|
||||||
|
if (pDraw->type == DRAWABLE_WINDOW) {
|
||||||
|
WindowPtr pWin = (WindowPtr) pDraw;
|
||||||
|
PixmapPtr pPixmap = pDraw->pScreen->GetWindowPixmap(pWin);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find the top-most window using this pixmap
|
||||||
|
*/
|
||||||
|
while (pWin->parent &&
|
||||||
|
pDraw->pScreen->GetWindowPixmap(pWin->parent) == pPixmap)
|
||||||
|
pWin = pWin->parent;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Walk the sub-tree to invalidate all of the
|
||||||
|
* windows using the same pixmap
|
||||||
|
*/
|
||||||
|
TraverseTree(pWin, DRI2InvalidateWalk, pPixmap);
|
||||||
|
DRI2InvalidateDrawable(&pPixmap->drawable);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
DRI2InvalidateDrawable(pDraw);
|
||||||
|
}
|
||||||
|
|
||||||
DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
|
DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
|
||||||
{
|
{
|
||||||
DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
|
DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
|
||||||
|
|
@ -831,6 +869,8 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
|
||||||
spix->screen_x = mpix->screen_x;
|
spix->screen_x = mpix->screen_x;
|
||||||
spix->screen_y = mpix->screen_y;
|
spix->screen_y = mpix->screen_y;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
DRI2InvalidateDrawableAll(pDraw);
|
||||||
return &spix->drawable;
|
return &spix->drawable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1048,18 +1088,7 @@ DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* A TraverseTree callback to invalidate all windows using the same
|
|
||||||
* pixmap
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
DRI2InvalidateWalk(WindowPtr pWin, pointer data)
|
|
||||||
{
|
|
||||||
if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data)
|
|
||||||
return WT_DONTWALKCHILDREN;
|
|
||||||
DRI2InvalidateDrawable(&pWin->drawable);
|
|
||||||
return WT_WALKCHILDREN;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
|
DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
|
||||||
|
|
@ -1162,26 +1191,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
|
||||||
*/
|
*/
|
||||||
*swap_target = pPriv->swap_count + pPriv->swapsPending;
|
*swap_target = pPriv->swap_count + pPriv->swapsPending;
|
||||||
|
|
||||||
if (pDraw->type == DRAWABLE_WINDOW) {
|
DRI2InvalidateDrawableAll(pDraw);
|
||||||
WindowPtr pWin = (WindowPtr) pDraw;
|
|
||||||
PixmapPtr pPixmap = pScreen->GetWindowPixmap(pWin);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Find the top-most window using this pixmap
|
|
||||||
*/
|
|
||||||
while (pWin->parent &&
|
|
||||||
pScreen->GetWindowPixmap(pWin->parent) == pPixmap)
|
|
||||||
pWin = pWin->parent;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Walk the sub-tree to invalidate all of the
|
|
||||||
* windows using the same pixmap
|
|
||||||
*/
|
|
||||||
TraverseTree(pWin, DRI2InvalidateWalk, pPixmap);
|
|
||||||
DRI2InvalidateDrawable(&pPixmap->drawable);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
DRI2InvalidateDrawable(pDraw);
|
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ xf86CrtcConfigInit(ScrnInfoPtr scrn, const xf86CrtcConfigFuncsRec * funcs)
|
||||||
config = xnfcalloc(1, sizeof(xf86CrtcConfigRec));
|
config = xnfcalloc(1, sizeof(xf86CrtcConfigRec));
|
||||||
|
|
||||||
config->funcs = funcs;
|
config->funcs = funcs;
|
||||||
|
config->compat_output = -1;
|
||||||
|
|
||||||
scrn->privates[xf86CrtcConfigPrivateIndex].ptr = config;
|
scrn->privates[xf86CrtcConfigPrivateIndex].ptr = config;
|
||||||
}
|
}
|
||||||
|
|
@ -742,16 +743,8 @@ xf86CrtcCloseScreen(ScreenPtr screen)
|
||||||
}
|
}
|
||||||
/* detach any providers */
|
/* detach any providers */
|
||||||
if (config->randr_provider) {
|
if (config->randr_provider) {
|
||||||
if (config->randr_provider->offload_sink) {
|
RRProviderDestroy(config->randr_provider);
|
||||||
DetachOffloadGPU(screen);
|
config->randr_provider = NULL;
|
||||||
config->randr_provider->offload_sink = NULL;
|
|
||||||
}
|
|
||||||
else if (config->randr_provider->output_source) {
|
|
||||||
DetachOutputGPU(screen);
|
|
||||||
config->randr_provider->output_source = NULL;
|
|
||||||
}
|
|
||||||
else if (screen->current_master)
|
|
||||||
DetachUnboundGPU(screen);
|
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
@ -1841,11 +1834,15 @@ SetCompatOutput(xf86CrtcConfigPtr config)
|
||||||
if (compat >= 0) {
|
if (compat >= 0) {
|
||||||
config->compat_output = compat;
|
config->compat_output = compat;
|
||||||
}
|
}
|
||||||
else {
|
else if (config->compat_output >= 0 && config->compat_output < config->num_output) {
|
||||||
/* Don't change the compat output when no valid outputs found */
|
/* Don't change the compat output when no valid outputs found */
|
||||||
output = config->output[config->compat_output];
|
output = config->output[config->compat_output];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* All outputs are disconnected, select one to fake */
|
||||||
|
if (!output && config->num_output)
|
||||||
|
output = config->output[0];
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1885,6 +1885,27 @@ xf86RandR13ConstrainCursorHarder(DeviceIntPtr dev, ScreenPtr screen, int mode, i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xf86RandR14ProviderDestroy(ScreenPtr screen, RRProviderPtr provider)
|
||||||
|
{
|
||||||
|
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
|
||||||
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
|
|
||||||
|
if (config->randr_provider == provider) {
|
||||||
|
if (config->randr_provider->offload_sink) {
|
||||||
|
DetachOffloadGPU(screen);
|
||||||
|
config->randr_provider->offload_sink = NULL;
|
||||||
|
}
|
||||||
|
else if (config->randr_provider->output_source) {
|
||||||
|
DetachOutputGPU(screen);
|
||||||
|
config->randr_provider->output_source = NULL;
|
||||||
|
}
|
||||||
|
else if (screen->current_master)
|
||||||
|
DetachUnboundGPU(screen);
|
||||||
|
}
|
||||||
|
config->randr_provider = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
xf86RandR12Init12(ScreenPtr pScreen)
|
xf86RandR12Init12(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
|
|
@ -1914,6 +1935,7 @@ xf86RandR12Init12(ScreenPtr pScreen)
|
||||||
rp->rrProviderSetProperty = xf86RandR14ProviderSetProperty;
|
rp->rrProviderSetProperty = xf86RandR14ProviderSetProperty;
|
||||||
rp->rrProviderGetProperty = xf86RandR14ProviderGetProperty;
|
rp->rrProviderGetProperty = xf86RandR14ProviderGetProperty;
|
||||||
rp->rrCrtcSetScanoutPixmap = xf86CrtcSetScanoutPixmap;
|
rp->rrCrtcSetScanoutPixmap = xf86CrtcSetScanoutPixmap;
|
||||||
|
rp->rrProviderDestroy = xf86RandR14ProviderDestroy;
|
||||||
|
|
||||||
pScrn->PointerMoved = xf86RandR12PointerMoved;
|
pScrn->PointerMoved = xf86RandR12PointerMoved;
|
||||||
pScrn->ChangeGamma = xf86RandR12ChangeGamma;
|
pScrn->ChangeGamma = xf86RandR12ChangeGamma;
|
||||||
|
|
|
||||||
|
|
@ -421,7 +421,8 @@ xf86FlushInput(int fd)
|
||||||
{
|
{
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
char c[4];
|
/* this needs to be big enough to flush an evdev event. */
|
||||||
|
char c[256];
|
||||||
|
|
||||||
DebugF("FlushingSerial\n");
|
DebugF("FlushingSerial\n");
|
||||||
if (tcflush(fd, TCIFLUSH) == 0)
|
if (tcflush(fd, TCIFLUSH) == 0)
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,10 @@
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_DIX_CONFIG_H
|
||||||
|
#include <dix-config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
|
||||||
|
|
@ -231,13 +231,15 @@ DarwinScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Make PseudoColor visuals not suck in TrueColor mode
|
// TODO: Make PseudoColor visuals not suck in TrueColor mode
|
||||||
// if(dfb->depth > 8)
|
// if(dfb->depth > 8)
|
||||||
// miSetVisualTypesAndMasks(8, PseudoColorMask, 8, PseudoColor, 0, 0, 0);
|
// miSetVisualTypesAndMasks(8, PseudoColorMask, 8, PseudoColor, 0, 0, 0);
|
||||||
if (dfb->depth > 15)
|
//
|
||||||
miSetVisualTypesAndMasks(15, TrueColorMask, 5, TrueColor,
|
// TODO: Re-add support for 15bit
|
||||||
RM_ARGB(0, 5, 5, 5), GM_ARGB(0, 5, 5,
|
// if (dfb->depth > 15)
|
||||||
5),
|
// miSetVisualTypesAndMasks(15, TrueColorMask, 5, TrueColor,
|
||||||
BM_ARGB(0, 5, 5, 5));
|
// RM_ARGB(0, 5, 5, 5), GM_ARGB(0, 5, 5,
|
||||||
|
// 5),
|
||||||
|
// BM_ARGB(0, 5, 5, 5));
|
||||||
if (dfb->depth > 24)
|
if (dfb->depth > 24)
|
||||||
miSetVisualTypesAndMasks(24, TrueColorMask, 8, TrueColor,
|
miSetVisualTypesAndMasks(24, TrueColorMask, 8, TrueColor,
|
||||||
RM_ARGB(0, 8, 8, 8), GM_ARGB(0, 8, 8,
|
RM_ARGB(0, 8, 8, 8), GM_ARGB(0, 8, 8,
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@
|
||||||
#include "mi.h"
|
#include "mi.h"
|
||||||
#include "mipointer.h"
|
#include "mipointer.h"
|
||||||
#include "rootless.h"
|
#include "rootless.h"
|
||||||
|
#include "rootlessCommon.h"
|
||||||
#include "x-hash.h"
|
#include "x-hash.h"
|
||||||
#include "x-hook.h"
|
#include "x-hook.h"
|
||||||
#include "driWrap.h"
|
#include "driWrap.h"
|
||||||
|
|
@ -380,6 +381,11 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id,
|
||||||
DRIDrawablePrivPtr pDRIDrawablePriv;
|
DRIDrawablePrivPtr pDRIDrawablePriv;
|
||||||
|
|
||||||
if (pDrawable->type == DRAWABLE_WINDOW) {
|
if (pDrawable->type == DRAWABLE_WINDOW) {
|
||||||
|
/* <rdar://problem/12338921>
|
||||||
|
* http://bugs.winehq.org/show_bug.cgi?id=31751
|
||||||
|
*/
|
||||||
|
RootlessStopDrawing((WindowPtr)pDrawable, FALSE);
|
||||||
|
|
||||||
pDRIDrawablePriv = CreateSurfaceForWindow(pScreen,
|
pDRIDrawablePriv = CreateSurfaceForWindow(pScreen,
|
||||||
(WindowPtr)pDrawable, &wid);
|
(WindowPtr)pDrawable, &wid);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,10 @@
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG_XP_LOCK_WINDOW
|
||||||
|
#include <execinfo.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DEFINE_ATOM_HELPER(func, atom_name) \
|
#define DEFINE_ATOM_HELPER(func, atom_name) \
|
||||||
static Atom func(void) { \
|
static Atom func(void) { \
|
||||||
static int generation; \
|
static int generation; \
|
||||||
|
|
@ -376,6 +380,18 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
|
||||||
unsigned int rowbytes[2];
|
unsigned int rowbytes[2];
|
||||||
xp_error err;
|
xp_error err;
|
||||||
|
|
||||||
|
#ifdef DEBUG_XP_LOCK_WINDOW
|
||||||
|
void* callstack[128];
|
||||||
|
int i, frames = backtrace(callstack, 128);
|
||||||
|
char** strs = backtrace_symbols(callstack, frames);
|
||||||
|
|
||||||
|
ErrorF("=== LOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid));
|
||||||
|
for (i = 0; i < frames; ++i) {
|
||||||
|
ErrorF(" %s\n", strs[i]);
|
||||||
|
}
|
||||||
|
free(strs);
|
||||||
|
#endif
|
||||||
|
|
||||||
err = xp_lock_window(x_cvt_vptr_to_uint(
|
err = xp_lock_window(x_cvt_vptr_to_uint(
|
||||||
wid), NULL, NULL, data, rowbytes, NULL);
|
wid), NULL, NULL, data, rowbytes, NULL);
|
||||||
if (err != Success)
|
if (err != Success)
|
||||||
|
|
@ -395,6 +411,18 @@ xprStopDrawing(RootlessFrameID wid, Bool flush)
|
||||||
{
|
{
|
||||||
xp_error err;
|
xp_error err;
|
||||||
|
|
||||||
|
#ifdef DEBUG_XP_LOCK_WINDOW
|
||||||
|
void* callstack[128];
|
||||||
|
int i, frames = backtrace(callstack, 128);
|
||||||
|
char** strs = backtrace_symbols(callstack, frames);
|
||||||
|
|
||||||
|
ErrorF("=== UNLOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid));
|
||||||
|
for (i = 0; i < frames; ++i) {
|
||||||
|
ErrorF(" %s\n", strs[i]);
|
||||||
|
}
|
||||||
|
free(strs);
|
||||||
|
#endif
|
||||||
|
|
||||||
err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
|
err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
|
||||||
/* This should be a FatalError, but we started tripping over it. Make it a
|
/* This should be a FatalError, but we started tripping over it. Make it a
|
||||||
* FatalError after http://xquartz.macosforge.org/trac/ticket/482 is fixed.
|
* FatalError after http://xquartz.macosforge.org/trac/ticket/482 is fixed.
|
||||||
|
|
|
||||||
|
|
@ -359,6 +359,10 @@ have_depth:
|
||||||
dfb->blueMask = 0;
|
dfb->blueMask = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// Removed because Mountain Lion removed support for
|
||||||
|
// 15bit backing stores. We can possibly re-add
|
||||||
|
// this once libXplugin is updated to work around it.
|
||||||
case 15:
|
case 15:
|
||||||
dfb->visuals = TrueColorMask; //LARGE_VISUALS;
|
dfb->visuals = TrueColorMask; //LARGE_VISUALS;
|
||||||
dfb->preferredCVC = TrueColor;
|
dfb->preferredCVC = TrueColor;
|
||||||
|
|
@ -369,6 +373,7 @@ have_depth:
|
||||||
dfb->greenMask = GM_ARGB(0, 5, 5, 5);
|
dfb->greenMask = GM_ARGB(0, 5, 5, 5);
|
||||||
dfb->blueMask = BM_ARGB(0, 5, 5, 5);
|
dfb->blueMask = BM_ARGB(0, 5, 5, 5);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
// case 24:
|
// case 24:
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ void XwinExtensionInit(void)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifdef XWIN_GLX_WINDOWS
|
#ifdef XWIN_GLX_WINDOWS
|
||||||
if ((g_fNativeGl) && (serverGeneration == 1)) {
|
if (g_fNativeGl) {
|
||||||
/* install the native GL provider */
|
/* install the native GL provider */
|
||||||
glxWinPushNativeProvider();
|
glxWinPushNativeProvider();
|
||||||
}
|
}
|
||||||
|
|
@ -901,7 +901,8 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
XwinExtensionInit();
|
if (serverGeneration == 1)
|
||||||
|
XwinExtensionInit();
|
||||||
|
|
||||||
/* Log the command line */
|
/* Log the command line */
|
||||||
winLogCommandLine(argc, argv);
|
winLogCommandLine(argc, argv);
|
||||||
|
|
|
||||||
|
|
@ -109,13 +109,16 @@ SRCS = InitInput.c \
|
||||||
winclipboard.h \
|
winclipboard.h \
|
||||||
winconfig.h \
|
winconfig.h \
|
||||||
win.h \
|
win.h \
|
||||||
|
winglobals.h \
|
||||||
winkeybd.h \
|
winkeybd.h \
|
||||||
winkeynames.h \
|
winkeynames.h \
|
||||||
winlayouts.h \
|
winlayouts.h \
|
||||||
winmessages.h \
|
winmessages.h \
|
||||||
|
winmonitors.h \
|
||||||
winmsg.h \
|
winmsg.h \
|
||||||
winms.h \
|
winms.h \
|
||||||
winmultiwindowclass.h \
|
winmultiwindowclass.h \
|
||||||
|
winmultiwindowicons.h \
|
||||||
winprefs.h \
|
winprefs.h \
|
||||||
winresource.h \
|
winresource.h \
|
||||||
winwindow.h \
|
winwindow.h \
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@ libXwinGLX_la_SOURCES = \
|
||||||
glwindows.h \
|
glwindows.h \
|
||||||
glwrap.c \
|
glwrap.c \
|
||||||
indirect.c \
|
indirect.c \
|
||||||
wgl_ext_api.c
|
wgl_ext_api.c \
|
||||||
|
wgl_ext_api.h
|
||||||
|
|
||||||
if XWIN_MULTIWINDOW
|
if XWIN_MULTIWINDOW
|
||||||
DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW
|
DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW
|
||||||
|
|
|
||||||
|
|
@ -560,9 +560,9 @@ extern void TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev);
|
||||||
extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev,
|
extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev,
|
||||||
XID resource);
|
XID resource);
|
||||||
extern Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource);
|
extern Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource);
|
||||||
extern void TouchAddListener(TouchPointInfoPtr ti, XID resource,
|
extern void TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type,
|
||||||
enum InputLevel level, enum TouchListenerType type,
|
enum InputLevel level, enum TouchListenerType type,
|
||||||
enum TouchListenerState state, WindowPtr window);
|
enum TouchListenerState state, WindowPtr window, GrabPtr grab);
|
||||||
extern Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource);
|
extern Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource);
|
||||||
extern void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
extern void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
InternalEvent *ev);
|
InternalEvent *ev);
|
||||||
|
|
@ -579,6 +579,7 @@ extern int TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
int listener, int mode);
|
int listener, int mode);
|
||||||
extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
|
extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
|
||||||
uint32_t touchid, Window grab_window, XID *error);
|
uint32_t touchid, Window grab_window, XID *error);
|
||||||
|
extern void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev);
|
||||||
|
|
||||||
/* misc event helpers */
|
/* misc event helpers */
|
||||||
extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients);
|
extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients);
|
||||||
|
|
@ -627,6 +628,11 @@ extern _X_HIDDEN void valuator_set_mode(DeviceIntPtr dev, int axis, int mode);
|
||||||
xfixes/cursor.c uses it to determine if the cursor is enabled */
|
xfixes/cursor.c uses it to determine if the cursor is enabled */
|
||||||
extern Bool EnableCursor;
|
extern Bool EnableCursor;
|
||||||
|
|
||||||
|
/* Set to FALSE by default - ChangeWindowAttributes sets it to TRUE on
|
||||||
|
* CWCursor, xfixes/cursor.c uses it to determine if the cursor is enabled
|
||||||
|
*/
|
||||||
|
extern Bool CursorVisible;
|
||||||
|
|
||||||
extern _X_EXPORT ValuatorMask *valuator_mask_new(int num_valuators);
|
extern _X_EXPORT ValuatorMask *valuator_mask_new(int num_valuators);
|
||||||
extern _X_EXPORT void valuator_mask_free(ValuatorMask **mask);
|
extern _X_EXPORT void valuator_mask_free(ValuatorMask **mask);
|
||||||
extern _X_EXPORT void valuator_mask_set_range(ValuatorMask *mask,
|
extern _X_EXPORT void valuator_mask_set_range(ValuatorMask *mask,
|
||||||
|
|
|
||||||
|
|
@ -298,6 +298,17 @@ typedef struct _ValuatorClassRec {
|
||||||
int v_scroll_axis; /* vert smooth-scrolling axis */
|
int v_scroll_axis; /* vert smooth-scrolling axis */
|
||||||
} ValuatorClassRec;
|
} ValuatorClassRec;
|
||||||
|
|
||||||
|
typedef struct _TouchListener {
|
||||||
|
XID listener; /* grabs/event selection IDs receiving
|
||||||
|
* events for this touch */
|
||||||
|
int resource_type; /* listener's resource type */
|
||||||
|
enum TouchListenerType type;
|
||||||
|
enum TouchListenerState state;
|
||||||
|
enum InputLevel level; /* matters only for emulating touches */
|
||||||
|
WindowPtr window;
|
||||||
|
GrabPtr grab;
|
||||||
|
} TouchListener;
|
||||||
|
|
||||||
typedef struct _TouchPointInfo {
|
typedef struct _TouchPointInfo {
|
||||||
uint32_t client_id; /* touch ID as seen in client events */
|
uint32_t client_id; /* touch ID as seen in client events */
|
||||||
int sourceid; /* Source device's ID for this touchpoint */
|
int sourceid; /* Source device's ID for this touchpoint */
|
||||||
|
|
@ -306,14 +317,7 @@ typedef struct _TouchPointInfo {
|
||||||
* but still owned by a grab */
|
* but still owned by a grab */
|
||||||
SpriteRec sprite; /* window trace for delivery */
|
SpriteRec sprite; /* window trace for delivery */
|
||||||
ValuatorMask *valuators; /* last recorded axis values */
|
ValuatorMask *valuators; /* last recorded axis values */
|
||||||
struct _TouchListener {
|
TouchListener *listeners; /* set of listeners */
|
||||||
XID listener; /* grabs/event selection IDs receiving
|
|
||||||
* events for this touch */
|
|
||||||
enum TouchListenerType type;
|
|
||||||
enum TouchListenerState state;
|
|
||||||
enum InputLevel level; /* matters only for emulating touches */
|
|
||||||
WindowPtr window;
|
|
||||||
} *listeners;
|
|
||||||
int num_listeners;
|
int num_listeners;
|
||||||
int num_grabs; /* number of open grabs on this touch
|
int num_grabs; /* number of open grabs on this touch
|
||||||
* which have not accepted or rejected */
|
* which have not accepted or rejected */
|
||||||
|
|
@ -323,15 +327,13 @@ typedef struct _TouchPointInfo {
|
||||||
size_t history_size; /* Size of history in elements */
|
size_t history_size; /* Size of history in elements */
|
||||||
} TouchPointInfoRec;
|
} TouchPointInfoRec;
|
||||||
|
|
||||||
typedef struct _TouchListener TouchListener;
|
|
||||||
|
|
||||||
typedef struct _DDXTouchPointInfo {
|
typedef struct _DDXTouchPointInfo {
|
||||||
uint32_t client_id; /* touch ID as seen in client events */
|
uint32_t client_id; /* touch ID as seen in client events */
|
||||||
Bool active; /* whether or not the touch is active */
|
Bool active; /* whether or not the touch is active */
|
||||||
uint32_t ddx_id; /* touch ID given by the DDX */
|
uint32_t ddx_id; /* touch ID given by the DDX */
|
||||||
Bool emulate_pointer;
|
Bool emulate_pointer;
|
||||||
|
|
||||||
ValuatorMask *valuators; /* last recorded axis values */
|
ValuatorMask *valuators; /* last axis values as posted, pre-transform */
|
||||||
} DDXTouchPointInfoRec;
|
} DDXTouchPointInfoRec;
|
||||||
|
|
||||||
typedef struct _TouchClassRec {
|
typedef struct _TouchClassRec {
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
/* RandR */
|
/* RandR */
|
||||||
#define SERVER_RANDR_MAJOR_VERSION 1
|
#define SERVER_RANDR_MAJOR_VERSION 1
|
||||||
#define SERVER_RANDR_MINOR_VERSION 3
|
#define SERVER_RANDR_MINOR_VERSION 4
|
||||||
|
|
||||||
/* Record */
|
/* Record */
|
||||||
#define SERVER_RECORD_MAJOR_VERSION 1
|
#define SERVER_RECORD_MAJOR_VERSION 1
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,7 @@ typedef struct _XkbSrvInfo {
|
||||||
KeyCode mouseKey;
|
KeyCode mouseKey;
|
||||||
KeyCode inactiveKey;
|
KeyCode inactiveKey;
|
||||||
KeyCode slowKey;
|
KeyCode slowKey;
|
||||||
|
KeyCode slowKeyEnableKey;
|
||||||
KeyCode repeatKey;
|
KeyCode repeatKey;
|
||||||
CARD8 krgTimerActive;
|
CARD8 krgTimerActive;
|
||||||
CARD8 beepType;
|
CARD8 beepType;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ AC_DEFUN([XORG_TLS], [
|
||||||
ac_cv_tls=none
|
ac_cv_tls=none
|
||||||
keywords="__thread __declspec(thread)"
|
keywords="__thread __declspec(thread)"
|
||||||
for kw in $keywords ; do
|
for kw in $keywords ; do
|
||||||
AC_TRY_COMPILE([int $kw test;], [], ac_cv_tls=$kw)
|
AC_TRY_COMPILE([int $kw test;], [], ac_cv_tls=$kw ; break ;)
|
||||||
done
|
done
|
||||||
])
|
])
|
||||||
AC_MSG_RESULT($ac_cv_tls)
|
AC_MSG_RESULT($ac_cv_tls)
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ causes the server to generate a core dump on fatal errors.
|
||||||
.B \-displayfd \fIfd\fP
|
.B \-displayfd \fIfd\fP
|
||||||
specifies a file descriptor in the launching process. Rather than specify
|
specifies a file descriptor in the launching process. Rather than specify
|
||||||
a display number, the X server will attempt to listen on successively higher
|
a display number, the X server will attempt to listen on successively higher
|
||||||
display numbers, and upon finding a free one, will write the port number back
|
display numbers, and upon finding a free one, will write the display number back
|
||||||
on this file descriptor as a newline-terminated string. The \-pn option is
|
on this file descriptor as a newline-terminated string. The \-pn option is
|
||||||
ignored when using \-displayfd.
|
ignored when using \-displayfd.
|
||||||
.TP 8
|
.TP 8
|
||||||
|
|
|
||||||
|
|
@ -623,7 +623,11 @@ mieqProcessInputEvents(void)
|
||||||
mieqProcessDeviceEvent(dev, &event, screen);
|
mieqProcessDeviceEvent(dev, &event, screen);
|
||||||
|
|
||||||
/* Update the sprite now. Next event may be from different device. */
|
/* Update the sprite now. Next event may be from different device. */
|
||||||
if (event.any.type == ET_Motion && master)
|
if (master &&
|
||||||
|
(event.any.type == ET_Motion ||
|
||||||
|
((event.any.type == ET_TouchBegin ||
|
||||||
|
event.any.type == ET_TouchUpdate) &&
|
||||||
|
event.device_event.flags & TOUCH_POINTER_EMULATED)))
|
||||||
miPointerUpdateSprite(dev);
|
miPointerUpdateSprite(dev);
|
||||||
|
|
||||||
#ifdef XQUARTZ
|
#ifdef XQUARTZ
|
||||||
|
|
|
||||||
|
|
@ -212,10 +212,12 @@ EnableDisableExtension(const char *name, Bool enable)
|
||||||
void
|
void
|
||||||
EnableDisableExtensionError(const char *name, Bool enable)
|
EnableDisableExtensionError(const char *name, Bool enable)
|
||||||
{
|
{
|
||||||
ExtensionToggle *ext = &ExtensionToggleList[0];
|
ExtensionToggle *ext;
|
||||||
|
int i;
|
||||||
Bool found = FALSE;
|
Bool found = FALSE;
|
||||||
|
|
||||||
for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++) {
|
for (i = 0; i < ARRAY_SIZE(ExtensionToggleList); i++) {
|
||||||
|
ext = &ExtensionToggleList[i];
|
||||||
if ((strcmp(name, ext->name) == 0) && (ext->disablePtr == NULL)) {
|
if ((strcmp(name, ext->name) == 0) && (ext->disablePtr == NULL)) {
|
||||||
ErrorF("[mi] Extension \"%s\" can not be disabled\n", name);
|
ErrorF("[mi] Extension \"%s\" can not be disabled\n", name);
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
|
|
@ -226,7 +228,8 @@ EnableDisableExtensionError(const char *name, Bool enable)
|
||||||
ErrorF("[mi] Extension \"%s\" is not recognized\n", name);
|
ErrorF("[mi] Extension \"%s\" is not recognized\n", name);
|
||||||
ErrorF("[mi] Only the following extensions can be run-time %s:\n",
|
ErrorF("[mi] Only the following extensions can be run-time %s:\n",
|
||||||
enable ? "enabled" : "disabled");
|
enable ? "enabled" : "disabled");
|
||||||
for (ext = &ExtensionToggleList[0]; ext->name != NULL; ext++) {
|
for (i = 0; i < ARRAY_SIZE(ExtensionToggleList); i++) {
|
||||||
|
ext = &ExtensionToggleList[i];
|
||||||
if (ext->disablePtr != NULL) {
|
if (ext->disablePtr != NULL) {
|
||||||
ErrorF("[mi] %s\n", ext->name);
|
ErrorF("[mi] %s\n", ext->name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_DIX_CONFIG_H
|
||||||
|
#include <dix-config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
||||||
|
|
@ -264,6 +264,8 @@ RRInit(void)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!RROutputInit())
|
if (!RROutputInit())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
if (!RRProviderInit())
|
||||||
|
return FALSE;
|
||||||
RRGeneration = serverGeneration;
|
RRGeneration = serverGeneration;
|
||||||
}
|
}
|
||||||
if (!dixRegisterPrivateKey(&rrPrivKeyRec, PRIVATE_SCREEN, 0))
|
if (!dixRegisterPrivateKey(&rrPrivKeyRec, PRIVATE_SCREEN, 0))
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
#define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */
|
#define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */
|
||||||
#define RANDR_GET_CRTC_INTERFACE 1
|
#define RANDR_GET_CRTC_INTERFACE 1
|
||||||
|
|
||||||
#define RANDR_INTERFACE_VERSION 0x0103
|
#define RANDR_INTERFACE_VERSION 0x0104
|
||||||
|
|
||||||
typedef XID RRMode;
|
typedef XID RRMode;
|
||||||
typedef XID RROutput;
|
typedef XID RROutput;
|
||||||
|
|
@ -232,6 +232,9 @@ typedef Bool (*RRProviderSetOffloadSinkProcPtr)(ScreenPtr pScreen,
|
||||||
RRProviderPtr offload_sink);
|
RRProviderPtr offload_sink);
|
||||||
|
|
||||||
|
|
||||||
|
typedef void (*RRProviderDestroyProcPtr)(ScreenPtr pScreen,
|
||||||
|
RRProviderPtr provider);
|
||||||
|
|
||||||
/* These are for 1.0 compatibility */
|
/* These are for 1.0 compatibility */
|
||||||
|
|
||||||
typedef struct _rrRefresh {
|
typedef struct _rrRefresh {
|
||||||
|
|
@ -330,6 +333,9 @@ typedef struct _rrScrPriv {
|
||||||
Bool discontiguous;
|
Bool discontiguous;
|
||||||
|
|
||||||
RRProviderPtr provider;
|
RRProviderPtr provider;
|
||||||
|
|
||||||
|
RRProviderDestroyProcPtr rrProviderDestroy;
|
||||||
|
|
||||||
} rrScrPrivRec, *rrScrPrivPtr;
|
} rrScrPrivRec, *rrScrPrivPtr;
|
||||||
|
|
||||||
extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec;
|
extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec;
|
||||||
|
|
|
||||||
|
|
@ -372,6 +372,11 @@ RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc)
|
||||||
ret = pScrPriv->rrCrtcSetScanoutPixmap(crtc, NULL);
|
ret = pScrPriv->rrCrtcSetScanoutPixmap(crtc, NULL);
|
||||||
if (crtc->scanout_pixmap) {
|
if (crtc->scanout_pixmap) {
|
||||||
master->StopPixmapTracking(mscreenpix, crtc->scanout_pixmap);
|
master->StopPixmapTracking(mscreenpix, crtc->scanout_pixmap);
|
||||||
|
/*
|
||||||
|
* Unref the pixmap twice: once for the original reference, and once
|
||||||
|
* for the reference implicitly added by PixmapShareToSlave.
|
||||||
|
*/
|
||||||
|
master->DestroyPixmap(crtc->scanout_pixmap->master_pixmap);
|
||||||
master->DestroyPixmap(crtc->scanout_pixmap->master_pixmap);
|
master->DestroyPixmap(crtc->scanout_pixmap->master_pixmap);
|
||||||
crtc->pScreen->DestroyPixmap(crtc->scanout_pixmap);
|
crtc->pScreen->DestroyPixmap(crtc->scanout_pixmap);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -389,6 +389,8 @@ RRProviderDestroyResource (pointer value, XID pid)
|
||||||
{
|
{
|
||||||
rrScrPriv(pScreen);
|
rrScrPriv(pScreen);
|
||||||
|
|
||||||
|
if (pScrPriv->rrProviderDestroy)
|
||||||
|
(*pScrPriv->rrProviderDestroy)(pScreen, provider);
|
||||||
pScrPriv->provider = NULL;
|
pScrPriv->provider = NULL;
|
||||||
}
|
}
|
||||||
free(provider);
|
free(provider);
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,8 @@ AnimCurScreenBlockHandler(ScreenPtr pScreen,
|
||||||
Bool activeDevice = FALSE;
|
Bool activeDevice = FALSE;
|
||||||
CARD32 now = 0, soonest = ~0; /* earliest time to wakeup again */
|
CARD32 now = 0, soonest = ~0; /* earliest time to wakeup again */
|
||||||
|
|
||||||
|
Unwrap(as, pScreen, BlockHandler);
|
||||||
|
|
||||||
for (dev = inputInfo.devices; dev; dev = dev->next) {
|
for (dev = inputInfo.devices; dev; dev = dev->next) {
|
||||||
if (IsPointerDevice(dev) && pScreen == dev->spriteInfo->anim.pScreen) {
|
if (IsPointerDevice(dev) && pScreen == dev->spriteInfo->anim.pScreen) {
|
||||||
if (!activeDevice) {
|
if (!activeDevice) {
|
||||||
|
|
@ -180,7 +182,6 @@ AnimCurScreenBlockHandler(ScreenPtr pScreen,
|
||||||
if (activeDevice)
|
if (activeDevice)
|
||||||
AdjustWaitForDelay(pTimeout, soonest - now);
|
AdjustWaitForDelay(pTimeout, soonest - now);
|
||||||
|
|
||||||
Unwrap(as, pScreen, BlockHandler);
|
|
||||||
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
|
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
|
||||||
if (activeDevice)
|
if (activeDevice)
|
||||||
Wrap(as, pScreen, BlockHandler, AnimCurScreenBlockHandler);
|
Wrap(as, pScreen, BlockHandler, AnimCurScreenBlockHandler);
|
||||||
|
|
|
||||||
|
|
@ -139,8 +139,7 @@ typedef struct _CursorScreen {
|
||||||
#define Unwrap(as,s,elt,backup) (((backup) = (s)->elt), (s)->elt = (as)->elt)
|
#define Unwrap(as,s,elt,backup) (((backup) = (s)->elt), (s)->elt = (as)->elt)
|
||||||
|
|
||||||
/* The cursor doesn't show up until the first XDefineCursor() */
|
/* The cursor doesn't show up until the first XDefineCursor() */
|
||||||
static Bool CursorVisible = FALSE;
|
Bool CursorVisible = FALSE;
|
||||||
|
|
||||||
Bool EnableCursor = TRUE;
|
Bool EnableCursor = TRUE;
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
|
|
@ -152,12 +151,7 @@ CursorDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||||
|
|
||||||
Unwrap(cs, pScreen, DisplayCursor, backupProc);
|
Unwrap(cs, pScreen, DisplayCursor, backupProc);
|
||||||
|
|
||||||
/*
|
CursorVisible = CursorVisible && EnableCursor;
|
||||||
* Have to check ConnectionInfo to distinguish client requests from
|
|
||||||
* initial root window setup. Not a great way to do it, I admit.
|
|
||||||
*/
|
|
||||||
if (ConnectionInfo)
|
|
||||||
CursorVisible = EnableCursor;
|
|
||||||
|
|
||||||
if (cs->pCursorHideCounts != NULL || !CursorVisible) {
|
if (cs->pCursorHideCounts != NULL || !CursorVisible) {
|
||||||
ret = (*pScreen->DisplayCursor) (pDev, pScreen, NullCursor);
|
ret = (*pScreen->DisplayCursor) (pDev, pScreen, NullCursor);
|
||||||
|
|
@ -1090,7 +1084,11 @@ barrier_is_blocking(const struct PointerBarrier * barrier,
|
||||||
if (dir & BarrierNegativeX && x1 == (barrier->x1 - 1))
|
if (dir & BarrierNegativeX && x1 == (barrier->x1 - 1))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
/* startpoint adjacent to barrier, moving towards -> block */
|
/* startpoint adjacent to barrier, moving towards -> block */
|
||||||
if (x1 == barrier->x1 && y1 >= barrier->y1 && y1 <= barrier->y2) {
|
if (dir & BarrierPositiveX && x1 == (barrier->x1 - 1) && y1 >= barrier->y1 && y1 <= barrier->y2) {
|
||||||
|
*distance = 0;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
if (dir & BarrierNegativeX && x1 == barrier->x1 && y1 >= barrier->y1 && y1 <= barrier->y2) {
|
||||||
*distance = 0;
|
*distance = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
@ -1102,7 +1100,11 @@ barrier_is_blocking(const struct PointerBarrier * barrier,
|
||||||
if (dir & BarrierNegativeY && y1 == (barrier->y1 - 1))
|
if (dir & BarrierNegativeY && y1 == (barrier->y1 - 1))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
/* startpoint adjacent to barrier, moving towards -> block */
|
/* startpoint adjacent to barrier, moving towards -> block */
|
||||||
if (y1 == barrier->y1 && x1 >= barrier->x1 && x1 <= barrier->x2) {
|
if (dir & BarrierPositiveY && y1 == (barrier->y1 - 1) && x1 >= barrier->x1 && x1 <= barrier->x2) {
|
||||||
|
*distance = 0;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
if (dir & BarrierNegativeY && y1 == barrier->y1 && x1 >= barrier->x1 && x1 <= barrier->x2) {
|
||||||
*distance = 0;
|
*distance = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ ProcXFixesQueryVersion(ClientPtr client)
|
||||||
|
|
||||||
if (version_compare(stuff->majorVersion, stuff->minorVersion,
|
if (version_compare(stuff->majorVersion, stuff->minorVersion,
|
||||||
SERVER_XFIXES_MAJOR_VERSION,
|
SERVER_XFIXES_MAJOR_VERSION,
|
||||||
SERVER_XFIXES_MAJOR_VERSION) < 0) {
|
SERVER_XFIXES_MINOR_VERSION) < 0) {
|
||||||
rep.majorVersion = stuff->majorVersion;
|
rep.majorVersion = stuff->majorVersion;
|
||||||
rep.minorVersion = stuff->minorVersion;
|
rep.minorVersion = stuff->minorVersion;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -291,8 +291,8 @@ AccessXKRGExpire(OsTimerPtr timer, CARD32 now, pointer arg)
|
||||||
return 4000;
|
return 4000;
|
||||||
}
|
}
|
||||||
xkbi->krgTimerActive = _OFF_TIMER;
|
xkbi->krgTimerActive = _OFF_TIMER;
|
||||||
cn.keycode = 0;
|
cn.keycode = xkbi->slowKeyEnableKey;
|
||||||
cn.eventType = 0;
|
cn.eventType = KeyPress;
|
||||||
cn.requestMajor = 0;
|
cn.requestMajor = 0;
|
||||||
cn.requestMinor = 0;
|
cn.requestMinor = 0;
|
||||||
if (xkbi->desc->ctrls->enabled_ctrls & XkbSlowKeysMask) {
|
if (xkbi->desc->ctrls->enabled_ctrls & XkbSlowKeysMask) {
|
||||||
|
|
@ -304,6 +304,7 @@ AccessXKRGExpire(OsTimerPtr timer, CARD32 now, pointer arg)
|
||||||
LogMessage(X_INFO, "XKB SlowKeys are now enabled. Hold shift to disable.\n");
|
LogMessage(X_INFO, "XKB SlowKeys are now enabled. Hold shift to disable.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xkbi->slowKeyEnableKey = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -462,6 +463,7 @@ AccessXFilterPressEvent(DeviceEvent *event, DeviceIntPtr keybd)
|
||||||
if (ctrls->enabled_ctrls & XkbAccessXKeysMask) {
|
if (ctrls->enabled_ctrls & XkbAccessXKeysMask) {
|
||||||
/* check for magic sequences */
|
/* check for magic sequences */
|
||||||
if ((sym[0] == XK_Shift_R) || (sym[0] == XK_Shift_L)) {
|
if ((sym[0] == XK_Shift_R) || (sym[0] == XK_Shift_L)) {
|
||||||
|
xkbi->slowKeyEnableKey = key;
|
||||||
if (XkbAX_NeedFeedback(ctrls, XkbAX_SlowWarnFBMask)) {
|
if (XkbAX_NeedFeedback(ctrls, XkbAX_SlowWarnFBMask)) {
|
||||||
xkbi->krgTimerActive = _KRG_WARN_TIMER;
|
xkbi->krgTimerActive = _KRG_WARN_TIMER;
|
||||||
xkbi->krgTimer = TimerSet(xkbi->krgTimer, 0, 4000,
|
xkbi->krgTimer = TimerSet(xkbi->krgTimer, 0, 4000,
|
||||||
|
|
@ -709,7 +711,7 @@ ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse)
|
||||||
xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse);
|
xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse);
|
||||||
DeviceEvent *event = &ev->device_event;
|
DeviceEvent *event = &ev->device_event;
|
||||||
|
|
||||||
dev = IsFloating(mouse) ? mouse : GetMaster(mouse, MASTER_KEYBOARD);
|
dev = (IsMaster(mouse) || IsFloating(mouse)) ? mouse : GetMaster(mouse, MASTER_KEYBOARD);
|
||||||
|
|
||||||
if (dev && dev->key) {
|
if (dev && dev->key) {
|
||||||
xkbi = dev->key->xkbInfo;
|
xkbi = dev->key->xkbInfo;
|
||||||
|
|
@ -721,23 +723,27 @@ ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse)
|
||||||
changed |= XkbPointerButtonMask;
|
changed |= XkbPointerButtonMask;
|
||||||
}
|
}
|
||||||
else if (event->type == ET_ButtonRelease) {
|
else if (event->type == ET_ButtonRelease) {
|
||||||
if (xkbi) {
|
if (IsMaster(dev)) {
|
||||||
xkbi->lockedPtrButtons &= ~(1 << (event->detail.key & 0x7));
|
DeviceIntPtr source;
|
||||||
|
int rc;
|
||||||
|
|
||||||
if (IsMaster(dev)) {
|
rc = dixLookupDevice(&source, event->sourceid, serverClient,
|
||||||
DeviceIntPtr source;
|
DixWriteAccess);
|
||||||
int rc;
|
if (rc != Success)
|
||||||
|
ErrorF("[xkb] bad sourceid '%d' on button release event.\n",
|
||||||
|
event->sourceid);
|
||||||
|
else if (!IsXTestDevice(source, GetMaster(dev, MASTER_POINTER))) {
|
||||||
|
DeviceIntPtr xtest_device;
|
||||||
|
|
||||||
rc = dixLookupDevice(&source, event->sourceid, serverClient,
|
xtest_device = GetXTestDevice(GetMaster(dev, MASTER_POINTER));
|
||||||
DixWriteAccess);
|
if (button_is_down(xtest_device, ev->device_event.detail.button, BUTTON_PROCESSED))
|
||||||
if (rc != Success)
|
|
||||||
ErrorF("[xkb] bad sourceid '%d' on button release event.\n",
|
|
||||||
event->sourceid);
|
|
||||||
else if (!IsXTestDevice(source, GetMaster(dev, MASTER_POINTER)))
|
|
||||||
XkbFakeDeviceButton(dev, FALSE, event->detail.key);
|
XkbFakeDeviceButton(dev, FALSE, event->detail.key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (xkbi)
|
||||||
|
xkbi->lockedPtrButtons &= ~(1 << (event->detail.key & 0x7));
|
||||||
|
|
||||||
changed |= XkbPointerButtonMask;
|
changed |= XkbPointerButtonMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -642,6 +642,7 @@ XkbComputeCompatState(XkbSrvInfoPtr xkbi)
|
||||||
CARD16 grp_mask;
|
CARD16 grp_mask;
|
||||||
XkbStatePtr state = &xkbi->state;
|
XkbStatePtr state = &xkbi->state;
|
||||||
XkbCompatMapPtr map;
|
XkbCompatMapPtr map;
|
||||||
|
XkbControlsPtr ctrls;
|
||||||
|
|
||||||
if (!state || !xkbi->desc || !xkbi->desc->ctrls || !xkbi->desc->compat)
|
if (!state || !xkbi->desc || !xkbi->desc->ctrls || !xkbi->desc->compat)
|
||||||
return;
|
return;
|
||||||
|
|
@ -650,9 +651,14 @@ XkbComputeCompatState(XkbSrvInfoPtr xkbi)
|
||||||
grp_mask = map->groups[state->group].mask;
|
grp_mask = map->groups[state->group].mask;
|
||||||
state->compat_state = state->mods | grp_mask;
|
state->compat_state = state->mods | grp_mask;
|
||||||
state->compat_lookup_mods = state->lookup_mods | grp_mask;
|
state->compat_lookup_mods = state->lookup_mods | grp_mask;
|
||||||
|
ctrls= xkbi->desc->ctrls;
|
||||||
|
|
||||||
if (xkbi->desc->ctrls->enabled_ctrls & XkbIgnoreGroupLockMask)
|
if (ctrls->enabled_ctrls & XkbIgnoreGroupLockMask) {
|
||||||
grp_mask = map->groups[state->base_group].mask;
|
unsigned char grp = state->base_group+state->latched_group;
|
||||||
|
if (grp >= ctrls->num_groups)
|
||||||
|
grp = XkbAdjustGroup(XkbCharToInt(grp), ctrls);
|
||||||
|
grp_mask = map->groups[grp].mask;
|
||||||
|
}
|
||||||
state->compat_grab_mods = state->grab_mods | grp_mask;
|
state->compat_grab_mods = state->grab_mods | grp_mask;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue