summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-04-07 19:36:27 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-04-07 19:36:27 +1000
commit6c3b633299f12051fcf37fb8439f358de876cf03 (patch)
tree91d35cc77632048d9cb2c0c932fdea0b98f5395e /Xext
parentadf21dba7617542f08309415e315d4b2699c10e0 (diff)
parent0cfd48130842685828e0662a27272a3a65facd23 (diff)
Merge branch 'master' into xi2
Diffstat (limited to 'Xext')
-rw-r--r--Xext/dpms.c42
-rw-r--r--Xext/dpmsproc.h2
-rw-r--r--Xext/dpmsstubs.c5
-rw-r--r--Xext/xselinux.c4
-rw-r--r--Xext/xtest.c14
5 files changed, 23 insertions, 44 deletions
diff --git a/Xext/dpms.c b/Xext/dpms.c
index 672cf1764..8464f9e98 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -26,13 +26,6 @@ Equipment Corporation.
******************************************************************/
-/*
- * HISTORY
- *
- * @(#)RCSfile: dpms.c,v Revision: 1.1.4.5 (DEC) Date: 1996/03/04 15:27:00
- */
-
-
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
@@ -50,33 +43,6 @@ Equipment Corporation.
#include "dpmsproc.h"
#include "modinit.h"
-static DISPATCH_PROC(ProcDPMSDispatch);
-static DISPATCH_PROC(SProcDPMSDispatch);
-static DISPATCH_PROC(ProcDPMSGetVersion);
-static DISPATCH_PROC(SProcDPMSGetVersion);
-static DISPATCH_PROC(ProcDPMSGetTimeouts);
-static DISPATCH_PROC(SProcDPMSGetTimeouts);
-static DISPATCH_PROC(ProcDPMSSetTimeouts);
-static DISPATCH_PROC(SProcDPMSSetTimeouts);
-static DISPATCH_PROC(ProcDPMSEnable);
-static DISPATCH_PROC(SProcDPMSEnable);
-static DISPATCH_PROC(ProcDPMSDisable);
-static DISPATCH_PROC(SProcDPMSDisable);
-static DISPATCH_PROC(ProcDPMSForceLevel);
-static DISPATCH_PROC(SProcDPMSForceLevel);
-static DISPATCH_PROC(ProcDPMSInfo);
-static DISPATCH_PROC(SProcDPMSInfo);
-static DISPATCH_PROC(ProcDPMSCapable);
-static DISPATCH_PROC(SProcDPMSCapable);
-
-void
-DPMSExtensionInit(INITARGS)
-{
- AddExtension(DPMSExtensionName, 0, 0,
- ProcDPMSDispatch, SProcDPMSDispatch,
- NULL, StandardMinorOpcode);
-}
-
static int
ProcDPMSGetVersion(ClientPtr client)
{
@@ -414,3 +380,11 @@ SProcDPMSDispatch (ClientPtr client)
return BadRequest;
}
}
+
+void
+DPMSExtensionInit(INITARGS)
+{
+ AddExtension(DPMSExtensionName, 0, 0,
+ ProcDPMSDispatch, SProcDPMSDispatch,
+ NULL, StandardMinorOpcode);
+}
diff --git a/Xext/dpmsproc.h b/Xext/dpmsproc.h
index d57f57318..c1df56fdf 100644
--- a/Xext/dpmsproc.h
+++ b/Xext/dpmsproc.h
@@ -1,4 +1,3 @@
-
/* Prototypes for functions that the DDX must provide */
#ifdef HAVE_DIX_CONFIG_H
@@ -11,7 +10,6 @@
#include "dixstruct.h"
int DPMSSet(ClientPtr client, int level);
-int DPMSGet(int *plevel);
Bool DPMSSupported(void);
#endif
diff --git a/Xext/dpmsstubs.c b/Xext/dpmsstubs.c
index 0f59d5160..f0f54d293 100644
--- a/Xext/dpmsstubs.c
+++ b/Xext/dpmsstubs.c
@@ -39,11 +39,6 @@ Bool DPMSSupported(void)
return FALSE;
}
-int DPMSGet(int *plevel)
-{
- return -1;
-}
-
int DPMSSet(ClientPtr client, int level)
{
return Success;
diff --git a/Xext/xselinux.c b/Xext/xselinux.c
index dfeef2f21..4a1fe004b 100644
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -1971,6 +1971,10 @@ SELinuxExtensionInit(INITARGS)
return;
}
+ /* Don't init unless there's something to do */
+ if (!security_get_boolean_active("xserver_object_manager"))
+ return;
+
/* Check SELinux mode in configuration file */
switch(selinuxEnforcingState) {
case SELINUX_MODE_DISABLED:
diff --git a/Xext/xtest.c b/Xext/xtest.c
index fe3816e9c..ab882311a 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -159,6 +159,7 @@ ProcXTestFakeInput(ClientPtr client)
int nevents = 0;
int i;
int base = 0;
+ int flags = 0;
nev = (stuff->length << 2) - sizeof(xReq);
if ((nev % sizeof(xEvent)) || !nev)
@@ -209,8 +210,14 @@ ProcXTestFakeInput(ClientPtr client)
client->errorValue = ev->u.u.type;
return BadValue;
}
+
+ if (ev->u.u.detail == xFalse)
+ flags |= POINTER_ABSOLUTE;
} else
+ {
firstValuator = 0;
+ flags |= POINTER_ABSOLUTE;
+ }
if (nev > 1 && !dev->valuator)
{
@@ -279,6 +286,8 @@ ProcXTestFakeInput(ClientPtr client)
valuators[1] = ev->u.keyButtonPointer.rootY;
numValuators = 2;
firstValuator = 0;
+ if (ev->u.u.detail == xFalse)
+ flags = POINTER_ABSOLUTE | POINTER_SCREEN;
break;
default:
client->errorValue = ev->u.u.type;
@@ -376,14 +385,13 @@ ProcXTestFakeInput(ClientPtr client)
GetEventList(&events);
switch(type) {
case MotionNotify:
- nevents = GetPointerEvents(events, dev, type, 0,
- (ev->u.u.detail == xFalse) ? POINTER_ABSOLUTE : 0,
+ nevents = GetPointerEvents(events, dev, type, 0, flags,
firstValuator, numValuators, valuators);
break;
case ButtonPress:
case ButtonRelease:
nevents = GetPointerEvents(events, dev, type, ev->u.u.detail,
- POINTER_ABSOLUTE, firstValuator,
+ flags, firstValuator,
numValuators, valuators);
break;
case KeyPress: