xserver: Branch 'master' - 3 commits

Keith Packard keithp at kemper.freedesktop.org
Fri May 7 12:19:25 PDT 2010


 Xi/extinit.c       |    1 +
 Xi/xiproperty.c    |    9 +++++++++
 Xi/xiproperty.h    |    3 +++
 include/eventstr.h |    4 ++--
 include/xkbsrv.h   |    2 +-
 5 files changed, 16 insertions(+), 3 deletions(-)

New commits:
commit 626f97688a89dbc5da80390d822d21b1a737de0e
Author: Adam Tkac <atkac at redhat.com>
Date:   Fri May 7 17:02:03 2010 +1000

    Export XkbCopyDeviceKeymap from Xorg, it is needed by VNC.
    
    Signed-off-by: Adam Tkac <atkac at redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index a5d25d0..b3a8319 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -906,7 +906,7 @@ extern Bool XkbCopyKeymap(
         XkbDescPtr              /* dst */,
         XkbDescPtr              /* src */);
 
-extern Bool XkbCopyDeviceKeymap(
+extern _X_EXPORT Bool XkbCopyDeviceKeymap(
         DeviceIntPtr            /* dst */,
         DeviceIntPtr            /* src */);
 
commit 21ed660f30a3f96c787ab00a16499e0fb034b2ad
Author: Chris Humbert <freedesktop at mahadri.com>
Date:   Fri May 7 17:02:43 2010 +1000

    dix: make DeviceEvent coordinates signed for Xinerama. #24986
    
    With Xinerama enabled, event coordinates are relative to Screen 0, so
    they can be negative.  The new DeviceEvent's coordinates are of type
    uint16_t, making screens above and to the left of Screen 0 unusable.
    
    X.Org Bug 24986 <https://bugs.freedesktop.org/show_bug.cgi?id=24986>
    
    Signed-off-by: Chris Humbert <freedesktop at mahadri.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/include/eventstr.h b/include/eventstr.h
index 79685c1..433227e 100644
--- a/include/eventstr.h
+++ b/include/eventstr.h
@@ -91,9 +91,9 @@ struct _DeviceEvent
         uint32_t button;  /**< Button number */
         uint32_t key;     /**< Key code */
     } detail;
-    uint16_t root_x;      /**< Pos relative to root window in integral data */
+    int16_t root_x;       /**< Pos relative to root window in integral data */
     float root_x_frac;    /**< Pos relative to root window in frac part */
-    uint16_t root_y;      /**< Pos relative to root window in integral part */
+    int16_t root_y;       /**< Pos relative to root window in integral part */
     float root_y_frac;    /**< Pos relative to root window in frac part */
     uint8_t    buttons[(MAX_BUTTONS + 7)/8]; /**< Button mask */
     struct {
commit 9802839d35aaf788790f1d0e8300db4693a70096
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri May 7 16:22:12 2010 +1000

    Xi: reset the known properties at the end of the server generation.
    
    Properties allocated through XIGetKnownProperty() aren't reset on the second
    server generation but keep the old value. As a result, wrong Atoms are
    supplied to the driver, resulting in potential data corruption or weird
    error message.
    
    Reproducible by running "xlsatom | grep FLOAT" twice on a plain X server.
    The second X server generation won't have the FLOAT atom defined anymore,
    despite the users of this atom not noticing any errors.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/Xi/extinit.c b/Xi/extinit.c
index b7910cd..37f9856 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -1122,6 +1122,7 @@ RestoreExtensionEvents(void)
 static void
 IResetProc(ExtensionEntry * unused)
 {
+    XIResetProperties();
 
     ReplySwapVector[IReqCode] = ReplyNotSwappd;
     EventSwapVector[DeviceValuator] = NotImplemented;
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index be07831..8b80637 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -403,6 +403,15 @@ XIGetKnownProperty(char *name)
     return 0;
 }
 
+void
+XIResetProperties(void)
+{
+    int i;
+
+    for (i = 0; i < (sizeof(dev_properties)/sizeof(struct dev_properties)); i++)
+        dev_properties[i].type = None;
+}
+
 /**
  * Convert the given property's value(s) into @nelem_return integer values and
  * store them in @buf_return. If @nelem_return is larger than the number of
diff --git a/Xi/xiproperty.h b/Xi/xiproperty.h
index 69b41fa..d8b8863 100644
--- a/Xi/xiproperty.h
+++ b/Xi/xiproperty.h
@@ -62,4 +62,7 @@ void SRepXIListProperties(ClientPtr client, int size,
                           xXIListPropertiesReply *rep);
 void SRepXIGetProperty(ClientPtr client, int size,
                        xXIGetPropertyReply *rep);
+
+void XIResetProperties(void);
+
 #endif /* XIPROPERTY_H */


More information about the xorg-commit mailing list