Merge branch 'master' into XACE-SELINUX
Conflicts: dix/devices.c
This commit is contained in:
commit
27612748e0
1717
GL/apple/indirect.c
1717
GL/apple/indirect.c
File diff suppressed because it is too large
Load Diff
12
Xi/allowev.c
12
Xi/allowev.c
|
@ -56,13 +56,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -103,10 +100,8 @@ ProcXAllowDeviceEvents(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
|
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
|
||||||
|
|
||||||
thisdev = LookupDeviceIntRec(stuff->deviceid);
|
thisdev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (thisdev == NULL) {
|
if (thisdev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
time = ClientTimeToServerTime(stuff->time);
|
time = ClientTimeToServerTime(stuff->time);
|
||||||
|
|
||||||
switch (stuff->mode) {
|
switch (stuff->mode) {
|
||||||
|
@ -129,9 +124,8 @@ ProcXAllowDeviceEvents(ClientPtr client)
|
||||||
AllowSome(client, time, thisdev, THAWED_BOTH);
|
AllowSome(client, time, thisdev, THAWED_BOTH);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadValue);
|
|
||||||
client->errorValue = stuff->mode;
|
client->errorValue = stuff->mode;
|
||||||
return Success;
|
return BadValue;
|
||||||
}
|
}
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
15
Xi/chgdctl.c
15
Xi/chgdctl.c
|
@ -56,14 +56,11 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h> /* control constants */
|
#include <X11/extensions/XIproto.h> /* control constants */
|
||||||
#include "XIstubs.h"
|
#include "XIstubs.h"
|
||||||
|
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
|
@ -153,11 +150,8 @@ ProcXChangeDeviceControl(ClientPtr client)
|
||||||
a = &dev->valuator->axes[r->first_valuator];
|
a = &dev->valuator->axes[r->first_valuator];
|
||||||
for (i = 0; i < r->num_valuators; i++)
|
for (i = 0; i < r->num_valuators; i++)
|
||||||
if (*(resolution + i) < (a + i)->min_resolution ||
|
if (*(resolution + i) < (a + i)->min_resolution ||
|
||||||
*(resolution + i) > (a + i)->max_resolution) {
|
*(resolution + i) > (a + i)->max_resolution)
|
||||||
SendErrorToClient(client, IReqCode,
|
return BadValue;
|
||||||
X_ChangeDeviceControl, 0, BadValue);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
for (i = 0; i < r->num_valuators; i++)
|
for (i = 0; i < r->num_valuators; i++)
|
||||||
(a++)->resolution = *resolution++;
|
(a++)->resolution = *resolution++;
|
||||||
|
|
||||||
|
@ -269,11 +263,8 @@ out:
|
||||||
|
|
||||||
WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep);
|
WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0, ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Success;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
167
Xi/chgfctl.c
167
Xi/chgfctl.c
|
@ -56,13 +56,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h> /* control constants */
|
#include <X11/extensions/XIproto.h> /* control constants */
|
||||||
|
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -119,9 +116,7 @@ ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||||
t = defaultKeyboardControl.click;
|
t = defaultKeyboardControl.click;
|
||||||
else if (t < 0 || t > 100) {
|
else if (t < 0 || t > 100) {
|
||||||
client->errorValue = t;
|
client->errorValue = t;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
kctrl.click = t;
|
kctrl.click = t;
|
||||||
}
|
}
|
||||||
|
@ -132,9 +127,7 @@ ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||||
t = defaultKeyboardControl.bell;
|
t = defaultKeyboardControl.bell;
|
||||||
else if (t < 0 || t > 100) {
|
else if (t < 0 || t > 100) {
|
||||||
client->errorValue = t;
|
client->errorValue = t;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
kctrl.bell = t;
|
kctrl.bell = t;
|
||||||
}
|
}
|
||||||
|
@ -145,9 +138,7 @@ ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||||
t = defaultKeyboardControl.bell_pitch;
|
t = defaultKeyboardControl.bell_pitch;
|
||||||
else if (t < 0) {
|
else if (t < 0) {
|
||||||
client->errorValue = t;
|
client->errorValue = t;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
kctrl.bell_pitch = t;
|
kctrl.bell_pitch = t;
|
||||||
}
|
}
|
||||||
|
@ -158,9 +149,7 @@ ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||||
t = defaultKeyboardControl.bell_duration;
|
t = defaultKeyboardControl.bell_duration;
|
||||||
else if (t < 0) {
|
else if (t < 0) {
|
||||||
client->errorValue = t;
|
client->errorValue = t;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
kctrl.bell_duration = t;
|
kctrl.bell_duration = t;
|
||||||
}
|
}
|
||||||
|
@ -174,15 +163,10 @@ ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||||
key = (KeyCode) f->key;
|
key = (KeyCode) f->key;
|
||||||
if (key < 8 || key > 255) {
|
if (key < 8 || key > 255) {
|
||||||
client->errorValue = key;
|
client->errorValue = key;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
if (!(mask & DvAutoRepeatMode)) {
|
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
|
||||||
BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
if (!(mask & DvAutoRepeatMode))
|
||||||
|
return BadMatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mask & DvAutoRepeatMode) {
|
if (mask & DvAutoRepeatMode) {
|
||||||
|
@ -210,9 +194,7 @@ ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||||
(defaultKeyboardControl.autoRepeats[inx] & kmask);
|
(defaultKeyboardControl.autoRepeats[inx] & kmask);
|
||||||
} else {
|
} else {
|
||||||
client->errorValue = t;
|
client->errorValue = t;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,9 +232,7 @@ ChangePtrFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||||
pctrl.num = defaultPointerControl.num;
|
pctrl.num = defaultPointerControl.num;
|
||||||
else if (accelNum < 0) {
|
else if (accelNum < 0) {
|
||||||
client->errorValue = accelNum;
|
client->errorValue = accelNum;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
} else
|
} else
|
||||||
pctrl.num = accelNum;
|
pctrl.num = accelNum;
|
||||||
}
|
}
|
||||||
|
@ -265,9 +245,7 @@ ChangePtrFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||||
pctrl.den = defaultPointerControl.den;
|
pctrl.den = defaultPointerControl.den;
|
||||||
else if (accelDenom <= 0) {
|
else if (accelDenom <= 0) {
|
||||||
client->errorValue = accelDenom;
|
client->errorValue = accelDenom;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
} else
|
} else
|
||||||
pctrl.den = accelDenom;
|
pctrl.den = accelDenom;
|
||||||
}
|
}
|
||||||
|
@ -280,9 +258,7 @@ ChangePtrFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask,
|
||||||
pctrl.threshold = defaultPointerControl.threshold;
|
pctrl.threshold = defaultPointerControl.threshold;
|
||||||
else if (threshold < 0) {
|
else if (threshold < 0) {
|
||||||
client->errorValue = threshold;
|
client->errorValue = threshold;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
} else
|
} else
|
||||||
pctrl.threshold = threshold;
|
pctrl.threshold = threshold;
|
||||||
}
|
}
|
||||||
|
@ -341,21 +317,16 @@ ChangeStringFeedback(ClientPtr client, DeviceIntPtr dev,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (f->num_keysyms > s->ctrl.max_symbols) {
|
if (f->num_keysyms > s->ctrl.max_symbols)
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
sup_syms = s->ctrl.symbols_supported;
|
sup_syms = s->ctrl.symbols_supported;
|
||||||
for (i = 0; i < f->num_keysyms; i++) {
|
for (i = 0; i < f->num_keysyms; i++) {
|
||||||
for (j = 0; j < s->ctrl.num_symbols_supported; j++)
|
for (j = 0; j < s->ctrl.num_symbols_supported; j++)
|
||||||
if (*(syms + i) == *(sup_syms + j))
|
if (*(syms + i) == *(sup_syms + j))
|
||||||
break;
|
break;
|
||||||
if (j == s->ctrl.num_symbols_supported) {
|
if (j == s->ctrl.num_symbols_supported)
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadMatch;
|
||||||
BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s->ctrl.num_symbols_displayed = f->num_keysyms;
|
s->ctrl.num_symbols_displayed = f->num_keysyms;
|
||||||
|
@ -393,9 +364,7 @@ ChangeBellFeedback(ClientPtr client, DeviceIntPtr dev,
|
||||||
t = defaultKeyboardControl.bell;
|
t = defaultKeyboardControl.bell;
|
||||||
else if (t < 0 || t > 100) {
|
else if (t < 0 || t > 100) {
|
||||||
client->errorValue = t;
|
client->errorValue = t;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
bctrl.percent = t;
|
bctrl.percent = t;
|
||||||
}
|
}
|
||||||
|
@ -406,9 +375,7 @@ ChangeBellFeedback(ClientPtr client, DeviceIntPtr dev,
|
||||||
t = defaultKeyboardControl.bell_pitch;
|
t = defaultKeyboardControl.bell_pitch;
|
||||||
else if (t < 0) {
|
else if (t < 0) {
|
||||||
client->errorValue = t;
|
client->errorValue = t;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
bctrl.pitch = t;
|
bctrl.pitch = t;
|
||||||
}
|
}
|
||||||
|
@ -419,9 +386,7 @@ ChangeBellFeedback(ClientPtr client, DeviceIntPtr dev,
|
||||||
t = defaultKeyboardControl.bell_duration;
|
t = defaultKeyboardControl.bell_duration;
|
||||||
else if (t < 0) {
|
else if (t < 0) {
|
||||||
client->errorValue = t;
|
client->errorValue = t;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadValue;
|
||||||
BadValue);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
bctrl.duration = t;
|
bctrl.duration = t;
|
||||||
}
|
}
|
||||||
|
@ -485,38 +450,27 @@ ProcXChangeFeedbackControl(ClientPtr client)
|
||||||
|
|
||||||
len = stuff->length - (sizeof(xChangeFeedbackControlReq) >> 2);
|
len = stuff->length - (sizeof(xChangeFeedbackControlReq) >> 2);
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (stuff->feedbackid) {
|
switch (stuff->feedbackid) {
|
||||||
case KbdFeedbackClass:
|
case KbdFeedbackClass:
|
||||||
if (len != (sizeof(xKbdFeedbackCtl) >> 2)) {
|
if (len != (sizeof(xKbdFeedbackCtl) >> 2))
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
return BadLength;
|
||||||
0, BadLength);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
for (k = dev->kbdfeed; k; k = k->next)
|
for (k = dev->kbdfeed; k; k = k->next)
|
||||||
if (k->ctrl.id == ((xKbdFeedbackCtl *) & stuff[1])->id) {
|
if (k->ctrl.id == ((xKbdFeedbackCtl *) & stuff[1])->id)
|
||||||
ChangeKbdFeedback(client, dev, stuff->mask, k,
|
return ChangeKbdFeedback(client, dev, stuff->mask, k,
|
||||||
(xKbdFeedbackCtl *) & stuff[1]);
|
(xKbdFeedbackCtl *) & stuff[1]);
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case PtrFeedbackClass:
|
case PtrFeedbackClass:
|
||||||
if (len != (sizeof(xPtrFeedbackCtl) >> 2)) {
|
if (len != (sizeof(xPtrFeedbackCtl) >> 2))
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
return BadLength;
|
||||||
0, BadLength);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
for (p = dev->ptrfeed; p; p = p->next)
|
for (p = dev->ptrfeed; p; p = p->next)
|
||||||
if (p->ctrl.id == ((xPtrFeedbackCtl *) & stuff[1])->id) {
|
if (p->ctrl.id == ((xPtrFeedbackCtl *) & stuff[1])->id)
|
||||||
ChangePtrFeedback(client, dev, stuff->mask, p,
|
return ChangePtrFeedback(client, dev, stuff->mask, p,
|
||||||
(xPtrFeedbackCtl *) & stuff[1]);
|
(xPtrFeedbackCtl *) & stuff[1]);
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case StringFeedbackClass:
|
case StringFeedbackClass:
|
||||||
{
|
{
|
||||||
|
@ -526,63 +480,46 @@ ProcXChangeFeedbackControl(ClientPtr client)
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&f->num_keysyms, n);
|
swaps(&f->num_keysyms, n);
|
||||||
}
|
}
|
||||||
if (len != ((sizeof(xStringFeedbackCtl) >> 2) + f->num_keysyms)) {
|
if (len != ((sizeof(xStringFeedbackCtl) >> 2) + f->num_keysyms))
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
return BadLength;
|
||||||
0, BadLength);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
for (s = dev->stringfeed; s; s = s->next)
|
for (s = dev->stringfeed; s; s = s->next)
|
||||||
if (s->ctrl.id == ((xStringFeedbackCtl *) & stuff[1])->id) {
|
if (s->ctrl.id == ((xStringFeedbackCtl *) & stuff[1])->id)
|
||||||
ChangeStringFeedback(client, dev, stuff->mask, s,
|
return ChangeStringFeedback(client, dev, stuff->mask, s,
|
||||||
(xStringFeedbackCtl *) & stuff[1]);
|
(xStringFeedbackCtl *) & stuff[1]);
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IntegerFeedbackClass:
|
case IntegerFeedbackClass:
|
||||||
if (len != (sizeof(xIntegerFeedbackCtl) >> 2)) {
|
if (len != (sizeof(xIntegerFeedbackCtl) >> 2))
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
return BadLength;
|
||||||
0, BadLength);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
for (i = dev->intfeed; i; i = i->next)
|
for (i = dev->intfeed; i; i = i->next)
|
||||||
if (i->ctrl.id == ((xIntegerFeedbackCtl *) & stuff[1])->id) {
|
if (i->ctrl.id == ((xIntegerFeedbackCtl *) & stuff[1])->id)
|
||||||
ChangeIntegerFeedback(client, dev, stuff->mask, i,
|
return ChangeIntegerFeedback(client, dev, stuff->mask, i,
|
||||||
(xIntegerFeedbackCtl *)&stuff[1]);
|
(xIntegerFeedbackCtl *)&stuff[1]);
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case LedFeedbackClass:
|
case LedFeedbackClass:
|
||||||
if (len != (sizeof(xLedFeedbackCtl) >> 2)) {
|
if (len != (sizeof(xLedFeedbackCtl) >> 2))
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
return BadLength;
|
||||||
0, BadLength);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
for (l = dev->leds; l; l = l->next)
|
for (l = dev->leds; l; l = l->next)
|
||||||
if (l->ctrl.id == ((xLedFeedbackCtl *) & stuff[1])->id) {
|
if (l->ctrl.id == ((xLedFeedbackCtl *) & stuff[1])->id)
|
||||||
ChangeLedFeedback(client, dev, stuff->mask, l,
|
return ChangeLedFeedback(client, dev, stuff->mask, l,
|
||||||
(xLedFeedbackCtl *) & stuff[1]);
|
(xLedFeedbackCtl *) & stuff[1]);
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case BellFeedbackClass:
|
case BellFeedbackClass:
|
||||||
if (len != (sizeof(xBellFeedbackCtl) >> 2)) {
|
if (len != (sizeof(xBellFeedbackCtl) >> 2))
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl,
|
return BadLength;
|
||||||
0, BadLength);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
for (b = dev->bell; b; b = b->next)
|
for (b = dev->bell; b; b = b->next)
|
||||||
if (b->ctrl.id == ((xBellFeedbackCtl *) & stuff[1])->id) {
|
if (b->ctrl.id == ((xBellFeedbackCtl *) & stuff[1])->id)
|
||||||
ChangeBellFeedback(client, dev, stuff->mask, b,
|
return ChangeBellFeedback(client, dev, stuff->mask, b,
|
||||||
(xBellFeedbackCtl *) & stuff[1]);
|
(xBellFeedbackCtl *) & stuff[1]);
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeFeedbackControl, 0, BadMatch);
|
return BadMatch;
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,14 +56,11 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "XIstubs.h"
|
#include "XIstubs.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "extnsionst.h"
|
|
||||||
|
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
@ -98,10 +95,8 @@ SProcXChangeKeyboardDevice(ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcXChangeKeyboardDevice(ClientPtr client)
|
ProcXChangeKeyboardDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xChangeKeyboardDeviceReq);
|
/* REQUEST(xChangeKeyboardDeviceReq); */
|
||||||
REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq);
|
REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq);
|
||||||
|
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeKeyboardDevice, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
14
Xi/chgkmap.c
14
Xi/chgkmap.c
|
@ -56,12 +56,9 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
@ -111,18 +108,13 @@ ProcXChangeDeviceKeyMapping(ClientPtr client)
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq);
|
REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq);
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeDeviceKeyMapping, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
len = stuff->length - (sizeof(xChangeDeviceKeyMappingReq) >> 2);
|
len = stuff->length - (sizeof(xChangeDeviceKeyMappingReq) >> 2);
|
||||||
|
|
||||||
ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify,
|
ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify,
|
||||||
stuff->firstKeyCode, stuff->keyCodes,
|
stuff->firstKeyCode, stuff->keyCodes,
|
||||||
stuff->keySymsPerKeyCode, (KeySym *) & stuff[1]);
|
stuff->keySymsPerKeyCode, (KeySym *) & stuff[1]);
|
||||||
|
|
||||||
if (ret != Success)
|
return ret;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeDeviceKeyMapping, 0, ret);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
34
Xi/chgprop.c
34
Xi/chgprop.c
|
@ -56,13 +56,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
|
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
|
@ -115,30 +112,22 @@ ProcXChangeDeviceDontPropagateList(ClientPtr client)
|
||||||
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
|
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
|
||||||
|
|
||||||
if (stuff->length != (sizeof(xChangeDeviceDontPropagateListReq) >> 2) +
|
if (stuff->length != (sizeof(xChangeDeviceDontPropagateListReq) >> 2) +
|
||||||
stuff->count) {
|
stuff->count)
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
|
return BadLength;
|
||||||
BadLength);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (rc != Success) {
|
if (rc != Success)
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
|
return rc;
|
||||||
rc);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stuff->mode != AddToList && stuff->mode != DeleteFromList) {
|
if (stuff->mode != AddToList && stuff->mode != DeleteFromList) {
|
||||||
client->errorValue = stuff->window;
|
client->errorValue = stuff->window;
|
||||||
SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0,
|
return BadMode;
|
||||||
BadMode);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CreateMaskFromList(client, (XEventClass *) & stuff[1],
|
if ((rc = CreateMaskFromList(client, (XEventClass *) & stuff[1],
|
||||||
stuff->count, tmp, NULL,
|
stuff->count, tmp, NULL,
|
||||||
X_ChangeDeviceDontPropagateList) != Success)
|
X_ChangeDeviceDontPropagateList)) != Success)
|
||||||
return Success;
|
return rc;
|
||||||
|
|
||||||
others = wOtherInputMasks(pWin);
|
others = wOtherInputMasks(pWin);
|
||||||
if (!others && stuff->mode == DeleteFromList)
|
if (!others && stuff->mode == DeleteFromList)
|
||||||
|
@ -153,11 +142,8 @@ ProcXChangeDeviceDontPropagateList(ClientPtr client)
|
||||||
tmp[i].mask |= others->dontPropagateMask[i];
|
tmp[i].mask |= others->dontPropagateMask[i];
|
||||||
|
|
||||||
if (DeviceEventSuppressForWindow(pWin, client, tmp[i].mask, i) !=
|
if (DeviceEventSuppressForWindow(pWin, client, tmp[i].mask, i) !=
|
||||||
Success) {
|
Success)
|
||||||
SendErrorToClient(client, IReqCode,
|
return BadClass;
|
||||||
X_ChangeDeviceDontPropagateList, 0, BadClass);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
@ -56,8 +56,6 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
|
@ -65,7 +63,6 @@ SOFTWARE.
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include "scrnintstr.h" /* screen structure */
|
#include "scrnintstr.h" /* screen structure */
|
||||||
|
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
|
|
||||||
#include "dixevents.h"
|
#include "dixevents.h"
|
||||||
|
@ -101,10 +98,8 @@ SProcXChangePointerDevice(ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcXChangePointerDevice(ClientPtr client)
|
ProcXChangePointerDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xChangePointerDeviceReq);
|
/* REQUEST(xChangePointerDeviceReq); */
|
||||||
REQUEST_SIZE_MATCH(xChangePointerDeviceReq);
|
REQUEST_SIZE_MATCH(xChangePointerDeviceReq);
|
||||||
|
|
||||||
SendErrorToClient(client, IReqCode, X_ChangePointerDevice, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,15 +56,12 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include "scrnintstr.h" /* screen structure */
|
#include "scrnintstr.h" /* screen structure */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "XIstubs.h"
|
#include "XIstubs.h"
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -151,10 +148,8 @@ ProcXCloseDevice(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xCloseDeviceReq);
|
REQUEST_SIZE_MATCH(xCloseDeviceReq);
|
||||||
|
|
||||||
d = LookupDeviceIntRec(stuff->deviceid);
|
d = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (d == NULL) {
|
if (d == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_CloseDevice, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (d->grab && SameClient(d->grab, client))
|
if (d->grab && SameClient(d->grab, client))
|
||||||
(*d->DeactivateGrab) (d); /* release active grab */
|
(*d->DeactivateGrab) (d); /* release active grab */
|
||||||
|
|
18
Xi/devbell.c
18
Xi/devbell.c
|
@ -56,12 +56,9 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -108,14 +105,12 @@ ProcXDeviceBell(ClientPtr client)
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL) {
|
||||||
client->errorValue = stuff->deviceid;
|
client->errorValue = stuff->deviceid;
|
||||||
SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stuff->percent < -100 || stuff->percent > 100) {
|
if (stuff->percent < -100 || stuff->percent > 100) {
|
||||||
client->errorValue = stuff->percent;
|
client->errorValue = stuff->percent;
|
||||||
SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue);
|
return BadValue;
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
if (stuff->feedbackclass == KbdFeedbackClass) {
|
if (stuff->feedbackclass == KbdFeedbackClass) {
|
||||||
for (k = dev->kbdfeed; k; k = k->next)
|
for (k = dev->kbdfeed; k; k = k->next)
|
||||||
|
@ -123,8 +118,7 @@ ProcXDeviceBell(ClientPtr client)
|
||||||
break;
|
break;
|
||||||
if (!k) {
|
if (!k) {
|
||||||
client->errorValue = stuff->feedbackid;
|
client->errorValue = stuff->feedbackid;
|
||||||
SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue);
|
return BadValue;
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
base = k->ctrl.bell;
|
base = k->ctrl.bell;
|
||||||
proc = k->BellProc;
|
proc = k->BellProc;
|
||||||
|
@ -136,8 +130,7 @@ ProcXDeviceBell(ClientPtr client)
|
||||||
break;
|
break;
|
||||||
if (!b) {
|
if (!b) {
|
||||||
client->errorValue = stuff->feedbackid;
|
client->errorValue = stuff->feedbackid;
|
||||||
SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue);
|
return BadValue;
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
base = b->ctrl.percent;
|
base = b->ctrl.percent;
|
||||||
proc = b->BellProc;
|
proc = b->BellProc;
|
||||||
|
@ -145,8 +138,7 @@ ProcXDeviceBell(ClientPtr client)
|
||||||
class = BellFeedbackClass;
|
class = BellFeedbackClass;
|
||||||
} else {
|
} else {
|
||||||
client->errorValue = stuff->feedbackclass;
|
client->errorValue = stuff->feedbackclass;
|
||||||
SendErrorToClient(client, IReqCode, X_DeviceBell, 0, BadValue);
|
return BadValue;
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
newpercent = (base * stuff->percent) / 100;
|
newpercent = (base * stuff->percent) / 100;
|
||||||
if (stuff->percent < 0)
|
if (stuff->percent < 0)
|
||||||
|
|
|
@ -73,6 +73,10 @@ SOFTWARE.
|
||||||
#include "dixgrabs.h" /* CreateGrab() */
|
#include "dixgrabs.h" /* CreateGrab() */
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
|
|
||||||
|
#ifdef XKB
|
||||||
|
#include "xkbsrv.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define WID(w) ((w) ? ((w)->drawable.id) : 0)
|
#define WID(w) ((w) ? ((w)->drawable.id) : 0)
|
||||||
#define AllModifiersMask ( \
|
#define AllModifiersMask ( \
|
||||||
ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \
|
ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \
|
||||||
|
@ -942,7 +946,7 @@ SetModifierMapping(ClientPtr client, DeviceIntPtr dev, int len, int rlen,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SendDeviceMappingNotify(CARD8 request,
|
SendDeviceMappingNotify(ClientPtr client, CARD8 request,
|
||||||
KeyCode firstKeyCode, CARD8 count, DeviceIntPtr dev)
|
KeyCode firstKeyCode, CARD8 count, DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
xEvent event;
|
xEvent event;
|
||||||
|
@ -957,6 +961,11 @@ SendDeviceMappingNotify(CARD8 request,
|
||||||
ev->count = count;
|
ev->count = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef XKB
|
||||||
|
if (request == MappingKeyboard || request == MappingModifier)
|
||||||
|
XkbApplyMappingChange(dev, request, firstKeyCode, count, client);
|
||||||
|
#endif
|
||||||
|
|
||||||
SendEventToAllWindows(dev, DeviceMappingNotifyMask, (xEvent *) ev, 1);
|
SendEventToAllWindows(dev, DeviceMappingNotifyMask, (xEvent *) ev, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -992,7 +1001,7 @@ ChangeKeyMapping(ClientPtr client,
|
||||||
keysyms.map = map;
|
keysyms.map = map;
|
||||||
if (!SetKeySymsMap(&k->curKeySyms, &keysyms))
|
if (!SetKeySymsMap(&k->curKeySyms, &keysyms))
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
SendDeviceMappingNotify(MappingKeyboard, firstKeyCode, keyCodes, dev);
|
SendDeviceMappingNotify(client, MappingKeyboard, firstKeyCode, keyCodes, dev);
|
||||||
return client->noClientException;
|
return client->noClientException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
13
Xi/extinit.c
13
Xi/extinit.c
|
@ -58,8 +58,6 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h>
|
|
||||||
#include <X11/Xproto.h>
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "gcstruct.h" /* pointer for extnsionst.h */
|
#include "gcstruct.h" /* pointer for extnsionst.h */
|
||||||
#include "extnsionst.h" /* extension entry */
|
#include "extnsionst.h" /* extension entry */
|
||||||
|
@ -289,9 +287,7 @@ ProcIDispatch(ClientPtr client)
|
||||||
return (ProcXGetDeviceControl(client));
|
return (ProcXGetDeviceControl(client));
|
||||||
else if (stuff->data == X_ChangeDeviceControl)
|
else if (stuff->data == X_ChangeDeviceControl)
|
||||||
return (ProcXChangeDeviceControl(client));
|
return (ProcXChangeDeviceControl(client));
|
||||||
else {
|
|
||||||
SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest);
|
|
||||||
}
|
|
||||||
return (BadRequest);
|
return (BadRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,9 +374,7 @@ SProcIDispatch(ClientPtr client)
|
||||||
return (SProcXGetDeviceControl(client));
|
return (SProcXGetDeviceControl(client));
|
||||||
else if (stuff->data == X_ChangeDeviceControl)
|
else if (stuff->data == X_ChangeDeviceControl)
|
||||||
return (SProcXChangeDeviceControl(client));
|
return (SProcXChangeDeviceControl(client));
|
||||||
else {
|
|
||||||
SendErrorToClient(client, IReqCode, stuff->data, 0, BadRequest);
|
|
||||||
}
|
|
||||||
return (BadRequest);
|
return (BadRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -935,6 +929,8 @@ SEventIDispatch(xEvent * from, xEvent * to)
|
||||||
DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify);
|
DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify);
|
||||||
else if (type == ChangeDeviceNotify)
|
else if (type == ChangeDeviceNotify)
|
||||||
DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify);
|
DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify);
|
||||||
|
else if (type == DevicePresenceNotify)
|
||||||
|
DO_SWAP(SDevicePresenceNotifyEvent, devicePresenceNotify);
|
||||||
else {
|
else {
|
||||||
FatalError("XInputExtension: Impossible event!\n");
|
FatalError("XInputExtension: Impossible event!\n");
|
||||||
}
|
}
|
||||||
|
@ -980,6 +976,7 @@ XInputExtensionInit(void)
|
||||||
EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch;
|
EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch;
|
||||||
EventSwapVector[DeviceMappingNotify] = SEventIDispatch;
|
EventSwapVector[DeviceMappingNotify] = SEventIDispatch;
|
||||||
EventSwapVector[ChangeDeviceNotify] = SEventIDispatch;
|
EventSwapVector[ChangeDeviceNotify] = SEventIDispatch;
|
||||||
|
EventSwapVector[DevicePresenceNotify] = SEventIDispatch;
|
||||||
} else {
|
} else {
|
||||||
FatalError("IExtensionInit: AddExtensions failed\n");
|
FatalError("IExtensionInit: AddExtensions failed\n");
|
||||||
}
|
}
|
||||||
|
|
18
Xi/getbmap.c
18
Xi/getbmap.c
|
@ -56,12 +56,9 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -106,18 +103,13 @@ ProcXGetDeviceButtonMapping(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceButtonMapping, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
b = dev->button;
|
b = dev->button;
|
||||||
if (b == NULL) {
|
if (b == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceButtonMapping, 0,
|
return BadMatch;
|
||||||
BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
rep.nElts = b->numButtons;
|
rep.nElts = b->numButtons;
|
||||||
rep.length = (rep.nElts + (4 - 1)) / 4;
|
rep.length = (rep.nElts + (4 - 1)) / 4;
|
||||||
WriteReplyToClient(client, sizeof(xGetDeviceButtonMappingReply), &rep);
|
WriteReplyToClient(client, sizeof(xGetDeviceButtonMappingReply), &rep);
|
||||||
|
|
39
Xi/getdctl.c
39
Xi/getdctl.c
|
@ -56,12 +56,9 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -250,10 +247,8 @@ ProcXGetDeviceControl(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xGetDeviceControlReq);
|
REQUEST_SIZE_MATCH(xGetDeviceControlReq);
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
rep.repType = X_Reply;
|
rep.repType = X_Reply;
|
||||||
rep.RepType = X_GetDeviceControl;
|
rep.RepType = X_GetDeviceControl;
|
||||||
|
@ -262,29 +257,20 @@ ProcXGetDeviceControl(ClientPtr client)
|
||||||
|
|
||||||
switch (stuff->control) {
|
switch (stuff->control) {
|
||||||
case DEVICE_RESOLUTION:
|
case DEVICE_RESOLUTION:
|
||||||
if (!dev->valuator) {
|
if (!dev->valuator)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0,
|
return BadMatch;
|
||||||
BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
total_length = sizeof(xDeviceResolutionState) +
|
total_length = sizeof(xDeviceResolutionState) +
|
||||||
(3 * sizeof(int) * dev->valuator->numAxes);
|
(3 * sizeof(int) * dev->valuator->numAxes);
|
||||||
break;
|
break;
|
||||||
case DEVICE_ABS_CALIB:
|
case DEVICE_ABS_CALIB:
|
||||||
if (!dev->absolute) {
|
if (!dev->absolute)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0,
|
return BadMatch;
|
||||||
BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
total_length = sizeof(xDeviceAbsCalibCtl);
|
total_length = sizeof(xDeviceAbsCalibCtl);
|
||||||
break;
|
break;
|
||||||
case DEVICE_ABS_AREA:
|
case DEVICE_ABS_AREA:
|
||||||
if (!dev->absolute) {
|
if (!dev->absolute)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0,
|
return BadMatch;
|
||||||
BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
total_length = sizeof(xDeviceAbsAreaCtl);
|
total_length = sizeof(xDeviceAbsAreaCtl);
|
||||||
break;
|
break;
|
||||||
|
@ -295,15 +281,12 @@ ProcXGetDeviceControl(ClientPtr client)
|
||||||
total_length = sizeof(xDeviceEnableCtl);
|
total_length = sizeof(xDeviceEnableCtl);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, BadValue);
|
return BadValue;
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = (char *)xalloc(total_length);
|
buf = (char *)xalloc(total_length);
|
||||||
if (!buf) {
|
if (!buf)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, BadAlloc);
|
return BadAlloc;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
savbuf = buf;
|
savbuf = buf;
|
||||||
|
|
||||||
switch (stuff->control) {
|
switch (stuff->control) {
|
||||||
|
|
21
Xi/getfctl.c
21
Xi/getfctl.c
|
@ -56,12 +56,9 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -308,10 +305,8 @@ ProcXGetFeedbackControl(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xGetFeedbackControlReq);
|
REQUEST_SIZE_MATCH(xGetFeedbackControlReq);
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
rep.repType = X_Reply;
|
rep.repType = X_Reply;
|
||||||
rep.RepType = X_GetFeedbackControl;
|
rep.RepType = X_GetFeedbackControl;
|
||||||
|
@ -345,16 +340,12 @@ ProcXGetFeedbackControl(ClientPtr client)
|
||||||
total_length += sizeof(xBellFeedbackState);
|
total_length += sizeof(xBellFeedbackState);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (total_length == 0) {
|
if (total_length == 0)
|
||||||
SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, BadMatch);
|
return BadMatch;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf = (char *)xalloc(total_length);
|
buf = (char *)xalloc(total_length);
|
||||||
if (!buf) {
|
if (!buf)
|
||||||
SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, BadAlloc);
|
return BadAlloc;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
savbuf = buf;
|
savbuf = buf;
|
||||||
|
|
||||||
for (k = dev->kbdfeed; k; k = k->next)
|
for (k = dev->kbdfeed; k; k = k->next)
|
||||||
|
|
|
@ -56,13 +56,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "windowstr.h" /* focus struct */
|
#include "windowstr.h" /* focus struct */
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -101,10 +98,8 @@ ProcXGetDeviceFocus(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xGetDeviceFocusReq);
|
REQUEST_SIZE_MATCH(xGetDeviceFocusReq);
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL || !dev->focus) {
|
if (dev == NULL || !dev->focus)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceFocus, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
rep.repType = X_Reply;
|
rep.repType = X_Reply;
|
||||||
rep.RepType = X_GetDeviceFocus;
|
rep.RepType = X_GetDeviceFocus;
|
||||||
|
|
23
Xi/getkmap.c
23
Xi/getkmap.c
|
@ -56,12 +56,9 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
|
@ -102,29 +99,21 @@ ProcXGetDeviceKeyMapping(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xGetDeviceKeyMappingReq);
|
REQUEST_SIZE_MATCH(xGetDeviceKeyMappingReq);
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
if (dev->key == NULL)
|
||||||
return Success;
|
return BadMatch;
|
||||||
}
|
|
||||||
|
|
||||||
if (dev->key == NULL) {
|
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
k = &dev->key->curKeySyms;
|
k = &dev->key->curKeySyms;
|
||||||
|
|
||||||
if ((stuff->firstKeyCode < k->minKeyCode) ||
|
if ((stuff->firstKeyCode < k->minKeyCode) ||
|
||||||
(stuff->firstKeyCode > k->maxKeyCode)) {
|
(stuff->firstKeyCode > k->maxKeyCode)) {
|
||||||
client->errorValue = stuff->firstKeyCode;
|
client->errorValue = stuff->firstKeyCode;
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadValue);
|
return BadValue;
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stuff->firstKeyCode + stuff->count > k->maxKeyCode + 1) {
|
if (stuff->firstKeyCode + stuff->count > k->maxKeyCode + 1) {
|
||||||
client->errorValue = stuff->count;
|
client->errorValue = stuff->count;
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceKeyMapping, 0, BadValue);
|
return BadValue;
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rep.repType = X_Reply;
|
rep.repType = X_Reply;
|
||||||
|
|
18
Xi/getmmap.c
18
Xi/getmmap.c
|
@ -56,12 +56,9 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h> /* Request macro */
|
#include <X11/extensions/XIproto.h> /* Request macro */
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -102,18 +99,13 @@ ProcXGetDeviceModifierMapping(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xGetDeviceModifierMappingReq);
|
REQUEST_SIZE_MATCH(xGetDeviceModifierMappingReq);
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceModifierMapping, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
kp = dev->key;
|
kp = dev->key;
|
||||||
if (kp == NULL) {
|
if (kp == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceModifierMapping, 0,
|
return BadMatch;
|
||||||
BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
maxkeys = kp->maxKeysPerModifier;
|
maxkeys = kp->maxKeysPerModifier;
|
||||||
|
|
||||||
rep.repType = X_Reply;
|
rep.repType = X_Reply;
|
||||||
|
|
10
Xi/getprop.c
10
Xi/getprop.c
|
@ -56,13 +56,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structs */
|
#include "windowstr.h" /* window structs */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
|
@ -116,11 +113,8 @@ ProcXGetDeviceDontPropagateList(ClientPtr client)
|
||||||
rep.count = 0;
|
rep.count = 0;
|
||||||
|
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (rc != Success) {
|
if (rc != Success)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceDontPropagateList, 0,
|
return rc;
|
||||||
rc);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((others = wOtherInputMasks(pWin)) != 0) {
|
if ((others = wOtherInputMasks(pWin)) != 0) {
|
||||||
for (i = 0; i < EMASKSIZE; i++)
|
for (i = 0; i < EMASKSIZE; i++)
|
||||||
|
|
|
@ -56,13 +56,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window struct */
|
#include "windowstr.h" /* window struct */
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
|
@ -118,11 +115,8 @@ ProcXGetSelectedExtensionEvents(ClientPtr client)
|
||||||
rep.all_clients_count = 0;
|
rep.all_clients_count = 0;
|
||||||
|
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (rc != Success) {
|
if (rc != Success)
|
||||||
SendErrorToClient(client, IReqCode, X_GetSelectedExtensionEvents, 0,
|
return rc;
|
||||||
rc);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((pOthers = wOtherInputMasks(pWin)) != 0) {
|
if ((pOthers = wOtherInputMasks(pWin)) != 0) {
|
||||||
for (others = pOthers->inputClients; others; others = others->next)
|
for (others = pOthers->inputClients; others; others = others->next)
|
||||||
|
|
10
Xi/getvers.c
10
Xi/getvers.c
|
@ -56,12 +56,9 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -102,11 +99,8 @@ ProcXGetExtensionVersion(ClientPtr client)
|
||||||
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
|
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
|
||||||
|
|
||||||
if (stuff->length != (sizeof(xGetExtensionVersionReq) +
|
if (stuff->length != (sizeof(xGetExtensionVersionReq) +
|
||||||
stuff->nbytes + 3) >> 2) {
|
stuff->nbytes + 3) >> 2)
|
||||||
SendErrorToClient(client, IReqCode, X_GetExtensionVersion, 0,
|
return BadLength;
|
||||||
BadLength);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
rep.repType = X_Reply;
|
rep.repType = X_Reply;
|
||||||
rep.RepType = X_GetExtensionVersion;
|
rep.RepType = X_GetExtensionVersion;
|
||||||
|
|
41
Xi/grabdev.c
41
Xi/grabdev.c
|
@ -56,13 +56,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "dixevents.h" /* GrabDevice */
|
#include "dixevents.h" /* GrabDevice */
|
||||||
|
@ -109,7 +106,7 @@ SProcXGrabDevice(ClientPtr client)
|
||||||
int
|
int
|
||||||
ProcXGrabDevice(ClientPtr client)
|
ProcXGrabDevice(ClientPtr client)
|
||||||
{
|
{
|
||||||
int error;
|
int rc;
|
||||||
xGrabDeviceReply rep;
|
xGrabDeviceReply rep;
|
||||||
DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
struct tmask tmp[EMASKSIZE];
|
struct tmask tmp[EMASKSIZE];
|
||||||
|
@ -117,10 +114,8 @@ ProcXGrabDevice(ClientPtr client)
|
||||||
REQUEST(xGrabDeviceReq);
|
REQUEST(xGrabDeviceReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
|
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
|
||||||
|
|
||||||
if (stuff->length != (sizeof(xGrabDeviceReq) >> 2) + stuff->event_count) {
|
if (stuff->length != (sizeof(xGrabDeviceReq) >> 2) + stuff->event_count)
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDevice, 0, BadLength);
|
return BadLength;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
rep.repType = X_Reply;
|
rep.repType = X_Reply;
|
||||||
rep.RepType = X_GrabDevice;
|
rep.RepType = X_GrabDevice;
|
||||||
|
@ -128,25 +123,22 @@ ProcXGrabDevice(ClientPtr client)
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDevice, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CreateMaskFromList(client, (XEventClass *) & stuff[1],
|
if ((rc = CreateMaskFromList(client, (XEventClass *) & stuff[1],
|
||||||
stuff->event_count, tmp, dev,
|
stuff->event_count, tmp, dev,
|
||||||
X_GrabDevice) != Success)
|
X_GrabDevice)) != Success)
|
||||||
return Success;
|
return rc;
|
||||||
|
|
||||||
error = GrabDevice(client, dev, stuff->this_device_mode,
|
rc = GrabDevice(client, dev, stuff->this_device_mode,
|
||||||
stuff->other_devices_mode, stuff->grabWindow,
|
stuff->other_devices_mode, stuff->grabWindow,
|
||||||
stuff->ownerEvents, stuff->time,
|
stuff->ownerEvents, stuff->time,
|
||||||
tmp[stuff->deviceid].mask, &rep.status);
|
tmp[stuff->deviceid].mask, &rep.status);
|
||||||
|
|
||||||
if (error != Success) {
|
if (rc != Success)
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDevice, 0, error);
|
return rc;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
WriteReplyToClient(client, sizeof(xGrabDeviceReply), &rep);
|
WriteReplyToClient(client, sizeof(xGrabDeviceReply), &rep);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
@ -172,15 +164,12 @@ CreateMaskFromList(ClientPtr client, XEventClass * list, int count,
|
||||||
|
|
||||||
for (i = 0; i < count; i++, list++) {
|
for (i = 0; i < count; i++, list++) {
|
||||||
device = *list >> 8;
|
device = *list >> 8;
|
||||||
if (device > 255) {
|
if (device > 255)
|
||||||
SendErrorToClient(client, IReqCode, req, 0, BadClass);
|
|
||||||
return BadClass;
|
return BadClass;
|
||||||
}
|
|
||||||
tdev = LookupDeviceIntRec(device);
|
tdev = LookupDeviceIntRec(device);
|
||||||
if (tdev == NULL || (dev != NULL && tdev != dev)) {
|
if (tdev == NULL || (dev != NULL && tdev != dev))
|
||||||
SendErrorToClient(client, IReqCode, req, 0, BadClass);
|
|
||||||
return BadClass;
|
return BadClass;
|
||||||
}
|
|
||||||
|
|
||||||
for (j = 0; j < ExtEventIndex; j++)
|
for (j = 0; j < ExtEventIndex; j++)
|
||||||
if (EventInfo[j].type == (*list & 0xff)) {
|
if (EventInfo[j].type == (*list & 0xff)) {
|
||||||
|
|
|
@ -56,14 +56,11 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -117,28 +114,19 @@ ProcXGrabDeviceButton(ClientPtr client)
|
||||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
||||||
|
|
||||||
if (stuff->length !=
|
if (stuff->length !=
|
||||||
(sizeof(xGrabDeviceButtonReq) >> 2) + stuff->event_count) {
|
(sizeof(xGrabDeviceButtonReq) >> 2) + stuff->event_count)
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, BadLength);
|
return BadLength;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->grabbed_device);
|
dev = LookupDeviceIntRec(stuff->grabbed_device);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
if (stuff->modifier_device != UseXKeyboard) {
|
if (stuff->modifier_device != UseXKeyboard) {
|
||||||
mdev = LookupDeviceIntRec(stuff->modifier_device);
|
mdev = LookupDeviceIntRec(stuff->modifier_device);
|
||||||
if (mdev == NULL) {
|
if (mdev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
if (mdev->key == NULL)
|
||||||
return Success;
|
return BadMatch;
|
||||||
}
|
|
||||||
if (mdev->key == NULL) {
|
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0,
|
|
||||||
BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
||||||
|
|
||||||
|
@ -147,13 +135,11 @@ ProcXGrabDeviceButton(ClientPtr client)
|
||||||
if ((ret = CreateMaskFromList(client, class,
|
if ((ret = CreateMaskFromList(client, class,
|
||||||
stuff->event_count, tmp, dev,
|
stuff->event_count, tmp, dev,
|
||||||
X_GrabDeviceButton)) != Success)
|
X_GrabDeviceButton)) != Success)
|
||||||
return Success;
|
return ret;
|
||||||
ret = GrabButton(client, dev, stuff->this_device_mode,
|
ret = GrabButton(client, dev, stuff->this_device_mode,
|
||||||
stuff->other_devices_mode, stuff->modifiers, mdev,
|
stuff->other_devices_mode, stuff->modifiers, mdev,
|
||||||
stuff->button, stuff->grabWindow, stuff->ownerEvents,
|
stuff->button, stuff->grabWindow, stuff->ownerEvents,
|
||||||
(Cursor) 0, (Window) 0, tmp[stuff->grabbed_device].mask);
|
(Cursor) 0, (Window) 0, tmp[stuff->grabbed_device].mask);
|
||||||
|
|
||||||
if (ret != Success)
|
return ret;
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDeviceButton, 0, ret);
|
|
||||||
return (Success);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,14 +56,11 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -115,27 +112,19 @@ ProcXGrabDeviceKey(ClientPtr client)
|
||||||
REQUEST(xGrabDeviceKeyReq);
|
REQUEST(xGrabDeviceKeyReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
|
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
|
||||||
|
|
||||||
if (stuff->length != (sizeof(xGrabDeviceKeyReq) >> 2) + stuff->event_count) {
|
if (stuff->length != (sizeof(xGrabDeviceKeyReq) >> 2) + stuff->event_count)
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadLength);
|
return BadLength;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->grabbed_device);
|
dev = LookupDeviceIntRec(stuff->grabbed_device);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stuff->modifier_device != UseXKeyboard) {
|
if (stuff->modifier_device != UseXKeyboard) {
|
||||||
mdev = LookupDeviceIntRec(stuff->modifier_device);
|
mdev = LookupDeviceIntRec(stuff->modifier_device);
|
||||||
if (mdev == NULL) {
|
if (mdev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
if (mdev->key == NULL)
|
||||||
}
|
return BadMatch;
|
||||||
if (mdev->key == NULL) {
|
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
||||||
|
|
||||||
|
@ -144,17 +133,12 @@ ProcXGrabDeviceKey(ClientPtr client)
|
||||||
if ((ret = CreateMaskFromList(client, class,
|
if ((ret = CreateMaskFromList(client, class,
|
||||||
stuff->event_count, tmp, dev,
|
stuff->event_count, tmp, dev,
|
||||||
X_GrabDeviceKey)) != Success)
|
X_GrabDeviceKey)) != Success)
|
||||||
return Success;
|
return ret;
|
||||||
|
|
||||||
ret = GrabKey(client, dev, stuff->this_device_mode,
|
ret = GrabKey(client, dev, stuff->this_device_mode,
|
||||||
stuff->other_devices_mode, stuff->modifiers, mdev,
|
stuff->other_devices_mode, stuff->modifiers, mdev,
|
||||||
stuff->key, stuff->grabWindow, stuff->ownerEvents,
|
stuff->key, stuff->grabWindow, stuff->ownerEvents,
|
||||||
tmp[stuff->grabbed_device].mask);
|
tmp[stuff->grabbed_device].mask);
|
||||||
|
|
||||||
if (ret != Success) {
|
return ret;
|
||||||
SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, ret);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,12 +56,9 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
@ -110,17 +107,11 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
|
REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
v = dev->valuator;
|
v = dev->valuator;
|
||||||
if (v == NULL || v->numAxes == 0) {
|
if (v == NULL || v->numAxes == 0)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0,
|
return BadMatch;
|
||||||
BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
if (dev->valuator->motionHintWindow)
|
if (dev->valuator->motionHintWindow)
|
||||||
MaybeStopDeviceHint(dev, client);
|
MaybeStopDeviceHint(dev, client);
|
||||||
axes = v->numAxes;
|
axes = v->numAxes;
|
||||||
|
@ -145,11 +136,8 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
|
||||||
size = sizeof(Time) + (axes * sizeof(INT32));
|
size = sizeof(Time) + (axes * sizeof(INT32));
|
||||||
tsize = num_events * size;
|
tsize = num_events * size;
|
||||||
coords = (INT32 *) ALLOCATE_LOCAL(tsize);
|
coords = (INT32 *) ALLOCATE_LOCAL(tsize);
|
||||||
if (!coords) {
|
if (!coords)
|
||||||
SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0,
|
return BadAlloc;
|
||||||
BadAlloc);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
rep.nEvents = (v->GetMotionProc) (dev, (xTimecoord *) coords, /* XXX */
|
rep.nEvents = (v->GetMotionProc) (dev, (xTimecoord *) coords, /* XXX */
|
||||||
start.milliseconds, stop.milliseconds,
|
start.milliseconds, stop.milliseconds,
|
||||||
(ScreenPtr) NULL);
|
(ScreenPtr) NULL);
|
||||||
|
|
21
Xi/opendev.c
21
Xi/opendev.c
|
@ -56,14 +56,11 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "XIstubs.h"
|
#include "XIstubs.h"
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -107,26 +104,20 @@ ProcXOpenDevice(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xOpenDeviceReq);
|
REQUEST_SIZE_MATCH(xOpenDeviceReq);
|
||||||
|
|
||||||
if (stuff->deviceid == inputInfo.pointer->id ||
|
if (stuff->deviceid == inputInfo.pointer->id ||
|
||||||
stuff->deviceid == inputInfo.keyboard->id) {
|
stuff->deviceid == inputInfo.keyboard->id)
|
||||||
SendErrorToClient(client, IReqCode, X_OpenDevice, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((dev = LookupDeviceIntRec(stuff->deviceid)) == NULL) { /* not open */
|
if ((dev = LookupDeviceIntRec(stuff->deviceid)) == NULL) { /* not open */
|
||||||
for (dev = inputInfo.off_devices; dev; dev = dev->next)
|
for (dev = inputInfo.off_devices; dev; dev = dev->next)
|
||||||
if (dev->id == stuff->deviceid)
|
if (dev->id == stuff->deviceid)
|
||||||
break;
|
break;
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_OpenDevice, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenInputDevice(dev, client, &status);
|
OpenInputDevice(dev, client, &status);
|
||||||
if (status != Success) {
|
if (status != Success)
|
||||||
SendErrorToClient(client, IReqCode, X_OpenDevice, 0, status);
|
return status;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
rep.repType = X_Reply;
|
rep.repType = X_Reply;
|
||||||
rep.RepType = X_OpenDevice;
|
rep.RepType = X_OpenDevice;
|
||||||
|
|
15
Xi/queryst.c
15
Xi/queryst.c
|
@ -38,13 +38,10 @@ from The Open Group.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
@ -100,10 +97,8 @@ ProcXQueryDeviceState(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_QueryDeviceState, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
v = dev->valuator;
|
v = dev->valuator;
|
||||||
if (v != NULL && v->motionHintWindow != NULL)
|
if (v != NULL && v->motionHintWindow != NULL)
|
||||||
|
@ -126,10 +121,8 @@ ProcXQueryDeviceState(ClientPtr client)
|
||||||
num_classes++;
|
num_classes++;
|
||||||
}
|
}
|
||||||
buf = (char *)xalloc(total_length);
|
buf = (char *)xalloc(total_length);
|
||||||
if (!buf) {
|
if (!buf)
|
||||||
SendErrorToClient(client, IReqCode, X_QueryDeviceState, 0, BadAlloc);
|
return BadAlloc;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
savbuf = buf;
|
savbuf = buf;
|
||||||
|
|
||||||
if (k != NULL) {
|
if (k != NULL) {
|
||||||
|
|
|
@ -57,13 +57,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
@ -164,40 +161,29 @@ ProcXSelectExtensionEvent(ClientPtr client)
|
||||||
REQUEST(xSelectExtensionEventReq);
|
REQUEST(xSelectExtensionEventReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
|
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
|
||||||
|
|
||||||
if (stuff->length != (sizeof(xSelectExtensionEventReq) >> 2) + stuff->count) {
|
if (stuff->length != (sizeof(xSelectExtensionEventReq) >> 2) + stuff->count)
|
||||||
SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0,
|
return BadLength;
|
||||||
BadLength);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
ret = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
|
||||||
if (ret != Success) {
|
if (ret != Success)
|
||||||
SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, ret);
|
return ret;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (HandleDevicePresenceMask(client, pWin, (XEventClass *) & stuff[1],
|
if (HandleDevicePresenceMask(client, pWin, (XEventClass *) & stuff[1],
|
||||||
&stuff->count) != Success) {
|
&stuff->count) != Success)
|
||||||
SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0,
|
return BadAlloc;
|
||||||
BadAlloc);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((ret = CreateMaskFromList(client, (XEventClass *) & stuff[1],
|
if ((ret = CreateMaskFromList(client, (XEventClass *) & stuff[1],
|
||||||
stuff->count, tmp, NULL,
|
stuff->count, tmp, NULL,
|
||||||
X_SelectExtensionEvent)) != Success)
|
X_SelectExtensionEvent)) != Success)
|
||||||
return Success;
|
return ret;
|
||||||
|
|
||||||
for (i = 0; i < EMASKSIZE; i++)
|
for (i = 0; i < EMASKSIZE; i++)
|
||||||
if (tmp[i].dev != NULL) {
|
if (tmp[i].dev != NULL) {
|
||||||
if ((ret =
|
if ((ret =
|
||||||
SelectForWindow((DeviceIntPtr) tmp[i].dev, pWin, client,
|
SelectForWindow((DeviceIntPtr) tmp[i].dev, pWin, client,
|
||||||
tmp[i].mask, ExtExclusiveMasks[i],
|
tmp[i].mask, ExtExclusiveMasks[i],
|
||||||
ExtValidMasks[i])) != Success) {
|
ExtValidMasks[i])) != Success)
|
||||||
SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0,
|
return ret;
|
||||||
ret);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
@ -57,13 +57,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* Window */
|
#include "windowstr.h" /* Window */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
@ -131,38 +128,29 @@ ProcXSendExtensionEvent(ClientPtr client)
|
||||||
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
|
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
|
||||||
|
|
||||||
if (stuff->length != (sizeof(xSendExtensionEventReq) >> 2) + stuff->count +
|
if (stuff->length != (sizeof(xSendExtensionEventReq) >> 2) + stuff->count +
|
||||||
(stuff->num_events * (sizeof(xEvent) >> 2))) {
|
(stuff->num_events * (sizeof(xEvent) >> 2)))
|
||||||
SendErrorToClient(client, IReqCode, X_SendExtensionEvent, 0, BadLength);
|
return BadLength;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_SendExtensionEvent, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The client's event type must be one defined by an extension. */
|
/* The client's event type must be one defined by an extension. */
|
||||||
|
|
||||||
first = ((xEvent *) & stuff[1]);
|
first = ((xEvent *) & stuff[1]);
|
||||||
if (!((EXTENSION_EVENT_BASE <= first->u.u.type) &&
|
if (!((EXTENSION_EVENT_BASE <= first->u.u.type) &&
|
||||||
(first->u.u.type < lastEvent))) {
|
(first->u.u.type < lastEvent)))
|
||||||
client->errorValue = first->u.u.type;
|
client->errorValue = first->u.u.type;
|
||||||
SendErrorToClient(client, IReqCode, X_SendExtensionEvent, 0, BadValue);
|
return BadValue;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
list = (XEventClass *) (first + stuff->num_events);
|
list = (XEventClass *) (first + stuff->num_events);
|
||||||
if ((ret = CreateMaskFromList(client, list, stuff->count, tmp, dev,
|
if ((ret = CreateMaskFromList(client, list, stuff->count, tmp, dev,
|
||||||
X_SendExtensionEvent)) != Success)
|
X_SendExtensionEvent)) != Success)
|
||||||
return Success;
|
return ret;
|
||||||
|
|
||||||
ret = (SendEvent(client, dev, stuff->destination,
|
ret = (SendEvent(client, dev, stuff->destination,
|
||||||
stuff->propagate, (xEvent *) & stuff[1],
|
stuff->propagate, (xEvent *) & stuff[1],
|
||||||
tmp[stuff->deviceid].mask, stuff->num_events));
|
tmp[stuff->deviceid].mask, stuff->num_events));
|
||||||
|
|
||||||
if (ret != Success)
|
return ret;
|
||||||
SendErrorToClient(client, IReqCode, X_SendExtensionEvent, 0, ret);
|
|
||||||
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
26
Xi/setbmap.c
26
Xi/setbmap.c
|
@ -59,13 +59,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -104,11 +101,8 @@ ProcXSetDeviceButtonMapping(ClientPtr client)
|
||||||
REQUEST_AT_LEAST_SIZE(xSetDeviceButtonMappingReq);
|
REQUEST_AT_LEAST_SIZE(xSetDeviceButtonMappingReq);
|
||||||
|
|
||||||
if (stuff->length != (sizeof(xSetDeviceButtonMappingReq) +
|
if (stuff->length != (sizeof(xSetDeviceButtonMappingReq) +
|
||||||
stuff->map_length + 3) >> 2) {
|
stuff->map_length + 3) >> 2)
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceButtonMapping, 0,
|
return BadLength;
|
||||||
BadLength);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
rep.repType = X_Reply;
|
rep.repType = X_Reply;
|
||||||
rep.RepType = X_SetDeviceButtonMapping;
|
rep.RepType = X_SetDeviceButtonMapping;
|
||||||
|
@ -117,24 +111,20 @@ ProcXSetDeviceButtonMapping(ClientPtr client)
|
||||||
rep.status = MappingSuccess;
|
rep.status = MappingSuccess;
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceButtonMapping, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = SetButtonMapping(client, dev, stuff->map_length, (BYTE *) & stuff[1]);
|
ret = SetButtonMapping(client, dev, stuff->map_length, (BYTE *) & stuff[1]);
|
||||||
|
|
||||||
if (ret == BadValue || ret == BadMatch) {
|
if (ret == BadValue || ret == BadMatch)
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceButtonMapping, 0, ret);
|
return ret;
|
||||||
return Success;
|
else {
|
||||||
} else {
|
|
||||||
rep.status = ret;
|
rep.status = ret;
|
||||||
WriteReplyToClient(client, sizeof(xSetDeviceButtonMappingReply), &rep);
|
WriteReplyToClient(client, sizeof(xSetDeviceButtonMappingReply), &rep);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret != MappingBusy)
|
if (ret != MappingBusy)
|
||||||
SendDeviceMappingNotify(MappingPointer, 0, 0, dev);
|
SendDeviceMappingNotify(client, MappingPointer, 0, 0, dev);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
36
Xi/setdval.c
36
Xi/setdval.c
|
@ -56,13 +56,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "XIstubs.h"
|
#include "XIstubs.h"
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -106,24 +103,17 @@ ProcXSetDeviceValuators(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
|
||||||
if (stuff->length != (sizeof(xSetDeviceValuatorsReq) >> 2) +
|
if (stuff->length != (sizeof(xSetDeviceValuatorsReq) >> 2) +
|
||||||
stuff->num_valuators) {
|
stuff->num_valuators)
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, BadLength);
|
return BadLength;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
|
||||||
if (dev == NULL) {
|
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, BadDevice);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
if (dev->valuator == NULL) {
|
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stuff->first_valuator + stuff->num_valuators > dev->valuator->numAxes) {
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0, BadValue);
|
if (dev == NULL)
|
||||||
return Success;
|
return BadDevice;
|
||||||
}
|
if (dev->valuator == NULL)
|
||||||
|
return BadMatch;
|
||||||
|
|
||||||
|
if (stuff->first_valuator + stuff->num_valuators > dev->valuator->numAxes)
|
||||||
|
return BadValue;
|
||||||
|
|
||||||
if ((dev->grab) && !SameClient(dev->grab, client))
|
if ((dev->grab) && !SameClient(dev->grab, client))
|
||||||
rep.status = AlreadyGrabbed;
|
rep.status = AlreadyGrabbed;
|
||||||
|
@ -133,11 +123,9 @@ ProcXSetDeviceValuators(ClientPtr client)
|
||||||
stuff->num_valuators);
|
stuff->num_valuators);
|
||||||
|
|
||||||
if (rep.status != Success && rep.status != AlreadyGrabbed)
|
if (rep.status != Success && rep.status != AlreadyGrabbed)
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceValuators, 0,
|
return rep.status;
|
||||||
rep.status);
|
|
||||||
else
|
|
||||||
WriteReplyToClient(client, sizeof(xSetDeviceValuatorsReply), &rep);
|
|
||||||
|
|
||||||
|
WriteReplyToClient(client, sizeof(xSetDeviceValuatorsReply), &rep);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,6 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "windowstr.h" /* focus struct */
|
#include "windowstr.h" /* focus struct */
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
|
@ -65,7 +63,6 @@ SOFTWARE.
|
||||||
|
|
||||||
#include "dixevents.h"
|
#include "dixevents.h"
|
||||||
|
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -106,15 +103,11 @@ ProcXSetDeviceFocus(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xSetDeviceFocusReq);
|
REQUEST_SIZE_MATCH(xSetDeviceFocusReq);
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->device);
|
dev = LookupDeviceIntRec(stuff->device);
|
||||||
if (dev == NULL || !dev->focus) {
|
if (dev == NULL || !dev->focus)
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceFocus, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = SetInputFocus(client, dev, stuff->focus, stuff->revertTo,
|
ret = SetInputFocus(client, dev, stuff->focus, stuff->revertTo,
|
||||||
stuff->time, TRUE);
|
stuff->time, TRUE);
|
||||||
if (ret != Success)
|
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceFocus, 0, ret);
|
|
||||||
|
|
||||||
return Success;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
19
Xi/setmmap.c
19
Xi/setmmap.c
|
@ -56,13 +56,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -103,11 +100,8 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
|
||||||
REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq);
|
REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq);
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceModifierMapping, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
rep.repType = X_Reply;
|
rep.repType = X_Reply;
|
||||||
rep.RepType = X_SetDeviceModifierMapping;
|
rep.RepType = X_SetDeviceModifierMapping;
|
||||||
|
@ -122,14 +116,11 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
|
||||||
if (ret == MappingSuccess || ret == MappingBusy || ret == MappingFailed) {
|
if (ret == MappingSuccess || ret == MappingBusy || ret == MappingFailed) {
|
||||||
rep.success = ret;
|
rep.success = ret;
|
||||||
if (ret == MappingSuccess)
|
if (ret == MappingSuccess)
|
||||||
SendDeviceMappingNotify(MappingModifier, 0, 0, dev);
|
SendDeviceMappingNotify(client, MappingModifier, 0, 0, dev);
|
||||||
WriteReplyToClient(client, sizeof(xSetDeviceModifierMappingReply),
|
WriteReplyToClient(client, sizeof(xSetDeviceModifierMappingReply),
|
||||||
&rep);
|
&rep);
|
||||||
} else {
|
} else if (ret == -1)
|
||||||
if (ret == -1)
|
return BadValue;
|
||||||
ret = BadValue;
|
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceModifierMapping, 0, ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
21
Xi/setmode.c
21
Xi/setmode.c
|
@ -56,13 +56,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "XIstubs.h"
|
#include "XIstubs.h"
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -105,14 +102,10 @@ ProcXSetDeviceMode(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
if (dev->valuator == NULL)
|
||||||
}
|
return BadMatch;
|
||||||
if (dev->valuator == NULL) {
|
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
if ((dev->grab) && !SameClient(dev->grab, client))
|
if ((dev->grab) && !SameClient(dev->grab, client))
|
||||||
rep.status = AlreadyGrabbed;
|
rep.status = AlreadyGrabbed;
|
||||||
else
|
else
|
||||||
|
@ -120,10 +113,8 @@ ProcXSetDeviceMode(ClientPtr client)
|
||||||
|
|
||||||
if (rep.status == Success)
|
if (rep.status == Success)
|
||||||
dev->valuator->mode = stuff->mode;
|
dev->valuator->mode = stuff->mode;
|
||||||
else if (rep.status != AlreadyGrabbed) {
|
else if (rep.status != AlreadyGrabbed)
|
||||||
SendErrorToClient(client, IReqCode, X_SetDeviceMode, 0, rep.status);
|
return rep.status;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
WriteReplyToClient(client, sizeof(xSetDeviceModeReply), &rep);
|
WriteReplyToClient(client, sizeof(xSetDeviceModeReply), &rep);
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
@ -56,12 +56,9 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
|
|
||||||
|
@ -102,10 +99,8 @@ ProcXUngrabDevice(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xUngrabDeviceReq);
|
REQUEST_SIZE_MATCH(xUngrabDeviceReq);
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->deviceid);
|
dev = LookupDeviceIntRec(stuff->deviceid);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDevice, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
grab = dev->grab;
|
grab = dev->grab;
|
||||||
|
|
||||||
time = ClientTimeToServerTime(stuff->time);
|
time = ClientTimeToServerTime(stuff->time);
|
||||||
|
|
|
@ -56,13 +56,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "dixgrabs.h"
|
#include "dixgrabs.h"
|
||||||
|
@ -111,41 +108,27 @@ ProcXUngrabDeviceButton(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
|
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->grabbed_device);
|
dev = LookupDeviceIntRec(stuff->grabbed_device);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
if (dev->button == NULL)
|
||||||
}
|
return BadMatch;
|
||||||
if (dev->button == NULL) {
|
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stuff->modifier_device != UseXKeyboard) {
|
if (stuff->modifier_device != UseXKeyboard) {
|
||||||
mdev = LookupDeviceIntRec(stuff->modifier_device);
|
mdev = LookupDeviceIntRec(stuff->modifier_device);
|
||||||
if (mdev == NULL) {
|
if (mdev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
if (mdev->key == NULL)
|
||||||
return Success;
|
return BadMatch;
|
||||||
}
|
|
||||||
if (mdev->key == NULL) {
|
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0,
|
|
||||||
BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
||||||
|
|
||||||
rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess);
|
rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess);
|
||||||
if (rc != Success) {
|
if (rc != Success)
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, rc);
|
return rc;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((stuff->modifiers != AnyModifier) &&
|
if ((stuff->modifiers != AnyModifier) &&
|
||||||
(stuff->modifiers & ~AllModifiersMask)) {
|
(stuff->modifiers & ~AllModifiersMask))
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadValue);
|
return BadValue;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
temporaryGrab.resource = client->clientAsMask;
|
temporaryGrab.resource = client->clientAsMask;
|
||||||
temporaryGrab.device = dev;
|
temporaryGrab.device = dev;
|
||||||
|
|
|
@ -56,13 +56,10 @@ SOFTWARE.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/X.h> /* for inputstr.h */
|
|
||||||
#include <X11/Xproto.h> /* Request macro */
|
|
||||||
#include "inputstr.h" /* DeviceIntPtr */
|
#include "inputstr.h" /* DeviceIntPtr */
|
||||||
#include "windowstr.h" /* window structure */
|
#include "windowstr.h" /* window structure */
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XIproto.h>
|
#include <X11/extensions/XIproto.h>
|
||||||
#include "extnsionst.h"
|
|
||||||
#include "extinit.h" /* LookupDeviceIntRec */
|
#include "extinit.h" /* LookupDeviceIntRec */
|
||||||
#include "exglobals.h"
|
#include "exglobals.h"
|
||||||
#include "dixgrabs.h"
|
#include "dixgrabs.h"
|
||||||
|
@ -111,45 +108,32 @@ ProcXUngrabDeviceKey(ClientPtr client)
|
||||||
REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
|
REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
|
||||||
|
|
||||||
dev = LookupDeviceIntRec(stuff->grabbed_device);
|
dev = LookupDeviceIntRec(stuff->grabbed_device);
|
||||||
if (dev == NULL) {
|
if (dev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadDevice);
|
return BadDevice;
|
||||||
return Success;
|
if (dev->key == NULL)
|
||||||
}
|
return BadMatch;
|
||||||
if (dev->key == NULL) {
|
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stuff->modifier_device != UseXKeyboard) {
|
if (stuff->modifier_device != UseXKeyboard) {
|
||||||
mdev = LookupDeviceIntRec(stuff->modifier_device);
|
mdev = LookupDeviceIntRec(stuff->modifier_device);
|
||||||
if (mdev == NULL) {
|
if (mdev == NULL)
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0,
|
return BadDevice;
|
||||||
BadDevice);
|
if (mdev->key == NULL)
|
||||||
return Success;
|
return BadMatch;
|
||||||
}
|
|
||||||
if (mdev->key == NULL) {
|
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadMatch);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
||||||
|
|
||||||
rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess);
|
rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess);
|
||||||
if (rc != Success) {
|
if (rc != Success)
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, rc);
|
return rc;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
if (((stuff->key > dev->key->curKeySyms.maxKeyCode) ||
|
if (((stuff->key > dev->key->curKeySyms.maxKeyCode) ||
|
||||||
(stuff->key < dev->key->curKeySyms.minKeyCode))
|
(stuff->key < dev->key->curKeySyms.minKeyCode))
|
||||||
&& (stuff->key != AnyKey)) {
|
&& (stuff->key != AnyKey))
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadValue);
|
return BadValue;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
if ((stuff->modifiers != AnyModifier) &&
|
if ((stuff->modifiers != AnyModifier) &&
|
||||||
(stuff->modifiers & ~AllModifiersMask)) {
|
(stuff->modifiers & ~AllModifiersMask))
|
||||||
SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadValue);
|
return BadValue;
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
temporaryGrab.resource = client->clientAsMask;
|
temporaryGrab.resource = client->clientAsMask;
|
||||||
temporaryGrab.device = dev;
|
temporaryGrab.device = dev;
|
||||||
|
|
|
@ -692,6 +692,9 @@ CompositeExtensionInit (void)
|
||||||
ExtensionEntry *extEntry;
|
ExtensionEntry *extEntry;
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
|
/* Assume initialization is going to fail */
|
||||||
|
noCompositeExtension = TRUE;
|
||||||
|
|
||||||
for (s = 0; s < screenInfo.numScreens; s++) {
|
for (s = 0; s < screenInfo.numScreens; s++) {
|
||||||
ScreenPtr pScreen = screenInfo.screens[s];
|
ScreenPtr pScreen = screenInfo.screens[s];
|
||||||
VisualPtr vis;
|
VisualPtr vis;
|
||||||
|
@ -748,4 +751,7 @@ CompositeExtensionInit (void)
|
||||||
return;
|
return;
|
||||||
miRegisterRedirectBorderClipProc (compSetRedirectBorderClip,
|
miRegisterRedirectBorderClipProc (compSetRedirectBorderClip,
|
||||||
compGetRedirectBorderClip);
|
compGetRedirectBorderClip);
|
||||||
|
|
||||||
|
/* Initialization succeeded */
|
||||||
|
noCompositeExtension = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,6 +87,7 @@ teardown(void)
|
||||||
dbus_connection_unref(bus_info.connection);
|
dbus_connection_unref(bus_info.connection);
|
||||||
|
|
||||||
RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info);
|
RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info);
|
||||||
|
if (bus_info.fd != -1)
|
||||||
RemoveGeneralSocket(bus_info.fd);
|
RemoveGeneralSocket(bus_info.fd);
|
||||||
bus_info.fd = -1;
|
bus_info.fd = -1;
|
||||||
bus_info.connection = NULL;
|
bus_info.connection = NULL;
|
||||||
|
|
18
configure.ac
18
configure.ac
|
@ -69,6 +69,12 @@ dnl Check for dtrace program (needed to build Xserver dtrace probes)
|
||||||
AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH],
|
AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH],
|
||||||
[Enable dtrace probes (default: enabled if dtrace found)]),
|
[Enable dtrace probes (default: enabled if dtrace found)]),
|
||||||
[WDTRACE=$withval], [WDTRACE=auto])
|
[WDTRACE=$withval], [WDTRACE=auto])
|
||||||
|
dnl Darwin 9 has dtrace, but it doesn't support compilation into ELF...
|
||||||
|
if test "x$WDTRACE" = xauto; then
|
||||||
|
case $host_os in
|
||||||
|
darwin*) WDTRACE="no" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then
|
if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then
|
||||||
AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin])
|
AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin])
|
||||||
if test "x$DTRACE" = "xnot_found" ; then
|
if test "x$DTRACE" = "xnot_found" ; then
|
||||||
|
@ -493,7 +499,6 @@ AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes exten
|
||||||
AC_ARG_ENABLE(xtrap, AS_HELP_STRING([--disable-xtrap], [Build XTrap extension (default: enabled)]), [XTRAP=$enableval], [XTRAP=yes])
|
AC_ARG_ENABLE(xtrap, AS_HELP_STRING([--disable-xtrap], [Build XTrap extension (default: enabled)]), [XTRAP=$enableval], [XTRAP=yes])
|
||||||
AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes])
|
AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes])
|
||||||
AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes])
|
AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes])
|
||||||
AC_ARG_ENABLE(quartz, AS_HELP_STRING([--enable-quartz], [Build with darwin quartz support (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
|
|
||||||
AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes])
|
AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes])
|
||||||
AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto])
|
AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto])
|
||||||
AC_ARG_ENABLE(screensaver, AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes])
|
AC_ARG_ENABLE(screensaver, AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes])
|
||||||
|
@ -516,7 +521,7 @@ AC_ARG_ENABLE(evi, AS_HELP_STRING([--disable-evi], [Build Extended-Vi
|
||||||
AC_ARG_ENABLE(multibuffer, AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no])
|
AC_ARG_ENABLE(multibuffer, AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no])
|
||||||
AC_ARG_ENABLE(fontcache, AS_HELP_STRING([--enable-fontcache], [Build FontCache extension (default: disabled)]), [FONTCACHE=$enableval], [FONTCACHE=no])
|
AC_ARG_ENABLE(fontcache, AS_HELP_STRING([--enable-fontcache], [Build FontCache extension (default: disabled)]), [FONTCACHE=$enableval], [FONTCACHE=no])
|
||||||
AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
|
AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
|
||||||
AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=yes])
|
AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=auto])
|
||||||
AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
|
AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
|
||||||
AC_ARG_ENABLE(config-dbus, AS_HELP_STRING([--enable-config-dbus], [Build D-BUS API support (default: no)]), [CONFIG_DBUS_API=$enableval], [CONFIG_DBUS_API=no])
|
AC_ARG_ENABLE(config-dbus, AS_HELP_STRING([--enable-config-dbus], [Build D-BUS API support (default: no)]), [CONFIG_DBUS_API=$enableval], [CONFIG_DBUS_API=no])
|
||||||
AC_ARG_ENABLE(config-hal, AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto])
|
AC_ARG_ENABLE(config-hal, AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto])
|
||||||
|
@ -528,6 +533,9 @@ AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (d
|
||||||
AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes])
|
AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes])
|
||||||
AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto])
|
AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto])
|
||||||
AC_ARG_ENABLE(xdarwin, AS_HELP_STRING([--enable-xdarwin], [Build XDarwin server (default: auto)]), [XDARWIN=$enableval], [XDARWIN=auto])
|
AC_ARG_ENABLE(xdarwin, AS_HELP_STRING([--enable-xdarwin], [Build XDarwin server (default: auto)]), [XDARWIN=$enableval], [XDARWIN=auto])
|
||||||
|
AC_ARG_ENABLE(xdarwinapp, AS_HELP_STRING([--enable-xdarwinapp], [Build XDarwin.app server (default: no)]), [XDARWINAPP=$enableval], [XDARWINAPP=no])
|
||||||
|
AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--disable-xquartz], [Build Xquartz server on Darwin (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
|
||||||
|
AC_ARG_ENABLE(x11app, AS_HELP_STRING([--enable-x11app], [Build Apple's X11.app wrapper for Xquartz (default: no)]), [X11APP=$enableval], [X11APP=no])
|
||||||
AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
|
AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
|
||||||
AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no])
|
AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no])
|
||||||
AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no])
|
AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no])
|
||||||
|
@ -1757,6 +1765,10 @@ return 0;}
|
||||||
AC_MSG_NOTICE([Disabling XF86VidMode extension])
|
AC_MSG_NOTICE([Disabling XF86VidMode extension])
|
||||||
XF86VIDMODE=no
|
XF86VIDMODE=no
|
||||||
fi
|
fi
|
||||||
|
if test "x$XF86BIGFONT" = xyes || test "x$XF86BIGFONT" = xauto; then
|
||||||
|
AC_MSG_NOTICE([Disabling XF86BigFont extension])
|
||||||
|
XF86BIGFONT=no
|
||||||
|
fi
|
||||||
if test "x$DGA" = xyes || test "x$DGA" = xauto; then
|
if test "x$DGA" = xyes || test "x$DGA" = xauto; then
|
||||||
AC_MSG_NOTICE([Disabling DGA extension])
|
AC_MSG_NOTICE([Disabling DGA extension])
|
||||||
DGA=no
|
DGA=no
|
||||||
|
@ -1776,7 +1788,9 @@ _AM_DEPENDENCIES([OBJC])
|
||||||
AM_CONDITIONAL(HAVE_XPLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes])
|
AM_CONDITIONAL(HAVE_XPLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes])
|
||||||
AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes])
|
AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes])
|
||||||
AM_CONDITIONAL(XDARWIN, [test "x$XDARWIN" = xyes])
|
AM_CONDITIONAL(XDARWIN, [test "x$XDARWIN" = xyes])
|
||||||
|
AM_CONDITIONAL(XDARWINAPP, [test "x$XDARWINAPP" = xyes])
|
||||||
AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes])
|
AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes])
|
||||||
|
|
||||||
dnl kdrive DDX
|
dnl kdrive DDX
|
||||||
|
|
||||||
XEPHYR_LIBS=
|
XEPHYR_LIBS=
|
||||||
|
|
|
@ -1194,10 +1194,9 @@ SendMappingNotify(unsigned request, unsigned firstKeyCode, unsigned count,
|
||||||
}
|
}
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
if (!noXkbExtension &&
|
if (!noXkbExtension &&
|
||||||
((request == MappingKeyboard) || (request == MappingModifier))) {
|
((request == MappingKeyboard) || (request == MappingModifier)))
|
||||||
XkbApplyMappingChange(inputInfo.keyboard, request, firstKeyCode, count,
|
XkbApplyMappingChange(inputInfo.keyboard, request, firstKeyCode, count,
|
||||||
client);
|
client);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 0 is the server client */
|
/* 0 is the server client */
|
||||||
|
@ -1348,6 +1347,7 @@ int
|
||||||
ProcSetModifierMapping(ClientPtr client)
|
ProcSetModifierMapping(ClientPtr client)
|
||||||
{
|
{
|
||||||
xSetModifierMappingReply rep;
|
xSetModifierMappingReply rep;
|
||||||
|
DeviceIntPtr dev;
|
||||||
int rc;
|
int rc;
|
||||||
REQUEST(xSetModifierMappingReq);
|
REQUEST(xSetModifierMappingReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xSetModifierMappingReq);
|
REQUEST_AT_LEAST_SIZE(xSetModifierMappingReq);
|
||||||
|
@ -1365,8 +1365,10 @@ ProcSetModifierMapping(ClientPtr client)
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
/* FIXME: Send mapping notifies for all the extended devices as well. */
|
|
||||||
SendMappingNotify(MappingModifier, 0, 0, client);
|
SendMappingNotify(MappingModifier, 0, 0, client);
|
||||||
|
for (dev = inputInfo.devices; dev; dev = dev->next)
|
||||||
|
if (dev->key && dev->coreEvents)
|
||||||
|
SendDeviceMappingNotify(client, MappingModifier, 0, 0, dev);
|
||||||
WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep);
|
WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep);
|
||||||
return client->noClientException;
|
return client->noClientException;
|
||||||
}
|
}
|
||||||
|
@ -1437,16 +1439,19 @@ ProcChangeKeyboardMapping(ClientPtr client)
|
||||||
keysyms.maxKeyCode = stuff->firstKeyCode + stuff->keyCodes - 1;
|
keysyms.maxKeyCode = stuff->firstKeyCode + stuff->keyCodes - 1;
|
||||||
keysyms.mapWidth = stuff->keySymsPerKeyCode;
|
keysyms.mapWidth = stuff->keySymsPerKeyCode;
|
||||||
keysyms.map = (KeySym *)&stuff[1];
|
keysyms.map = (KeySym *)&stuff[1];
|
||||||
for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
|
for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
|
||||||
if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) {
|
if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key)
|
||||||
if (!SetKeySymsMap(&pDev->key->curKeySyms, &keysyms))
|
if (!SetKeySymsMap(&pDev->key->curKeySyms, &keysyms))
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME: Send mapping notifies for all the extended devices as well. */
|
|
||||||
SendMappingNotify(MappingKeyboard, stuff->firstKeyCode, stuff->keyCodes,
|
SendMappingNotify(MappingKeyboard, stuff->firstKeyCode, stuff->keyCodes,
|
||||||
client);
|
client);
|
||||||
|
for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
|
||||||
|
if (pDev->key && pDev->coreEvents)
|
||||||
|
SendDeviceMappingNotify(client, MappingKeyboard,
|
||||||
|
stuff->firstKeyCode, stuff->keyCodes,
|
||||||
|
pDev);
|
||||||
|
|
||||||
return client->noClientException;
|
return client->noClientException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -402,6 +402,7 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
|
||||||
if (!events)
|
if (!events)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/* DO NOT WANT */
|
||||||
if (type != KeyPress && type != KeyRelease)
|
if (type != KeyPress && type != KeyRelease)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -409,6 +410,9 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
|
||||||
(pDev->coreEvents && !inputInfo.keyboard->key))
|
(pDev->coreEvents && !inputInfo.keyboard->key))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (key_code < 8 || key_code > 255)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (pDev->coreEvents)
|
if (pDev->coreEvents)
|
||||||
numEvents = 2;
|
numEvents = 2;
|
||||||
else
|
else
|
||||||
|
|
67
exa/exa.c
67
exa/exa.c
|
@ -277,6 +277,26 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
||||||
REGION_NULL(pScreen, &pExaPixmap->validSys);
|
REGION_NULL(pScreen, &pExaPixmap->validSys);
|
||||||
REGION_NULL(pScreen, &pExaPixmap->validFB);
|
REGION_NULL(pScreen, &pExaPixmap->validFB);
|
||||||
|
|
||||||
|
/* Check whether this pixmap can be used for acceleration. */
|
||||||
|
pExaPixmap->accel_blocked = 0;
|
||||||
|
|
||||||
|
if (pExaScr->info->maxPitchPixels) {
|
||||||
|
int max_pitch = pExaScr->info->maxPitchPixels * (bpp + 7) / 8;
|
||||||
|
|
||||||
|
if (pExaPixmap->fb_pitch > max_pitch)
|
||||||
|
pExaPixmap->accel_blocked |= EXA_RANGE_PITCH;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pExaScr->info->maxPitchBytes &&
|
||||||
|
pExaPixmap->fb_pitch > pExaScr->info->maxPitchBytes)
|
||||||
|
pExaPixmap->accel_blocked |= EXA_RANGE_PITCH;
|
||||||
|
|
||||||
|
if (w > pExaScr->info->maxX)
|
||||||
|
pExaPixmap->accel_blocked |= EXA_RANGE_WIDTH;
|
||||||
|
|
||||||
|
if (h > pExaScr->info->maxY)
|
||||||
|
pExaPixmap->accel_blocked |= EXA_RANGE_HEIGHT;
|
||||||
|
|
||||||
return pPixmap;
|
return pPixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,6 +679,17 @@ exaDriverInit (ScreenPtr pScreen,
|
||||||
if (!pScreenInfo)
|
if (!pScreenInfo)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (pScreenInfo->exa_major != EXA_VERSION_MAJOR ||
|
||||||
|
pScreenInfo->exa_minor > EXA_VERSION_MINOR)
|
||||||
|
{
|
||||||
|
LogMessage(X_ERROR, "EXA(%d): driver's EXA version requirements "
|
||||||
|
"(%d.%d) are incompatible with EXA version (%d.%d)\n",
|
||||||
|
pScreen->myNum,
|
||||||
|
pScreenInfo->exa_major, pScreenInfo->exa_minor,
|
||||||
|
EXA_VERSION_MAJOR, EXA_VERSION_MINOR);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!pScreenInfo->memoryBase) {
|
if (!pScreenInfo->memoryBase) {
|
||||||
LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::memoryBase must be "
|
LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::memoryBase must be "
|
||||||
"non-zero\n", pScreen->myNum);
|
"non-zero\n", pScreen->myNum);
|
||||||
|
@ -695,14 +726,36 @@ exaDriverInit (ScreenPtr pScreen,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pScreenInfo->exa_major != EXA_VERSION_MAJOR ||
|
/* If the driver doesn't set any max pitch values, we'll just assume
|
||||||
pScreenInfo->exa_minor > EXA_VERSION_MINOR)
|
* that there's a limitation by pixels, and that it's the same as
|
||||||
|
* maxX.
|
||||||
|
*/
|
||||||
|
if (!pScreenInfo->maxPitchPixels && !pScreenInfo->maxPitchBytes)
|
||||||
{
|
{
|
||||||
LogMessage(X_ERROR, "EXA(%d): driver's EXA version requirements "
|
pScreenInfo->maxPitchPixels = pScreenInfo->maxX;
|
||||||
"(%d.%d) are incompatible with EXA version (%d.%d)\n",
|
}
|
||||||
pScreen->myNum,
|
|
||||||
pScreenInfo->exa_major, pScreenInfo->exa_minor,
|
/* If set, maxPitchPixels must not be smaller than maxX. */
|
||||||
EXA_VERSION_MAJOR, EXA_VERSION_MINOR);
|
if (pScreenInfo->maxPitchPixels &&
|
||||||
|
pScreenInfo->maxPitchPixels < pScreenInfo->maxX)
|
||||||
|
{
|
||||||
|
LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::maxPitchPixels "
|
||||||
|
"is smaller than ExaDriverRec::maxX\n",
|
||||||
|
pScreen->myNum);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If set, maxPitchBytes must not be smaller than maxX * 4.
|
||||||
|
* This is to ensure that a 32bpp pixmap with the maximum width
|
||||||
|
* can be handled wrt the pitch.
|
||||||
|
*/
|
||||||
|
if (pScreenInfo->maxPitchBytes &&
|
||||||
|
pScreenInfo->maxPitchBytes < (pScreenInfo->maxX * 4))
|
||||||
|
{
|
||||||
|
LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::maxPitchBytes "
|
||||||
|
"doesn't allow a 32bpp pixmap with width equal to "
|
||||||
|
"ExaDriverRec::maxX\n",
|
||||||
|
pScreen->myNum);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
33
exa/exa.h
33
exa/exa.h
|
@ -39,7 +39,7 @@
|
||||||
#include "fb.h"
|
#include "fb.h"
|
||||||
|
|
||||||
#define EXA_VERSION_MAJOR 2
|
#define EXA_VERSION_MAJOR 2
|
||||||
#define EXA_VERSION_MINOR 2
|
#define EXA_VERSION_MINOR 3
|
||||||
#define EXA_VERSION_RELEASE 0
|
#define EXA_VERSION_RELEASE 0
|
||||||
|
|
||||||
typedef struct _ExaOffscreenArea ExaOffscreenArea;
|
typedef struct _ExaOffscreenArea ExaOffscreenArea;
|
||||||
|
@ -671,6 +671,37 @@ typedef struct _ExaDriver {
|
||||||
*/
|
*/
|
||||||
#define EXA_PREPARE_MASK 2
|
#define EXA_PREPARE_MASK 2
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* maxPitchPixels controls the pitch limitation for rendering from
|
||||||
|
* the card.
|
||||||
|
* The driver should never receive a request for rendering a pixmap
|
||||||
|
* that has a pitch (in pixels) beyond maxPitchPixels.
|
||||||
|
*
|
||||||
|
* Setting this field is optional -- if your hardware doesn't have
|
||||||
|
* a pitch limitation in pixels, don't set this. If neither this value
|
||||||
|
* nor maxPitchBytes is set, then maxPitchPixels is set to maxX.
|
||||||
|
* If set, it must not be smaller than maxX.
|
||||||
|
*
|
||||||
|
* @sa maxPitchBytes
|
||||||
|
*/
|
||||||
|
int maxPitchPixels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* maxPitchBytes controls the pitch limitation for rendering from
|
||||||
|
* the card.
|
||||||
|
* The driver should never receive a request for rendering a pixmap
|
||||||
|
* that has a pitch (in bytes) beyond maxPitchBytes.
|
||||||
|
*
|
||||||
|
* Setting this field is optional -- if your hardware doesn't have
|
||||||
|
* a pitch limitation in bytes, don't set this.
|
||||||
|
* If set, it must not be smaller than maxX * 4.
|
||||||
|
* There's no default value for maxPitchBytes.
|
||||||
|
*
|
||||||
|
* @sa maxPitchPixels
|
||||||
|
*/
|
||||||
|
int maxPitchBytes;
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
} ExaDriverRec, *ExaDriverPtr;
|
} ExaDriverRec, *ExaDriverPtr;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
||||||
ScreenPtr pScreen = pDrawable->pScreen;
|
ScreenPtr pScreen = pDrawable->pScreen;
|
||||||
ExaScreenPriv (pScreen);
|
ExaScreenPriv (pScreen);
|
||||||
RegionPtr pClip = fbGetCompositeClip(pGC);
|
RegionPtr pClip = fbGetCompositeClip(pGC);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable);
|
||||||
|
ExaPixmapPriv (pPixmap);
|
||||||
BoxPtr pextent, pbox;
|
BoxPtr pextent, pbox;
|
||||||
int nbox;
|
int nbox;
|
||||||
int extentX1, extentX2, extentY1, extentY2;
|
int extentX1, extentX2, extentY1, extentY2;
|
||||||
|
@ -54,13 +55,12 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
pixmaps[0].as_src = FALSE;
|
pixmaps[0].as_src = FALSE;
|
||||||
pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable);
|
pixmaps[0].pPix = pPixmap;
|
||||||
pixmaps[0].pReg = NULL;
|
pixmaps[0].pReg = NULL;
|
||||||
|
|
||||||
if (pExaScr->swappedOut ||
|
if (pExaScr->swappedOut ||
|
||||||
pGC->fillStyle != FillSolid ||
|
pGC->fillStyle != FillSolid ||
|
||||||
pPixmap->drawable.width > pExaScr->info->maxX ||
|
pExaPixmap->accel_blocked)
|
||||||
pPixmap->drawable.height > pExaScr->info->maxY)
|
|
||||||
{
|
{
|
||||||
ExaCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted);
|
ExaCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted);
|
||||||
return;
|
return;
|
||||||
|
@ -480,6 +480,7 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDstDrawable->pScreen);
|
ExaScreenPriv (pDstDrawable->pScreen);
|
||||||
PixmapPtr pSrcPixmap, pDstPixmap;
|
PixmapPtr pSrcPixmap, pDstPixmap;
|
||||||
|
ExaPixmapPrivPtr pSrcExaPixmap, pDstExaPixmap;
|
||||||
int src_off_x, src_off_y;
|
int src_off_x, src_off_y;
|
||||||
int dst_off_x, dst_off_y;
|
int dst_off_x, dst_off_y;
|
||||||
ExaMigrationRec pixmaps[2];
|
ExaMigrationRec pixmaps[2];
|
||||||
|
@ -527,14 +528,14 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
pixmaps[1].pPix = pSrcPixmap;
|
pixmaps[1].pPix = pSrcPixmap;
|
||||||
pixmaps[1].pReg = NULL;
|
pixmaps[1].pReg = NULL;
|
||||||
|
|
||||||
/* Respect maxX/maxY in a trivial way: don't set up drawing when we might
|
pSrcExaPixmap = ExaGetPixmapPriv (pSrcPixmap);
|
||||||
* violate the limits. The proper solution would be a temporary pixmap
|
pDstExaPixmap = ExaGetPixmapPriv (pDstPixmap);
|
||||||
* adjusted so that the drawing happened within limits.
|
|
||||||
|
/* Check whether the accelerator can use this pixmap.
|
||||||
|
* FIXME: If it cannot, use temporary pixmaps so that the drawing
|
||||||
|
* happens within limits.
|
||||||
*/
|
*/
|
||||||
if (pSrcPixmap->drawable.width > pExaScr->info->maxX ||
|
if (pSrcExaPixmap->accel_blocked || pDstExaPixmap->accel_blocked)
|
||||||
pSrcPixmap->drawable.height > pExaScr->info->maxY ||
|
|
||||||
pDstPixmap->drawable.width > pExaScr->info->maxX ||
|
|
||||||
pDstPixmap->drawable.height > pExaScr->info->maxY)
|
|
||||||
{
|
{
|
||||||
goto fallback;
|
goto fallback;
|
||||||
} else {
|
} else {
|
||||||
|
@ -760,6 +761,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
RegionPtr pClip = fbGetCompositeClip(pGC);
|
RegionPtr pClip = fbGetCompositeClip(pGC);
|
||||||
PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
|
PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
|
||||||
|
ExaPixmapPriv (pPixmap);
|
||||||
register BoxPtr pbox;
|
register BoxPtr pbox;
|
||||||
BoxPtr pextent;
|
BoxPtr pextent;
|
||||||
int extentX1, extentX2, extentY1, extentY2;
|
int extentX1, extentX2, extentY1, extentY2;
|
||||||
|
@ -786,9 +788,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
|
|
||||||
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||||
|
|
||||||
if (pExaScr->swappedOut ||
|
if (pExaScr->swappedOut || pExaPixmap->accel_blocked)
|
||||||
pPixmap->drawable.width > pExaScr->info->maxX ||
|
|
||||||
pPixmap->drawable.height > pExaScr->info->maxY)
|
|
||||||
{
|
{
|
||||||
goto fallback;
|
goto fallback;
|
||||||
}
|
}
|
||||||
|
@ -1102,21 +1102,21 @@ exaFillRegionSolid (DrawablePtr pDrawable,
|
||||||
CARD32 alu)
|
CARD32 alu)
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pDrawable->pScreen);
|
ExaScreenPriv(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable);
|
||||||
|
ExaPixmapPriv (pPixmap);
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
ExaMigrationRec pixmaps[1];
|
ExaMigrationRec pixmaps[1];
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
pixmaps[0].as_src = FALSE;
|
pixmaps[0].as_src = FALSE;
|
||||||
pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable);
|
pixmaps[0].pPix = pPixmap;
|
||||||
pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillSolid,
|
pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillSolid,
|
||||||
alu) ? NULL : pRegion;
|
alu) ? NULL : pRegion;
|
||||||
|
|
||||||
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||||
REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
|
REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
|
||||||
|
|
||||||
if (pPixmap->drawable.width > pExaScr->info->maxX ||
|
if (pExaPixmap->accel_blocked)
|
||||||
pPixmap->drawable.height > pExaScr->info->maxY)
|
|
||||||
{
|
{
|
||||||
goto fallback;
|
goto fallback;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1193,6 +1193,8 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pDrawable->pScreen);
|
ExaScreenPriv(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
|
ExaPixmapPrivPtr pExaPixmap;
|
||||||
|
ExaPixmapPrivPtr pTileExaPixmap = ExaGetPixmapPriv(pTile);
|
||||||
int xoff, yoff, tileXoff, tileYoff;
|
int xoff, yoff, tileXoff, tileYoff;
|
||||||
int tileWidth, tileHeight;
|
int tileWidth, tileHeight;
|
||||||
ExaMigrationRec pixmaps[2];
|
ExaMigrationRec pixmaps[2];
|
||||||
|
@ -1223,10 +1225,9 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||||
REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
|
REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
|
||||||
|
|
||||||
if (pPixmap->drawable.width > pExaScr->info->maxX ||
|
pExaPixmap = ExaGetPixmapPriv (pPixmap);
|
||||||
pPixmap->drawable.height > pExaScr->info->maxY ||
|
|
||||||
tileWidth > pExaScr->info->maxX ||
|
if (pExaPixmap->accel_blocked || pTileExaPixmap->accel_blocked)
|
||||||
tileHeight > pExaScr->info->maxY)
|
|
||||||
{
|
{
|
||||||
goto fallback;
|
goto fallback;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -154,6 +154,10 @@ extern DevPrivateKey exaPixmapPrivateKey;
|
||||||
#define ExaSetPixmapPriv(p,a) dixSetPrivate(&(p)->devPrivates, exaPixmapPrivateKey, a)
|
#define ExaSetPixmapPriv(p,a) dixSetPrivate(&(p)->devPrivates, exaPixmapPrivateKey, a)
|
||||||
#define ExaPixmapPriv(p) ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p)
|
#define ExaPixmapPriv(p) ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p)
|
||||||
|
|
||||||
|
#define EXA_RANGE_PITCH (1 << 0)
|
||||||
|
#define EXA_RANGE_WIDTH (1 << 1)
|
||||||
|
#define EXA_RANGE_HEIGHT (1 << 2)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ExaOffscreenArea *area;
|
ExaOffscreenArea *area;
|
||||||
int score; /**< score for the move-in vs move-out heuristic */
|
int score; /**< score for the move-in vs move-out heuristic */
|
||||||
|
@ -166,6 +170,17 @@ typedef struct {
|
||||||
int fb_pitch; /**< pitch of pixmap in framebuffer memory */
|
int fb_pitch; /**< pitch of pixmap in framebuffer memory */
|
||||||
unsigned int fb_size; /**< size of pixmap in framebuffer memory */
|
unsigned int fb_size; /**< size of pixmap in framebuffer memory */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds information about whether this pixmap can be used for
|
||||||
|
* acceleration (== 0) or not (> 0).
|
||||||
|
*
|
||||||
|
* Contains a OR'ed combination of the following values:
|
||||||
|
* EXA_RANGE_PITCH - set if the pixmap's pitch is out of range
|
||||||
|
* EXA_RANGE_WIDTH - set if the pixmap's width is out of range
|
||||||
|
* EXA_RANGE_HEIGHT - set if the pixmap's height is out of range
|
||||||
|
*/
|
||||||
|
unsigned int accel_blocked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The damage record contains the areas of the pixmap's current location
|
* The damage record contains the areas of the pixmap's current location
|
||||||
* (framebuffer or system) that have been damaged compared to the other
|
* (framebuffer or system) that have been damaged compared to the other
|
||||||
|
|
|
@ -336,24 +336,28 @@ exaTryDriverComposite(CARD8 op,
|
||||||
int nbox;
|
int nbox;
|
||||||
int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y;
|
int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y;
|
||||||
PixmapPtr pSrcPix, pMaskPix = NULL, pDstPix;
|
PixmapPtr pSrcPix, pMaskPix = NULL, pDstPix;
|
||||||
|
ExaPixmapPrivPtr pSrcExaPix, pMaskExaPix = NULL, pDstExaPix;
|
||||||
struct _Pixmap scratch;
|
struct _Pixmap scratch;
|
||||||
ExaMigrationRec pixmaps[3];
|
ExaMigrationRec pixmaps[3];
|
||||||
|
|
||||||
pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable);
|
pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable);
|
||||||
pDstPix = exaGetDrawablePixmap(pDst->pDrawable);
|
pSrcExaPix = ExaGetPixmapPriv(pSrcPix);
|
||||||
if (pMask)
|
|
||||||
pMaskPix = exaGetDrawablePixmap(pMask->pDrawable);
|
|
||||||
|
|
||||||
/* Bail if we might exceed coord limits by rendering from/to these. We
|
pDstPix = exaGetDrawablePixmap(pDst->pDrawable);
|
||||||
* should really be making some scratch pixmaps with offsets and coords
|
pDstExaPix = ExaGetPixmapPriv(pDstPix);
|
||||||
* adjusted to deal with this, but it hasn't been done yet.
|
|
||||||
|
if (pMask) {
|
||||||
|
pMaskPix = exaGetDrawablePixmap(pMask->pDrawable);
|
||||||
|
pMaskExaPix = ExaGetPixmapPriv(pMaskPix);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check whether the accelerator can use these pixmaps.
|
||||||
|
* FIXME: If it cannot, use temporary pixmaps so that the drawing
|
||||||
|
* happens within limits.
|
||||||
*/
|
*/
|
||||||
if (pSrcPix->drawable.width > pExaScr->info->maxX ||
|
if (pSrcExaPix->accel_blocked ||
|
||||||
pSrcPix->drawable.height > pExaScr->info->maxY ||
|
pDstExaPix->accel_blocked ||
|
||||||
pDstPix->drawable.width > pExaScr->info->maxX ||
|
(pMask && (pMaskExaPix->accel_blocked)))
|
||||||
pDstPix->drawable.height > pExaScr->info->maxY ||
|
|
||||||
(pMask && (pMaskPix->drawable.width > pExaScr->info->maxX ||
|
|
||||||
pMaskPix->drawable.height > pExaScr->info->maxY)))
|
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -380,7 +384,6 @@ exaTryDriverComposite(CARD8 op,
|
||||||
width, height))
|
width, height))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
pDstPix = exaGetDrawablePixmap (pDst->pDrawable);
|
|
||||||
exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y);
|
exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y);
|
||||||
|
|
||||||
REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y);
|
REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y);
|
||||||
|
@ -391,12 +394,12 @@ exaTryDriverComposite(CARD8 op,
|
||||||
pixmaps[0].pReg = pixmaps[0].as_src ? NULL : ®ion;
|
pixmaps[0].pReg = pixmaps[0].as_src ? NULL : ®ion;
|
||||||
pixmaps[1].as_dst = FALSE;
|
pixmaps[1].as_dst = FALSE;
|
||||||
pixmaps[1].as_src = TRUE;
|
pixmaps[1].as_src = TRUE;
|
||||||
pixmaps[1].pPix = exaGetDrawablePixmap (pSrc->pDrawable);
|
pixmaps[1].pPix = pSrcPix;
|
||||||
pixmaps[1].pReg = NULL;
|
pixmaps[1].pReg = NULL;
|
||||||
if (pMask) {
|
if (pMask) {
|
||||||
pixmaps[2].as_dst = FALSE;
|
pixmaps[2].as_dst = FALSE;
|
||||||
pixmaps[2].as_src = TRUE;
|
pixmaps[2].as_src = TRUE;
|
||||||
pixmaps[2].pPix = exaGetDrawablePixmap (pMask->pDrawable);
|
pixmaps[2].pPix = pMaskPix;
|
||||||
pixmaps[2].pReg = NULL;
|
pixmaps[2].pReg = NULL;
|
||||||
exaDoMigration(pixmaps, 3, TRUE);
|
exaDoMigration(pixmaps, 3, TRUE);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -8,27 +8,35 @@ INCLUDES = @XORG_INCS@ -I../../miext/rootless
|
||||||
DEFS = @DEFS@ -DUSE_NEW_CLUT
|
DEFS = @DEFS@ -DUSE_NEW_CLUT
|
||||||
|
|
||||||
if XQUARTZ
|
if XQUARTZ
|
||||||
XQUARTZ_SUBDIRS = bundle quartz
|
XQUARTZ_SUBDIRS = quartz
|
||||||
|
XQUARTZ_PROGS = Xquartz
|
||||||
|
XQUARTZ_HOOK = xquartz-install-hook
|
||||||
|
endif
|
||||||
|
|
||||||
|
if XDARWINAPP
|
||||||
|
XDARWINAPP_SUBDIRS = bundle
|
||||||
|
XDARWINAPP_HOOK = xdarwinapp-install-hook
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
iokit \
|
iokit \
|
||||||
$(XQUARTZ_SUBDIRS) \
|
$(XQUARTZ_SUBDIRS) \
|
||||||
|
$(XDARWINAPP_SUBDIRS) \
|
||||||
utils \
|
utils \
|
||||||
.
|
.
|
||||||
|
|
||||||
darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app
|
|
||||||
|
|
||||||
libdarwinShared_a_SOURCES = darwin.c \
|
libdarwinShared_a_SOURCES = darwin.c \
|
||||||
darwinEvents.c \
|
darwinEvents.c \
|
||||||
darwinKeyboard.c \
|
darwinKeyboard.c \
|
||||||
$(darwin_XINPUT_SRCS)
|
$(darwin_XINPUT_SRCS)
|
||||||
|
|
||||||
bin_PROGRAMS = XDarwin Xquartz
|
# bin_PROGRAMS = XDarwin Xquartz
|
||||||
XDarwin_SOURCES = \
|
bin_PROGRAMS = $(XQUARTZ_PROGS)
|
||||||
$(top_srcdir)/fb/fbcmap_mi.c \
|
|
||||||
$(top_srcdir)/mi/miinitext.c \
|
#XDarwin_SOURCES = \
|
||||||
$(top_srcdir)/Xi/stubs.c
|
# $(top_srcdir)/fb/fbcmap_mi.c \
|
||||||
|
# $(top_srcdir)/mi/miinitext.c \
|
||||||
|
# $(top_srcdir)/Xi/stubs.c
|
||||||
|
|
||||||
Xquartz_SOURCES = \
|
Xquartz_SOURCES = \
|
||||||
$(top_srcdir)/fb/fbcmap_mi.c \
|
$(top_srcdir)/fb/fbcmap_mi.c \
|
||||||
|
@ -68,22 +76,22 @@ DARWIN_LIBS = \
|
||||||
./libdarwinShared.a \
|
./libdarwinShared.a \
|
||||||
$(XSERVER_LIBS)
|
$(XSERVER_LIBS)
|
||||||
|
|
||||||
XDARWIN_LIBS = \
|
#XDARWIN_LIBS = \
|
||||||
$(DARWIN_LIBS) \
|
# $(DARWIN_LIBS) \
|
||||||
./iokit/libiokit.a
|
# ./iokit/libiokit.a
|
||||||
XQUARTZ_LIBS = \
|
XQUARTZ_LIBS = \
|
||||||
$(DARWIN_LIBS)
|
$(DARWIN_LIBS)
|
||||||
|
|
||||||
XDarwin_DEPENDENCIES = $(XDARWIN_LIBS)
|
#XDarwin_DEPENDENCIES = $(XDARWIN_LIBS)
|
||||||
XDarwin_LDADD = $(XDARWIN_LIBS) $(XSERVER_SYS_LIBS)
|
#XDarwin_LDADD = $(XDARWIN_LIBS) $(XSERVER_SYS_LIBS)
|
||||||
|
|
||||||
Xquartz_DEPENDENCIES = $(XQUARTZ_LIBS)
|
Xquartz_DEPENDENCIES = $(XQUARTZ_LIBS)
|
||||||
Xquartz_LDADD = $(XQUARTZ_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
|
Xquartz_LDADD = $(XQUARTZ_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
|
||||||
|
|
||||||
XDarwin_LDFLAGS = \
|
#XDarwin_LDFLAGS = \
|
||||||
-XCClinker -Objc \
|
# -XCClinker -Objc \
|
||||||
-Wl,-u,_miDCInitialize \
|
# -Wl,-u,_miDCInitialize \
|
||||||
-Wl,-framework,IOKit
|
# -Wl,-framework,IOKit
|
||||||
|
|
||||||
Xquartz_LDFLAGS = \
|
Xquartz_LDFLAGS = \
|
||||||
-XCClinker -Objc \
|
-XCClinker -Objc \
|
||||||
|
@ -95,19 +103,23 @@ Xquartz_LDFLAGS = \
|
||||||
-Wl,-framework,CoreAudio \
|
-Wl,-framework,CoreAudio \
|
||||||
-Wl,-framework,IOKit
|
-Wl,-framework,IOKit
|
||||||
|
|
||||||
XDarwin_CFLAGS = -DINXDARWIN
|
#XDarwin_CFLAGS = -DINXDARWIN
|
||||||
Xquartz_CFLAGS = -DINXQUARTZ -DHAS_CG_MACH_PORT -DHAS_KL_API -DHAVE_XORG_CONFIG_H
|
Xquartz_CFLAGS = -DINXQUARTZ -DHAS_CG_MACH_PORT -DHAS_KL_API -DHAVE_XORG_CONFIG_H
|
||||||
|
|
||||||
if XQUARTZ
|
if XQUARTZ
|
||||||
macosdir = $(darwinappdir)/Contents/MacOS
|
|
||||||
|
|
||||||
DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server
|
DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server
|
||||||
|
|
||||||
macos_PROGRAMS = XDarwinApp
|
bin_SCRIPTS = x11app
|
||||||
macos_SCRIPTS = x11app
|
|
||||||
|
|
||||||
x11app:
|
x11app:
|
||||||
cd apple && xcodebuild CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)"
|
cd apple && xcodebuild CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)"
|
||||||
|
endif
|
||||||
|
|
||||||
|
if XDARWINAPP
|
||||||
|
macosdir = $(darwinappdir)/Contents/MacOS
|
||||||
|
|
||||||
|
macos_PROGRAMS = XDarwinApp
|
||||||
|
darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app
|
||||||
|
|
||||||
XDarwinApp_SOURCES = \
|
XDarwinApp_SOURCES = \
|
||||||
$(top_srcdir)/fb/fbcmap_mi.c \
|
$(top_srcdir)/fb/fbcmap_mi.c \
|
||||||
|
@ -134,8 +146,6 @@ XDarwinApp_LDFLAGS = \
|
||||||
-Wl,-framework,IOKit
|
-Wl,-framework,IOKit
|
||||||
|
|
||||||
XDarwinApp_CFLAGS = -DINXDARWINAPP
|
XDarwinApp_CFLAGS = -DINXDARWINAPP
|
||||||
HOOK_TARGETS = xquartz-install-hook
|
|
||||||
|
|
||||||
|
|
||||||
crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS
|
crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS
|
||||||
crplugin_LTLIBRARIES = cr.la
|
crplugin_LTLIBRARIES = cr.la
|
||||||
|
@ -190,7 +200,6 @@ glxMesa_la_LDFLAGS = -shrext '' \
|
||||||
glxMesa_la_DEPENDENCIES = XDarwinApp
|
glxMesa_la_DEPENDENCIES = XDarwinApp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
|
||||||
if HAVE_XPLUGIN
|
if HAVE_XPLUGIN
|
||||||
|
|
||||||
xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS
|
xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS
|
||||||
|
@ -254,18 +263,21 @@ glxAGL_la_DEPENDENCIES = XDarwinApp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
man1_MANS = XDarwin.man
|
#man1_MANS = XDarwin.man
|
||||||
|
|
||||||
uninstall-hook:
|
#uninstall-hook:
|
||||||
rm -rf $(DESTDIR)$(macosdir)/XDarwin
|
# rm -rf $(DESTDIR)$(macosdir)/XDarwin
|
||||||
|
|
||||||
install-data-hook: $(HOOK_TARGETS)
|
install-data-hook: $(XQUARTZ_HOOK) $(XDARWINAPP_HOOK)
|
||||||
|
|
||||||
xquartz-install-hook:
|
xquartz-install-hook::
|
||||||
|
cd apple && xcodebuild install CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)"
|
||||||
|
|
||||||
|
xdarwinapp-install hook:
|
||||||
mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin
|
mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin
|
||||||
cd apple && xcodebuild install
|
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
darwin.c \
|
darwin.c \
|
||||||
|
|
|
@ -4,42 +4,6 @@
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>English</string>
|
<string>English</string>
|
||||||
<key>CFBundleDocumentTypes</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleTypeExtensions</key>
|
|
||||||
<array>
|
|
||||||
<string>x11app</string>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleTypeIconFile</key>
|
|
||||||
<string>X11.icns</string>
|
|
||||||
<key>CFBundleTypeName</key>
|
|
||||||
<string>X11 Application</string>
|
|
||||||
<key>CFBundleTypeOSTypes</key>
|
|
||||||
<array>
|
|
||||||
<string>****</string>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleTypeRole</key>
|
|
||||||
<string>Viewer</string>
|
|
||||||
<key>LSIsAppleDefaultForType</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleTypeExtensions</key>
|
|
||||||
<array>
|
|
||||||
<string>tool</string>
|
|
||||||
<string>*</string>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleTypeName</key>
|
|
||||||
<string>UNIX Application</string>
|
|
||||||
<key>CFBundleTypeOSTypes</key>
|
|
||||||
<array>
|
|
||||||
<string>****</string>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleTypeRole</key>
|
|
||||||
<string>Viewer</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>X11</string>
|
<string>X11</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
|
@ -57,7 +21,7 @@
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.0</string>
|
<string>2.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>x11a</string>
|
||||||
<key>CSResourcesFileMapped</key>
|
<key>CSResourcesFileMapped</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
|
|
@ -79,7 +79,7 @@ extern void X11ApplicationMain (int argc, const char *argv[],
|
||||||
extern int X11EnableKeyEquivalents;
|
extern int X11EnableKeyEquivalents;
|
||||||
extern int quartzHasRoot, quartzEnableRootless;
|
extern int quartzHasRoot, quartzEnableRootless;
|
||||||
|
|
||||||
#define APP_PREFS "com.apple.x11"
|
#define APP_PREFS "org.x.x11"
|
||||||
|
|
||||||
#define PREFS_APPSMENU "apps_menu"
|
#define PREFS_APPSMENU "apps_menu"
|
||||||
#define PREFS_FAKEBUTTONS "enable_fake_buttons"
|
#define PREFS_FAKEBUTTONS "enable_fake_buttons"
|
||||||
|
|
|
@ -41,13 +41,11 @@
|
||||||
# include "micmap.h"
|
# include "micmap.h"
|
||||||
#undef BOOL
|
#undef BOOL
|
||||||
|
|
||||||
//#include "xf86Version.h"
|
|
||||||
|
|
||||||
#include <mach/mach.h>
|
#include <mach/mach.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
#define DEFAULTS_FILE "/etc/X11/xserver/Xquartz.plist"
|
#define DEFAULTS_FILE "/usr/X11/lib/X11xserver/Xquartz.plist"
|
||||||
|
|
||||||
int X11EnableKeyEquivalents = TRUE;
|
int X11EnableKeyEquivalents = TRUE;
|
||||||
int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
|
int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
|
||||||
|
@ -275,9 +273,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
|
||||||
_appFlags._active = YES;
|
_appFlags._active = YES;
|
||||||
|
|
||||||
[self activateX:YES];
|
[self activateX:YES];
|
||||||
#ifdef DARWIN_DDX_MISSING
|
if ([e data2] & 0x10) X11ApplicationSetFrontProcess();
|
||||||
if ([e data2] & 0x10) QuartzMessageServerThread (kXDarwinBringAllToFront, 0);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -38,14 +38,12 @@
|
||||||
|
|
||||||
/* ouch! */
|
/* ouch! */
|
||||||
#define BOOL X_BOOL
|
#define BOOL X_BOOL
|
||||||
//# include "Xproto.h"
|
|
||||||
#include "opaque.h"
|
#include "opaque.h"
|
||||||
# include "darwin.h"
|
# include "darwin.h"
|
||||||
# include "../quartz/quartz.h"
|
# include "../quartz/quartz.h"
|
||||||
# define _APPLEWM_SERVER_
|
# define _APPLEWM_SERVER_
|
||||||
# include "X11/extensions/applewm.h"
|
# include "X11/extensions/applewm.h"
|
||||||
# include "../quartz/applewmExt.h"
|
# include "../quartz/applewmExt.h"
|
||||||
//# include "X.h"
|
|
||||||
#undef BOOL
|
#undef BOOL
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -301,6 +299,7 @@
|
||||||
int child1, child2 = 0;
|
int child1, child2 = 0;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
|
/* this old code doesn't work with csh ...
|
||||||
shell = getenv("SHELL");
|
shell = getenv("SHELL");
|
||||||
if (shell == NULL) shell = "/bin/bash";
|
if (shell == NULL) shell = "/bin/bash";
|
||||||
|
|
||||||
|
@ -309,6 +308,12 @@
|
||||||
argv[2] = "-c";
|
argv[2] = "-c";
|
||||||
argv[3] = command;
|
argv[3] = command;
|
||||||
argv[4] = NULL;
|
argv[4] = NULL;
|
||||||
|
... but the new code doesn't work with spaces in a command :(
|
||||||
|
*/
|
||||||
|
|
||||||
|
argv[0] = "/usr/bin/login";
|
||||||
|
argv[1] = "-fp";
|
||||||
|
argv[2] = getlogin();
|
||||||
|
|
||||||
/* Do the fork-twice trick to avoid having to reap zombies */
|
/* Do the fork-twice trick to avoid having to reap zombies */
|
||||||
|
|
||||||
|
@ -655,7 +660,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
|
||||||
|
|
||||||
- (IBAction) x11_help:sender
|
- (IBAction) x11_help:sender
|
||||||
{
|
{
|
||||||
AHLookupAnchor (CFSTR ("Mac Help"), CFSTR ("mchlp2276"));
|
AHLookupAnchor ((CFStringRef)NSLocalizedString(@"Mac Help", no comment), CFSTR ("mchlp2276"));
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) validateMenuItem:(NSMenuItem *)item
|
- (BOOL) validateMenuItem:(NSMenuItem *)item
|
||||||
|
|
|
@ -70,14 +70,16 @@
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xauth.h>
|
#include <X11/Xauth.h>
|
||||||
|
#ifdef USE_XCB
|
||||||
|
#include <xcb/xcb.h>
|
||||||
|
#endif
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
#include <SystemConfiguration/SystemConfiguration.h>
|
#include <SystemConfiguration/SystemConfiguration.h>
|
||||||
|
|
||||||
#define X_SERVER "/usr/X11/bin/Xquartz"
|
#define X_SERVER "/usr/X11/bin/Xquartz"
|
||||||
#define XTERM_PATH "/usr/X11/bin/xterm"
|
#define XTERM_PATH "/usr/X11/bin/xterm"
|
||||||
#define WM_PATH "/usr/X11/bin/quartz-wm"
|
#define WM_PATH "/usr/bin/quartz-wm"
|
||||||
#define DEFAULT_XINITRC "/etc/X11/xinit/xinitrc"
|
#define DEFAULT_XINITRC "/usr/X11/lib/X11/xinit/xinitrc"
|
||||||
#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin"
|
#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin"
|
||||||
|
|
||||||
/* what xinit does */
|
/* what xinit does */
|
||||||
|
@ -595,37 +597,25 @@ static Boolean
|
||||||
display_exists_p (int number)
|
display_exists_p (int number)
|
||||||
{
|
{
|
||||||
char buf[64];
|
char buf[64];
|
||||||
void *conn;
|
#ifdef USE_XCB
|
||||||
char *fullname = NULL;
|
xcb_connection_t *conn;
|
||||||
int idisplay, iscreen;
|
|
||||||
char *conn_auth_name, *conn_auth_data;
|
|
||||||
int conn_auth_namelen, conn_auth_datalen;
|
|
||||||
#ifdef USE_XTRANS_INTERNALS
|
|
||||||
extern void *_X11TransConnectDisplay ();
|
|
||||||
extern void _XDisconnectDisplay ();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Since connecting to the display waits for a few seconds if the
|
/* Since connecting to the display waits for a few seconds if the
|
||||||
display doesn't exist, check for trivial non-existence - if the
|
display doesn't exist, check for trivial non-existence - if the
|
||||||
socket in /tmp exists or not.. (note: if the socket exists, the
|
socket in /tmp exists or not.. (note: if the socket exists, the
|
||||||
server may still not, so we need to try to connect in that case..) */
|
server may still not, so we need to try to connect in that case..) */
|
||||||
|
|
||||||
sprintf (buf, "/tmp/.X11-unix/X%d", number);
|
sprintf (buf, "/tmp/.X11-unix/X%d", number);
|
||||||
if (access (buf, F_OK) != 0)
|
if (access (buf, F_OK) != 0) return FALSE;
|
||||||
return FALSE;
|
|
||||||
#ifdef USE_XTRANS_INTERNALS
|
|
||||||
/* This is a private function that we shouldn't really be calling,
|
|
||||||
but it's the best way to see if the server exists (without
|
|
||||||
needing to hold the necessary authentication to use it) */
|
|
||||||
|
|
||||||
|
#ifdef USE_XCB
|
||||||
sprintf (buf, ":%d", number);
|
sprintf (buf, ":%d", number);
|
||||||
conn = _X11TransConnectDisplay (buf, &fullname, &idisplay, &iscreen,
|
conn = xcb_connect(buf, NULL);
|
||||||
&conn_auth_name, &conn_auth_namelen,
|
if (conn == NULL) return FALSE;
|
||||||
&conn_auth_data, &conn_auth_datalen);
|
xcb_disconnect(conn);
|
||||||
if (conn == NULL)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
_XDisconnectDisplay (conn);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,7 @@
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
#include <dix-config.h>
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
|
|
|
@ -34,9 +34,7 @@
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if HAVE_XORG_CONFIG_H
|
#include <dix-config.h>
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
|
|
|
@ -58,9 +58,8 @@
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if HAVE_XORG_CONFIG_H
|
#include <dix-config.h>
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "cursorstr.h"
|
#include "cursorstr.h"
|
||||||
#include "mipointrst.h"
|
#include "mipointrst.h"
|
||||||
|
|
|
@ -29,10 +29,7 @@
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <dix-config.h>
|
||||||
#if HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "darwin.h"
|
#include "darwin.h"
|
||||||
#include "darwinKeyboard.h"
|
#include "darwinKeyboard.h"
|
||||||
|
|
|
@ -31,9 +31,9 @@
|
||||||
* authorization.
|
* authorization.
|
||||||
*/
|
*/
|
||||||
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */
|
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#import "quartzCommon.h"
|
#import "quartzCommon.h"
|
||||||
|
|
||||||
#define BOOL xBOOL
|
#define BOOL xBOOL
|
||||||
|
|
|
@ -35,10 +35,8 @@
|
||||||
* authorization.
|
* authorization.
|
||||||
*/
|
*/
|
||||||
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.3 2004/07/30 19:12:17 torrey Exp $ */
|
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.3 2004/07/30 19:12:17 torrey Exp $ */
|
||||||
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.19 2003/11/24 05:39:01 torrey Exp $ */
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
#include <dix-config.h>
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
#include "quartzCommon.h"
|
#include "quartzCommon.h"
|
||||||
|
|
||||||
#define BOOL xBOOL
|
#define BOOL xBOOL
|
||||||
|
|
|
@ -24,9 +24,9 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "quartzCommon.h"
|
#include "quartzCommon.h"
|
||||||
|
|
||||||
#define NEED_REPLIES
|
#define NEED_REPLIES
|
||||||
|
|
|
@ -30,11 +30,10 @@
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/XView.m,v 1.1 2003/06/07 05:49:07 torrey Exp $ */
|
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/XView.m,v 1.1 2003/06/07 05:49:07 torrey Exp $ */
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
#import "XView.h"
|
|
||||||
|
|
||||||
|
#include <dix-config.h>
|
||||||
|
|
||||||
|
#import "XView.h"
|
||||||
|
|
||||||
@implementation XView
|
@implementation XView
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,9 @@
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.2 2003/06/30 01:45:13 torrey Exp $ */
|
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.2 2003/06/30 01:45:13 torrey Exp $ */
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "quartz/quartzCommon.h"
|
#include "quartz/quartzCommon.h"
|
||||||
#include "quartz/cr/cr.h"
|
#include "quartz/cr/cr.h"
|
||||||
|
|
||||||
|
|
|
@ -28,10 +28,9 @@
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.2 2004/04/23 19:15:51 eich Exp $ */
|
/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.2 2004/04/23 19:15:51 eich Exp $ */
|
||||||
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crFrame.m,v 1.9 2004/03/19 02:05:29 torrey Exp $ */
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
#include <dix-config.h>
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
#include "quartz/quartzCommon.h"
|
#include "quartz/quartzCommon.h"
|
||||||
#include "quartz/cr/cr.h"
|
#include "quartz/cr/cr.h"
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.5 2003/11/12 20:21:52 torrey Exp $ */
|
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/cr/crScreen.m,v 1.5 2003/11/12 20:21:52 torrey Exp $ */
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "quartz/quartzCommon.h"
|
#include "quartz/quartzCommon.h"
|
||||||
#include "quartz/cr/cr.h"
|
#include "quartz/cr/cr.h"
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
* holders shall not be used in advertising or otherwise to promote the sale,
|
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "quartz/quartzCommon.h"
|
#include "quartz/quartzCommon.h"
|
||||||
#include "darwin.h"
|
#include "darwin.h"
|
||||||
#include "quartz/quartz.h"
|
#include "quartz/quartz.h"
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
* holders shall not be used in advertising or otherwise to promote the sale,
|
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "quartz/quartzCommon.h"
|
#include "quartz/quartzCommon.h"
|
||||||
#include "quartz/quartzCursor.h"
|
#include "quartz/quartzCursor.h"
|
||||||
#include "darwin.h"
|
#include "darwin.h"
|
||||||
|
|
|
@ -34,9 +34,9 @@ Equipment Corporation.
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
|
|
||||||
#include "pseudoramiX.h"
|
#include "pseudoramiX.h"
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
* holders shall not be used in advertising or otherwise to promote the sale,
|
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "quartzCommon.h"
|
#include "quartzCommon.h"
|
||||||
#include "quartz.h"
|
#include "quartz.h"
|
||||||
#include "darwin.h"
|
#include "darwin.h"
|
||||||
|
|
|
@ -35,9 +35,9 @@
|
||||||
* holders shall not be used in advertising or otherwise to promote the sale,
|
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "quartzCommon.h"
|
#include "quartzCommon.h"
|
||||||
#include "quartzAudio.h"
|
#include "quartzAudio.h"
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,7 @@
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */
|
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m,v 1.5 2004/06/08 22:58:10 torrey Exp $ */
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
#include <dix-config.h>
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "quartzCommon.h"
|
#include "quartzCommon.h"
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,8 @@
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
#include <dix-config.h>
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
#include "quartzCommon.h"
|
#include "quartzCommon.h"
|
||||||
#include "quartzCursor.h"
|
#include "quartzCursor.h"
|
||||||
#include "darwin.h"
|
#include "darwin.h"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
Code to build a keymap using the Carbon Keyboard Layout API,
|
Code to build a keymap using the Carbon Keyboard Layout API,
|
||||||
which is supported on Mac OS X 10.2 and newer.
|
which is supported on Mac OS X 10.2 and newer.
|
||||||
|
|
||||||
Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
|
Copyright (c) 2003, 2007 Apple Inc.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation files
|
obtaining a copy of this software and associated documentation files
|
||||||
|
@ -32,11 +32,9 @@
|
||||||
prior written authorization.
|
prior written authorization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
#include <dix-config.h>
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
#include "quartzCommon.h"
|
|
||||||
|
|
||||||
|
#include "quartzCommon.h"
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
|
|
||||||
|
@ -216,13 +214,23 @@ Bool
|
||||||
DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
|
DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
|
||||||
{
|
{
|
||||||
KeyboardLayoutRef key_layout;
|
KeyboardLayoutRef key_layout;
|
||||||
const void *chr_data;
|
const void *chr_data = NULL;
|
||||||
int num_keycodes = NUM_KEYCODES;
|
int num_keycodes = NUM_KEYCODES;
|
||||||
UInt32 keyboard_type = 0;
|
UInt32 keyboard_type = 0;
|
||||||
int is_uchr, i, j;
|
int is_uchr, i, j;
|
||||||
OSStatus err;
|
OSStatus err;
|
||||||
KeySym *k;
|
KeySym *k;
|
||||||
|
|
||||||
|
TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
|
||||||
|
if (currentKeyLayoutRef)
|
||||||
|
{
|
||||||
|
CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
|
||||||
|
if (currentKeyLayoutDataRef)
|
||||||
|
chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (chr_data != NULL)
|
||||||
|
{
|
||||||
KLGetCurrentKeyboardLayout (&key_layout);
|
KLGetCurrentKeyboardLayout (&key_layout);
|
||||||
KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
|
KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
|
||||||
|
|
||||||
|
@ -244,7 +252,7 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
|
||||||
is_uchr = 0;
|
is_uchr = 0;
|
||||||
num_keycodes = 128;
|
num_keycodes = 128;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Scan the keycode range for the Unicode character that each
|
/* Scan the keycode range for the Unicode character that each
|
||||||
key produces in the four shift states. Then convert that to
|
key produces in the four shift states. Then convert that to
|
||||||
|
@ -369,6 +377,8 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,11 +30,9 @@
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
#include <dix-config.h>
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
#include "quartzPasteboard.h"
|
|
||||||
|
|
||||||
|
#include "quartzPasteboard.h"
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "propertyst.h"
|
#include "propertyst.h"
|
||||||
|
|
|
@ -35,9 +35,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
#include <dix-config.h>
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
#define NEED_REPLIES
|
#define NEED_REPLIES
|
||||||
#define NEED_EVENTS
|
#define NEED_EVENTS
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
|
|
|
@ -33,9 +33,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
* Rickard E. (Rik) Faith <faith@valinux.com>
|
* Rickard E. (Rik) Faith <faith@valinux.com>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
copyright holders shall not be used in advertising or otherwise to
|
copyright holders shall not be used in advertising or otherwise to
|
||||||
promote the sale, use or other dealings in this Software without
|
promote the sale, use or other dealings in this Software without
|
||||||
prior written authorization. */
|
prior written authorization. */
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "x-hash.h"
|
#include "x-hash.h"
|
||||||
#include "x-list.h"
|
#include "x-list.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
copyright holders shall not be used in advertising or otherwise to
|
copyright holders shall not be used in advertising or otherwise to
|
||||||
promote the sale, use or other dealings in this Software without
|
promote the sale, use or other dealings in this Software without
|
||||||
prior written authorization. */
|
prior written authorization. */
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "x-hook.h"
|
#include "x-hook.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
copyright holders shall not be used in advertising or otherwise to
|
copyright holders shall not be used in advertising or otherwise to
|
||||||
promote the sale, use or other dealings in this Software without
|
promote the sale, use or other dealings in this Software without
|
||||||
prior written authorization. */
|
prior written authorization. */
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "x-list.h"
|
#include "x-list.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
|
@ -27,9 +27,9 @@
|
||||||
* holders shall not be used in advertising or otherwise to promote the sale,
|
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "xpr.h"
|
#include "xpr.h"
|
||||||
#include "quartz/applewmExt.h"
|
#include "quartz/applewmExt.h"
|
||||||
#include "rootless.h"
|
#include "rootless.h"
|
||||||
|
|
|
@ -30,9 +30,9 @@
|
||||||
* holders shall not be used in advertising or otherwise to promote the sale,
|
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "quartz/quartzCommon.h"
|
#include "quartz/quartzCommon.h"
|
||||||
#include "xpr.h"
|
#include "xpr.h"
|
||||||
#include "darwin.h"
|
#include "darwin.h"
|
||||||
|
|
|
@ -27,9 +27,9 @@
|
||||||
* holders shall not be used in advertising or otherwise to promote the sale,
|
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "xpr.h"
|
#include "xpr.h"
|
||||||
#include "rootlessCommon.h"
|
#include "rootlessCommon.h"
|
||||||
#include "Xplugin.h"
|
#include "Xplugin.h"
|
||||||
|
|
|
@ -27,9 +27,9 @@
|
||||||
* holders shall not be used in advertising or otherwise to promote the sale,
|
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
|
||||||
#include "quartz/quartzCommon.h"
|
#include "quartz/quartzCommon.h"
|
||||||
#include "quartz/quartz.h"
|
#include "quartz/quartz.h"
|
||||||
#include "xpr.h"
|
#include "xpr.h"
|
||||||
|
|
|
@ -308,7 +308,7 @@ ephyrDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, char *dst,
|
||||||
KdScreenInfo *screen = pScreenPriv->screen;
|
KdScreenInfo *screen = pScreenPriv->screen;
|
||||||
EphyrScrPriv *scrpriv = screen->driver;
|
EphyrScrPriv *scrpriv = screen->driver;
|
||||||
EphyrFakexaPriv *fakexa = scrpriv->fakexa;
|
EphyrFakexaPriv *fakexa = scrpriv->fakexa;
|
||||||
char *src;
|
unsigned char *src;
|
||||||
int src_pitch, cpp;
|
int src_pitch, cpp;
|
||||||
|
|
||||||
if (pSrc->drawable.bitsPerPixel < 8)
|
if (pSrc->drawable.bitsPerPixel < 8)
|
||||||
|
@ -345,7 +345,7 @@ ephyrUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src,
|
||||||
KdScreenInfo *screen = pScreenPriv->screen;
|
KdScreenInfo *screen = pScreenPriv->screen;
|
||||||
EphyrScrPriv *scrpriv = screen->driver;
|
EphyrScrPriv *scrpriv = screen->driver;
|
||||||
EphyrFakexaPriv *fakexa = scrpriv->fakexa;
|
EphyrFakexaPriv *fakexa = scrpriv->fakexa;
|
||||||
char *dst;
|
unsigned char *dst;
|
||||||
int dst_pitch, cpp;
|
int dst_pitch, cpp;
|
||||||
|
|
||||||
if (pDst->drawable.bitsPerPixel < 8)
|
if (pDst->drawable.bitsPerPixel < 8)
|
||||||
|
|
|
@ -225,22 +225,6 @@ void
|
||||||
DarwinHandleGUI(int argc, char *argv[])
|
DarwinHandleGUI(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlxExtensionInit();
|
|
||||||
void GlxWrapInitVisuals(void *procPtr);
|
|
||||||
|
|
||||||
void
|
|
||||||
DarwinGlxExtensionInit()
|
|
||||||
{
|
|
||||||
GlxExtensionInit();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
DarwinGlxWrapInitVisuals(
|
|
||||||
void *procPtr)
|
|
||||||
{
|
|
||||||
GlxWrapInitVisuals(procPtr);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -190,7 +190,14 @@
|
||||||
|
|
||||||
|
|
||||||
/* EDID Ver. >= 1.2 */
|
/* EDID Ver. >= 1.2 */
|
||||||
#define _IS_MONITOR_DESC(x) (x[0] == 0 && x[1] == 0 && x[2] == 0 && x[4] == 0)
|
/**
|
||||||
|
* Returns true if the pointer is the start of a monitor descriptor block
|
||||||
|
* instead of a detailed timing descriptor.
|
||||||
|
*
|
||||||
|
* Checking the reserved pad fields for zeroes fails on some monitors with
|
||||||
|
* broken empty ASCII strings. Only the first two bytes are reliable.
|
||||||
|
*/
|
||||||
|
#define _IS_MONITOR_DESC(x) (x[0] == 0 && x[1] == 0)
|
||||||
#define IS_MONITOR_DESC _IS_MONITOR_DESC(c)
|
#define IS_MONITOR_DESC _IS_MONITOR_DESC(c)
|
||||||
#define _PIXEL_CLOCK(x) (x[0] + (x[1] << 8)) * 10000
|
#define _PIXEL_CLOCK(x) (x[0] + (x[1] << 8)) * 10000
|
||||||
#define PIXEL_CLOCK _PIXEL_CLOCK(c)
|
#define PIXEL_CLOCK _PIXEL_CLOCK(c)
|
||||||
|
|
|
@ -2220,7 +2220,10 @@ xf86_covering_crtc(ScrnInfoPtr pScrn,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For overlay video, compute the relevant CRTC and
|
* For overlay video, compute the relevant CRTC and
|
||||||
* clip video to that
|
* clip video to that.
|
||||||
|
*
|
||||||
|
* returning FALSE means there was a memory failure of some kind,
|
||||||
|
* not that the video shouldn't be displayed
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
|
|
|
@ -127,22 +127,6 @@ void
|
||||||
DarwinHandleGUI(int argc, char *argv[])
|
DarwinHandleGUI(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlxExtensionInit();
|
|
||||||
void GlxWrapInitVisuals(void *procPtr);
|
|
||||||
|
|
||||||
void
|
|
||||||
DarwinGlxExtensionInit()
|
|
||||||
{
|
|
||||||
GlxExtensionInit();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
DarwinGlxWrapInitVisuals(
|
|
||||||
void *procPtr)
|
|
||||||
{
|
|
||||||
GlxWrapInitVisuals(procPtr);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void OsVendorInit()
|
void OsVendorInit()
|
||||||
|
|
|
@ -129,6 +129,7 @@ extern int SetModifierMapping(
|
||||||
KeyClassPtr * /* k */);
|
KeyClassPtr * /* k */);
|
||||||
|
|
||||||
extern void SendDeviceMappingNotify(
|
extern void SendDeviceMappingNotify(
|
||||||
|
ClientPtr /* client, */,
|
||||||
CARD8 /* request, */,
|
CARD8 /* request, */,
|
||||||
KeyCode /* firstKeyCode */,
|
KeyCode /* firstKeyCode */,
|
||||||
CARD8 /* count */,
|
CARD8 /* count */,
|
||||||
|
|
24
os/utils.c
24
os/utils.c
|
@ -285,7 +285,8 @@ OsSignal(sig, handler)
|
||||||
sigaddset(&act.sa_mask, sig);
|
sigaddset(&act.sa_mask, sig);
|
||||||
act.sa_flags = 0;
|
act.sa_flags = 0;
|
||||||
act.sa_handler = handler;
|
act.sa_handler = handler;
|
||||||
sigaction(sig, &act, &oact);
|
if (sigaction(sig, &act, &oact))
|
||||||
|
perror("sigaction");
|
||||||
return oact.sa_handler;
|
return oact.sa_handler;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1684,6 +1685,10 @@ System(char *command)
|
||||||
|
|
||||||
#ifdef SIGCHLD
|
#ifdef SIGCHLD
|
||||||
csig = signal(SIGCHLD, SIG_DFL);
|
csig = signal(SIGCHLD, SIG_DFL);
|
||||||
|
if (csig == SIG_ERR) {
|
||||||
|
perror("signal");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -1708,7 +1713,10 @@ System(char *command)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SIGCHLD
|
#ifdef SIGCHLD
|
||||||
signal(SIGCHLD, csig);
|
if (signal(SIGCHLD, csig) == SIG_ERR) {
|
||||||
|
perror("signal");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return p == -1 ? -1 : status;
|
return p == -1 ? -1 : status;
|
||||||
|
@ -1745,13 +1753,18 @@ Popen(char *command, char *type)
|
||||||
|
|
||||||
/* Ignore the smart scheduler while this is going on */
|
/* Ignore the smart scheduler while this is going on */
|
||||||
old_alarm = signal(SIGALRM, SIG_IGN);
|
old_alarm = signal(SIGALRM, SIG_IGN);
|
||||||
|
if (old_alarm == SIG_ERR) {
|
||||||
|
perror("signal");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
switch (pid = fork()) {
|
switch (pid = fork()) {
|
||||||
case -1: /* error */
|
case -1: /* error */
|
||||||
close(pdes[0]);
|
close(pdes[0]);
|
||||||
close(pdes[1]);
|
close(pdes[1]);
|
||||||
xfree(cur);
|
xfree(cur);
|
||||||
signal(SIGALRM, old_alarm);
|
if (signal(SIGALRM, old_alarm) == SIG_ERR)
|
||||||
|
perror("signal");
|
||||||
return NULL;
|
return NULL;
|
||||||
case 0: /* child */
|
case 0: /* child */
|
||||||
if (setgid(getgid()) == -1)
|
if (setgid(getgid()) == -1)
|
||||||
|
@ -1927,7 +1940,10 @@ Pclose(pointer iop)
|
||||||
/* allow EINTR again */
|
/* allow EINTR again */
|
||||||
OsReleaseSignals ();
|
OsReleaseSignals ();
|
||||||
|
|
||||||
signal(SIGALRM, old_alarm);
|
if (old_alarm && signal(SIGALRM, old_alarm) == SIG_ERR) {
|
||||||
|
perror("signal");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
return pid == -1 ? -1 : pstat;
|
return pid == -1 ? -1 : pstat;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue