[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg-server: Changes to 'debian-unstable'



 ChangeLog                               |  248 ++++++++++++++++++++++++++++++++
 Xi/exevents.c                           |    4 
 debian/changelog                        |   19 ++
 debian/patches/21-device-mode-list.diff |   34 ++++
 debian/patches/series                   |    1 
 dix/devices.c                           |    4 
 dix/events.c                            |   52 ------
 dix/getevents.c                         |    2 
 dix/main.c                              |    4 
 hw/xfree86/common/xf86Helper.c          |    7 
 hw/xfree86/ddc/ddc.c                    |    4 
 hw/xfree86/modes/xf86Crtc.c             |    4 
 hw/xfree86/modes/xf86Cursors.c          |    9 -
 include/eventstr.h                      |    2 
 os/io.c                                 |   27 +++
 os/osdep.h                              |    1 
 randr/rrtransform.c                     |   28 +--
 xkb/xkbUtils.c                          |   41 +++++
 18 files changed, 402 insertions(+), 89 deletions(-)

New commits:
commit 1e104a23efeca5304dee570c5ddd267d127ccdf7
Author: Julien Cristau <jcristau@debian.org>
Date:   Thu Nov 11 14:14:32 2010 +0100

    Bump changelogs

diff --git a/ChangeLog b/ChangeLog
index cb22e2c..70a5f48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,251 @@
+commit e735a4ade45c12306958390c2191ed0dc8084ef7
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Oct 18 15:42:54 2010 -0400
+
+    ddc: Don't probe for DDC/CI or EEPROM
+    
+    For whatever reason, some (broken) monitors will crash if you do this.
+    We're not actually using this information for anything, so let's just
+    not do it.
+    
+    Originally reported as http://bugzilla.redhat.com/620333
+    
+    Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    (cherry picked from commit d2064fbb687839c297a851a5d85f32dfbbe4a0d5)
+    (cherry picked from commit e01d69c6e794d836d9f25870349f3164dbd831ae)
+
+commit d7c2f764b399152eeaaf18b82abaf941574e6744
+Author: Dirk Wallenstein <halsmit@t-online.de>
+Date:   Sat Apr 17 21:36:23 2010 +0200
+
+    xkb: Fix omissions in geometry initialization #27679
+    
+    _XkbCopyGeom did not copy all of the data from the source geometry. This
+    resulted in failures when trying to obtain the keymap from a server
+    where the default geometry has not been replaced by a custom
+    configuration.
+    
+    Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
+    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit bac1c5f1be4588b2b1eb646ee98a5442e1b767d5)
+
+commit 8981b0a99ca5828ddc1b375c269aa493af40e6fd
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Jun 12 08:19:16 2010 -0700
+
+    Don't coredump on "X -showopts" (bug 25874)
+    
+    Don't try walking the xf86ConfigLayout.screens table if it's empty
+    https://bugs.freedesktop.org/show_bug.cgi?id=25874
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit b8615d592700b7be319c04cc0563fdeb5a266534)
+
+commit a3e6e599f50902712f4a10fdbf806371335aaed3
+Author: Nicolas George <nicolas.george@normalesup.org>
+Date:   Wed Jun 2 13:40:51 2010 +0200
+
+    Change keyboard controls on slave keyboards (#27926)
+    
+    Makes the use of IsMaster in ProcChangeKeyboardControl consistent with other
+    similar loops.
+    
+    Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 968a79dcf5e17ac3963953ef56b8f94dbd75323b)
+
+commit 48407d86e3be526826c2207886ec304779c93f78
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date:   Mon Jun 7 10:21:18 2010 +1000
+
+    randr: prevent an unnecessary screen resize with multiple displays
+    
+    crtc->{x,y} is always 0 when xf86DefaultScreenLimits() is called, so we
+    calculate too small an area for the initial framebuffer and force a resize
+    to happen.
+    
+    This commit fixes the code to use desired{X,Y} instead, which contains the
+    initial output positions.
+    
+    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+    Reviewed-by: Dave Airlie <airlied@redhat.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit f7af00e9f0e0e1d854b0e882378c032518ab71ca)
+
+commit a6374668bda2cb78736e5f603f048adea1822d08
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Jun 10 12:21:36 2010 +1000
+
+    Xi: don't copy the modifier key count when copying device classes (#25480)
+    
+    The modifier key count is maintained by the XKB layer and
+    increased/decreased for all modifiers that set state.
+    
+    Test case, MD/SD modifier key count in comment:
+    1. keyboard 1: press and hold Shift_L    # SD:1     MD:1
+    2. keyboard 2: press and release Shift_L # SD:1,0   MD:1,0
+    <class copy happens>                     # SD:1     MD:1
+    3. keyboard 1: release Shift_L           # SD:0     MD:1
+    4. keyboard 1: press and release Shift_L # SD:1,0   MD:2,1
+    
+    The modifier is now logically down on the MD but not on keyboard 1 or
+    keyboard 2.
+    
+    XKB is layered in before the DIX, it increases/decreases the modifier key
+    count accordingly. In the above example, during (2), the MD gets the key
+    release and thus clears the modifier bit. (3) doesn't forward the release to
+    the MD because it is already cleared. The copy of modifierKeysDown when the
+    lastSlave changes however increases the counter for the held key. On (4),
+    the press and release are both forwarded to the MD, causing a offset by 1
+    and thus do not clear the logical modifier state.
+    
+    X.Org Bug 25480 <http://bugs.freedesktop.org/show_bug.cgi?id=25480>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Acked-by: Daniel Stone <daniel@fooishbar.org>
+    (cherry picked from commit dc614484f93b67e8b62dbb1bb2fd247fe5a4c850)
+
+commit 6892697640701563921630295597be7f168cf55e
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Mon Jun 21 10:05:08 2010 +1000
+
+    rotation: fix cursor and overlap of one pixel.
+    
+    Commit 77c7a64e8885696665556c9fbcb3cffb552e367a was introduced to fix
+    a cursor off by one on Intel hw, however it also move the whole crtc
+    into an off by one position and you could see gnom-eshell overlapping.
+    
+    This commit reverts that and instead fixes the cursor hotspot
+    translation to work like pixman does. We add 0.5 to the cursor vector
+    before translating, and floor the value afterwards.
+    
+    Thanks to Soeren (ssp) for pointing out where the real problem was
+    after explaning how pixman translates points.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit 80d1a548d6ce73c2ff097536c1bc7044bf74965d)
+
+commit 06fda4d3c8d0fdf1c533dcb91b60592a75f4ee3f
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Jun 24 12:52:53 2010 +1000
+
+    Revert "dix: use the event mask of the grab for TryClientEvents."
+    
+    Behaviour of earlier X servers was to deliver the ButtonPress event
+    unconditionally, regardless of the actual event mask being set. This is
+    documented in the protocol:
+    "This request establishes a passive grab.  In the future, the pointer is
+    actively grabbed as described in GrabPointer, the last-pointer-grab time is
+    set to the time at which the button was pressed (as transmitted in the
+    ButtonPress event), and the ButtonPress event is reported if all of the
+    following conditions are true:
+        <list of conditions, event mask is not one of them>"
+    
+    Thus, a GrabButton event will always deliver the button press event, a
+    GrabKey always the key press event, etc. Same goes for XI and XI2.
+    
+    Reproducible with a simple client requesting a button grab in the form of:
+        XGrabButton(dpy, AnyButton, AnyModifier, win, True, ButtonReleaseMask,
+                    GrabModeAsync, GrabModeAsync, None, None);
+    
+    On servers before MPX/XI2, the client will receive a button press and
+    release event. On current servers, the client receives only the release.
+    Clients that expect the press event to be delivered unconditionally.
+    
+    XTS Xlib13 XGrabButton 5/39 now passes.
+    
+    This reverts commit 48585bd1e3e98db0f3df1ecc68022510216e00cc.
+    Effectively reverts commit 1c612acca8568fcdf9761d23f112adaf4d496f1b as well,
+    the code introduced with 1c612 is not needed anymore.
+    
+    Conflicts:
+    
+    	dix/events.c
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Acked-by: Daniel Stone <daniel@fooishbar.org>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit 1884db430a5680e37e94726dff46686e2218d525)
+
+commit 2fce4783f41b7fb1106b2945cc98bfc8da39501d
+Author: Joe Shaw <joeshaw@litl.com>
+Date:   Thu Oct 14 15:09:20 2010 -0400
+
+    fix a sign problem with valuator data.
+    
+    Without this patch, any negative valuator value is wrong when returned
+    from XQueryDeviceState().  This is a regression from at least xserver
+    1.4.
+    
+    Valuator data is set in dix/getevents.c:set_valuators() by copying
+    signed int values into an unsigned int field
+    DeviceEvent.valuators.data.
+    
+    That data is converted into a double with an implicit cast by
+    assignment to axisVal[i] in Xi/exevents.c:UpdateDeviceState().
+    
+    That double is converted back to a signed int in
+    queryst.c:ProcXQueryDeviceState().  If the original value in
+    set_valuators() is negative, the double value will be > 2^31 and the
+    conversion back to a signed int is undefined.  (Although I
+    consistently see the value -2^31.)
+    
+    Fix this by changing the definition of DeviceEvent.valuators.data from
+    uint32_t to int32_t.
+    
+    Signed-off-by: Joe Shaw <joeshaw@litl.com>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit e354ccac36a8ee3a23bdc845833c16a5646cc200)
+
+commit 9d939ea0f42954f40bbc8388b7c7f62470cdf338
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Feb 15 16:54:35 2010 -0500
+
+    dix: Default DPMS timeout values to match screensaver values
+    
+    These have the same default, but if you specify something different with
+    -s on the command line, only the screensaver time is changed.  As DPMS
+    is usually what's desired, change it to match.
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit 2a763c9023b8bc978b32eaa56d2c625b6f2badee)
+
+commit 0ca9f07f7349afc41bdb68a8956c24be1d7d779e
+Author: Aaron Plattner <aplattner@nvidia.com>
+Date:   Fri Aug 27 10:20:29 2010 -0700
+
+    os: Return BadLength instead of disconnecting BigReq clients (#4565)
+    
+    If a client sends a big request that's too big (i.e. bigger than
+    maxBigRequestSize << 2 bytes), the server just disconnects it.  This makes the
+    client receive SIGPIPE the next time it tries to send something.
+    
+    The X Test Suite sends requests that are too big when the test specifies the
+    TOO_LONG test type.  When the client receives SIGPIPE, XTS marks it as
+    UNRESOLVED, which counts as a failure.
+    
+    Instead, remember how long the request is supposed to be and then return that
+    size.  Dispatch() checks the length and sends BadLength to the client.  Then,
+    whenever oci->ignoreBytes is nonzero, ignore the data read instead of trying to
+    process it as a request.
+    
+    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+    Reviewed-by: Keith Packard <keithp@keithp.com>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit cf88363db0ebb42df7cc286b85d30d7898aea840)
+
 commit 3336e1f7f3d7a0e37cc75f7edd96524dd6cf228a
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jul 12 16:01:34 2010 -0700
diff --git a/debian/changelog b/debian/changelog
index 4c5a1b8..31dd920 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,18 @@ xorg-server (2:1.7.7-9) UNRELEASED; urgency=low
 
   * Stolen from RHEL6: only list the device mode in XIQueryDevice, not the
     proximity bit.
+  * Cherry-pick a bunch more patches from upstream (most seen in RHEL6):
+    - os: Return BadLength instead of disconnecting BigReq clients
+    - dix: Default DPMS timeout values to match screensaver values
+    - fix a sign problem with valuator data
+    - Revert "dix: use the event mask of the grab for TryClientEvents."
+    - rotation: fix cursor and overlap of one pixel
+    - Xi: don't copy the modifier key count when copying device classes
+    - randr: prevent an unnecessary screen resize with multiple displays
+    - Change keyboard controls on slave keyboards
+    - Don't coredump on "X -showopts"
+    - xkb: Fix omissions in geometry initialization
+    - ddc: Don't probe for DDC/CI or EEPROM
 
  -- Julien Cristau <jcristau@debian.org>  Thu, 11 Nov 2010 12:46:28 +0100
 

commit df041856a6771dde89e5d2f0005e1929b296e097
Author: Julien Cristau <jcristau@debian.org>
Date:   Thu Nov 11 12:50:03 2010 +0100

    Stolen from RHEL6: only list the device mode in XIQueryDevice, not the proximity bit.

diff --git a/debian/changelog b/debian/changelog
index fa1c4a3..4c5a1b8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xorg-server (2:1.7.7-9) UNRELEASED; urgency=low
+
+  * Stolen from RHEL6: only list the device mode in XIQueryDevice, not the
+    proximity bit.
+
+ -- Julien Cristau <jcristau@debian.org>  Thu, 11 Nov 2010 12:46:28 +0100
+
 xorg-server (2:1.7.7-8) unstable; urgency=low
 
   * Pass --enable-xcsecurity to the main build to restore the XC-SECURITY
diff --git a/debian/patches/21-device-mode-list.diff b/debian/patches/21-device-mode-list.diff
new file mode 100644
index 0000000..a137d41
--- /dev/null
+++ b/debian/patches/21-device-mode-list.diff
@@ -0,0 +1,34 @@
+From 532529ced48ff4338cfd7317fa795e9bbf0a2d80 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 9 Jun 2010 15:41:09 +1000
+Subject: [PATCH] Xi: only list the device mode in XIQueryDevice, not the proximity bit.
+
+The mode is either Absolute or Relative, the mode field in the
+ValuatorClassRec also stores the proximity bit on the second bit for XI 1.x
+clients, returning bad data to clients that just check for (mode ==
+Absolute) or for (mode == Relative).
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+[jcristau: this is fixed in 1.10 by 58554f1c6429535e7ab432c920aabca71a77edb8
+which depends on the switch to per-axis valuators]
+---
+ Xi/xiquerydevice.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
+index 435868d..4849286 100644
+--- a/Xi/xiquerydevice.c
++++ b/Xi/xiquerydevice.c
+@@ -346,7 +346,7 @@ ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info, int axisnumber,
+     info->value.frac = (int)(v->axisVal[axisnumber] * (1 << 16) * (1 << 16));
+     info->resolution = v->axes[axisnumber].resolution;
+     info->number = axisnumber;
+-    info->mode = v->mode; /* Server doesn't have per-axis mode yet */
++    info->mode = v->mode & DeviceMode; /* Server doesn't have per-axis mode yet */
+     info->sourceid = v->sourceid;
+ 
+     if (!reportState)
+-- 
+1.6.5.2
+
diff --git a/debian/patches/series b/debian/patches/series
index a175ece..4a57f61 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -19,3 +19,4 @@
 18-Add-10-evdev.conf.diff
 19-compresize-fix.diff
 20-randr-shadow-crashes.diff
+21-device-mode-list.diff

commit e735a4ade45c12306958390c2191ed0dc8084ef7
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Oct 18 15:42:54 2010 -0400

    ddc: Don't probe for DDC/CI or EEPROM
    
    For whatever reason, some (broken) monitors will crash if you do this.
    We're not actually using this information for anything, so let's just
    not do it.
    
    Originally reported as http://bugzilla.redhat.com/620333
    
    Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit d2064fbb687839c297a851a5d85f32dfbbe4a0d5)
    (cherry picked from commit e01d69c6e794d836d9f25870349f3164dbd831ae)

diff --git a/hw/xfree86/ddc/ddc.c b/hw/xfree86/ddc/ddc.c
index 6fad9fb..df46689 100644
--- a/hw/xfree86/ddc/ddc.c
+++ b/hw/xfree86/ddc/ddc.c
@@ -311,10 +311,6 @@ DDC2Init(int scrnIndex, I2CBusPtr pBus)
     dev = DDC2MakeDevice(pBus, 0x00A0, "ddc2");
     if (xf86I2CProbeAddress(pBus, 0x0060))
 	DDC2MakeDevice(pBus, 0x0060, "E-EDID segment register");
-    if (xf86I2CProbeAddress(pBus, 0x0062))
-	DDC2MakeDevice(pBus, 0x0062, "EDID EEPROM interface");
-    if (xf86I2CProbeAddress(pBus, 0x006E))
-	DDC2MakeDevice(pBus, 0x006E, "DDC control interface");
 
     return dev;
 }

commit d7c2f764b399152eeaaf18b82abaf941574e6744
Author: Dirk Wallenstein <halsmit@t-online.de>
Date:   Sat Apr 17 21:36:23 2010 +0200

    xkb: Fix omissions in geometry initialization #27679
    
    _XkbCopyGeom did not copy all of the data from the source geometry. This
    resulted in failures when trying to obtain the keymap from a server
    where the default geometry has not been replaced by a custom
    configuration.
    
    Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit bac1c5f1be4588b2b1eb646ee98a5442e1b767d5)

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 1abb5a8..fe093a4 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1601,6 +1601,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
                 else {
                     dcolor->spec = xstrdup(scolor->spec);
                 }
+                dcolor->pixel = scolor->pixel;
             }
 
             dst->geom->num_colors = dst->geom->sz_colors;
@@ -1672,6 +1673,8 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
 
                             memcpy(doutline->points, soutline->points,
                                    soutline->num_points * sizeof(XkbPointRec));
+
+                            doutline->corner_radius = soutline->corner_radius;
                         }
 
                         doutline->num_points = soutline->num_points;
@@ -1681,6 +1684,36 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
 
                 dshape->num_outlines = sshape->num_outlines;
                 dshape->sz_outlines = sshape->num_outlines;
+                dshape->name = sshape->name;
+                dshape->bounds = sshape->bounds;
+
+                dshape->approx = NULL;
+                if (sshape->approx && sshape->num_outlines > 0) {
+
+                    const ptrdiff_t approx_idx =
+                            sshape->approx - sshape->outlines;
+
+                    if (approx_idx < dshape->num_outlines) {
+                            dshape->approx = dshape->outlines + approx_idx;
+                    } else {
+                            LogMessage(X_WARNING, "XKB: approx outline "
+                                            "index is out of range\n");
+                    }
+                }
+
+                dshape->primary = NULL;
+                if (sshape->primary && sshape->num_outlines > 0) {
+
+                    const ptrdiff_t primary_idx =
+                            sshape->primary - sshape->outlines;
+
+                    if (primary_idx < dshape->num_outlines) {
+                            dshape->primary = dshape->outlines + primary_idx;
+                    } else {
+                            LogMessage(X_WARNING, "XKB: primary outline "
+                                            "index is out of range\n");
+                    }
+                }
             }
 
             dst->geom->num_shapes = src->geom->num_shapes;
@@ -1784,6 +1817,10 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
                     }
                     drow->num_keys = srow->num_keys;
                     drow->sz_keys = srow->num_keys;
+                    drow->top = srow->top;
+                    drow->left = srow->left;
+                    drow->vertical = srow->vertical;
+                    drow->bounds = srow->bounds;
                 }
 
                 if (ssection->num_doodads) {
@@ -1802,6 +1839,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
                       ddoodad = dsection->doodads;
                      k < ssection->num_doodads;
                      k++, sdoodad++, ddoodad++) {
+                    memcpy(ddoodad , sdoodad, sizeof(XkbDoodadRec));
                     if (sdoodad->any.type == XkbTextDoodad) {
                         if (sdoodad->text.text)
                             ddoodad->text.text =
@@ -1815,7 +1853,6 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
                             ddoodad->logo.logo_name =
                              xstrdup(sdoodad->logo.logo_name);
                     }
-                    ddoodad->any.type = sdoodad->any.type;
                 }
                 dsection->overlays = NULL;
                 dsection->sz_overlays = 0;
@@ -1880,7 +1917,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
                   ddoodad = dst->geom->doodads;
                  i < src->geom->num_doodads;
                  i++, sdoodad++, ddoodad++) {
-                ddoodad->any.type = sdoodad->any.type;
+                memcpy(ddoodad , sdoodad, sizeof(XkbDoodadRec));
                 if (sdoodad->any.type == XkbTextDoodad) {
                     if (sdoodad->text.text)
                         ddoodad->text.text = xstrdup(sdoodad->text.text);

commit 8981b0a99ca5828ddc1b375c269aa493af40e6fd
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Jun 12 08:19:16 2010 -0700

    Don't coredump on "X -showopts" (bug 25874)
    
    Don't try walking the xf86ConfigLayout.screens table if it's empty
    https://bugs.freedesktop.org/show_bug.cgi?id=25874
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit b8615d592700b7be319c04cc0563fdeb5a266534)

diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 1cc1526..512b39e 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1447,6 +1447,13 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist)
     if (xf86DoConfigure && xf86DoConfigurePass1) return 1;
 
     /*
+     * This can happen when running Xorg -showopts and a module like ati
+     * or vmware tries to load its submodules when xf86ConfigLayout is empty
+     */
+    if (!xf86ConfigLayout.screens)
+	return 0;
+
+    /*
      * This is a very important function that matches the device sections
      * as they show up in the config file with the drivers that the server
      * loads at run time.

commit a3e6e599f50902712f4a10fdbf806371335aaed3
Author: Nicolas George <nicolas.george@normalesup.org>
Date:   Wed Jun 2 13:40:51 2010 +0200

    Change keyboard controls on slave keyboards (#27926)
    
    Makes the use of IsMaster in ProcChangeKeyboardControl consistent with other
    similar loops.
    
    Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 968a79dcf5e17ac3963953ef56b8f94dbd75323b)

diff --git a/dix/devices.c b/dix/devices.c
index 87b6dc7..1037e42 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1956,7 +1956,7 @@ ProcChangeKeyboardControl (ClientPtr client)
     keyboard = PickKeyboard(client);
 
     for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
-        if ((pDev == keyboard || (!IsMaster(keyboard) && pDev->u.master == keyboard)) &&
+        if ((pDev == keyboard || (!IsMaster(pDev) && pDev->u.master == keyboard)) &&
             pDev->kbdfeed && pDev->kbdfeed->CtrlProc) {
             ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess);
 	    if (ret != Success)
@@ -1965,7 +1965,7 @@ ProcChangeKeyboardControl (ClientPtr client)
     }
 
     for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
-        if ((pDev == keyboard || (!IsMaster(keyboard) && pDev->u.master == keyboard)) &&
+        if ((pDev == keyboard || (!IsMaster(pDev) && pDev->u.master == keyboard)) &&
             pDev->kbdfeed && pDev->kbdfeed->CtrlProc) {
             ret = DoChangeKeyboardControl(client, pDev, vlist, vmask);
             if (ret != Success)

commit 48407d86e3be526826c2207886ec304779c93f78
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Mon Jun 7 10:21:18 2010 +1000

    randr: prevent an unnecessary screen resize with multiple displays
    
    crtc->{x,y} is always 0 when xf86DefaultScreenLimits() is called, so we
    calculate too small an area for the initial framebuffer and force a resize
    to happen.
    
    This commit fixes the code to use desired{X,Y} instead, which contains the
    initial output positions.
    
    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit f7af00e9f0e0e1d854b0e882378c032518ab71ca)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 3fcd79b..0b077d0 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1043,8 +1043,8 @@ xf86DefaultScreenLimits (ScrnInfoPtr scrn, int *widthp, int *heightp,
 
 	if (crtc->enabled)
 	{
-	    crtc_width = crtc->x + xf86ModeWidth (&crtc->desiredMode, crtc->desiredRotation);
-	    crtc_height = crtc->y + xf86ModeHeight (&crtc->desiredMode, crtc->desiredRotation);
+	    crtc_width = crtc->desiredX + xf86ModeWidth (&crtc->desiredMode, crtc->desiredRotation);
+	    crtc_height = crtc->desiredY + xf86ModeHeight (&crtc->desiredMode, crtc->desiredRotation);
 	}
 	if (!canGrow) {
 	    for (o = 0; o < config->num_output; o++)

commit a6374668bda2cb78736e5f603f048adea1822d08
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Jun 10 12:21:36 2010 +1000

    Xi: don't copy the modifier key count when copying device classes (#25480)
    
    The modifier key count is maintained by the XKB layer and
    increased/decreased for all modifiers that set state.
    
    Test case, MD/SD modifier key count in comment:
    1. keyboard 1: press and hold Shift_L    # SD:1     MD:1
    2. keyboard 2: press and release Shift_L # SD:1,0   MD:1,0
    <class copy happens>                     # SD:1     MD:1
    3. keyboard 1: release Shift_L           # SD:0     MD:1
    4. keyboard 1: press and release Shift_L # SD:1,0   MD:2,1
    
    The modifier is now logically down on the MD but not on keyboard 1 or
    keyboard 2.
    
    XKB is layered in before the DIX, it increases/decreases the modifier key
    count accordingly. In the above example, during (2), the MD gets the key
    release and thus clears the modifier bit. (3) doesn't forward the release to
    the MD because it is already cleared. The copy of modifierKeysDown when the
    lastSlave changes however increases the counter for the held key. On (4),
    the press and release are both forwarded to the MD, causing a offset by 1
    and thus do not clear the logical modifier state.
    
    X.Org Bug 25480 <http://bugs.freedesktop.org/show_bug.cgi?id=25480>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Acked-by: Daniel Stone <daniel@fooishbar.org>
    (cherry picked from commit dc614484f93b67e8b62dbb1bb2fd247fe5a4c850)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index e680f6f..566b0ef 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -196,16 +196,12 @@ void
 CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master)
 {
     KeyClassPtr mk = master->key;
-    KeyClassPtr dk = device->key;
-    int i;
 
     if (device == master)
         return;
 
     mk->sourceid = device->id;
 
-    for (i = 0; i < 8; i++)
-        mk->modifierKeyCount[i] = dk->modifierKeyCount[i];
 
     if (!XkbCopyDeviceKeymap(master, device))
         FatalError("Couldn't pivot keymap from device to core!\n");

commit 6892697640701563921630295597be7f168cf55e
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Jun 21 10:05:08 2010 +1000

    rotation: fix cursor and overlap of one pixel.
    
    Commit 77c7a64e8885696665556c9fbcb3cffb552e367a was introduced to fix
    a cursor off by one on Intel hw, however it also move the whole crtc
    into an off by one position and you could see gnom-eshell overlapping.
    
    This commit reverts that and instead fixes the cursor hotspot
    translation to work like pixman does. We add 0.5 to the cursor vector
    before translating, and floor the value afterwards.
    
    Thanks to Soeren (ssp) for pointing out where the real problem was
    after explaning how pixman translates points.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 80d1a548d6ce73c2ff097536c1bc7044bf74965d)

diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index d6e747f..f7250f4 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -327,10 +327,13 @@ xf86_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
 						  xf86CursorScreenKey);
 	struct pict_f_vector   v;
 
-	v.v[0] = x + ScreenPriv->HotX; v.v[1] = y + ScreenPriv->HotY; v.v[2] = 1;
+	v.v[0] = (x + ScreenPriv->HotX) + 0.5;
+	v.v[1] = (y + ScreenPriv->HotY) + 0.5;
+	v.v[2] = 1;
 	pixman_f_transform_point (&crtc->f_framebuffer_to_crtc, &v);
-	x = floor (v.v[0] + 0.5);
-	y = floor (v.v[1] + 0.5);
+	/* cursor will have 0.5 added to it already so floor is sufficent */
+	x = floor (v.v[0]);
+	y = floor (v.v[1]);
 	/*
 	 * Transform position of cursor upper left corner
 	 */
diff --git a/randr/rrtransform.c b/randr/rrtransform.c
index 06f6298..53de3b8 100644
--- a/randr/rrtransform.c
+++ b/randr/rrtransform.c
@@ -185,21 +185,21 @@ RRTransformCompute (int			    x,
 	    break;
 	case RR_Rotate_90:
 	    f_rot_cos = 0;	    f_rot_sin = 1;
-	    f_rot_dx  = height-1;   f_rot_dy  = 0;
+	    f_rot_dx  = height;	    f_rot_dy  = 0;
 	    rot_cos = F ( 0);	    rot_sin = F ( 1);
-	    rot_dx =  F (height-1); rot_dy  = F (0);
+	    rot_dx =  F ( height);  rot_dy  = F (0);
 	    break;
 	case RR_Rotate_180:
 	    f_rot_cos = -1;	    f_rot_sin = 0;
-	    f_rot_dx  = width - 1;  f_rot_dy  = height - 1;
+	    f_rot_dx  = width;	    f_rot_dy  = height;
 	    rot_cos = F (-1);	    rot_sin = F ( 0);
-	    rot_dx  = F (width-1);  rot_dy  = F ( height-1);
+	    rot_dx  = F (width);   rot_dy  = F ( height);
 	    break;
 	case RR_Rotate_270:
 	    f_rot_cos = 0;	    f_rot_sin = -1;
-	    f_rot_dx  = 0;	    f_rot_dy  = width-1;
+	    f_rot_dx  = 0;	    f_rot_dy  = width;
 	    rot_cos = F ( 0);	    rot_sin = F (-1);
-	    rot_dx  = F ( 0);	    rot_dy  = F ( width-1);
+	    rot_dx  = F ( 0);	    rot_dy  = F ( width);
 	    break;
 	}
 	
@@ -222,11 +222,11 @@ RRTransformCompute (int			    x,
 	    f_scale_x = -1;
 	    scale_x = F(-1);
 	    if (rotation & (RR_Rotate_0|RR_Rotate_180)) {
-		f_scale_dx = width-1;
-		scale_dx = F(width-1);
+		f_scale_dx = width;
+		scale_dx = F(width);
 	    } else {
-		f_scale_dx = height-1;
-		scale_dx = F(height-1);
+		f_scale_dx = height;
+		scale_dx = F(height);
 	    }
 	}
 	if (rotation & RR_Reflect_Y)
@@ -234,11 +234,11 @@ RRTransformCompute (int			    x,
 	    f_scale_y = -1;
 	    scale_y = F(-1);
 	    if (rotation & (RR_Rotate_0|RR_Rotate_180)) {
-		f_scale_dy = height-1;
-		scale_dy = F(height-1);
+		f_scale_dy = height;
+		scale_dy = F(height);
 	    } else {
-		f_scale_dy = width-1;
-		scale_dy = F(width-1);
+		f_scale_dy = width;
+		scale_dy = F(width);
 	    }
 	}
 	

commit 06fda4d3c8d0fdf1c533dcb91b60592a75f4ee3f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Jun 24 12:52:53 2010 +1000

    Revert "dix: use the event mask of the grab for TryClientEvents."
    
    Behaviour of earlier X servers was to deliver the ButtonPress event
    unconditionally, regardless of the actual event mask being set. This is
    documented in the protocol:
    "This request establishes a passive grab.  In the future, the pointer is
    actively grabbed as described in GrabPointer, the last-pointer-grab time is
    set to the time at which the button was pressed (as transmitted in the
    ButtonPress event), and the ButtonPress event is reported if all of the
    following conditions are true:
        <list of conditions, event mask is not one of them>"
    
    Thus, a GrabButton event will always deliver the button press event, a
    GrabKey always the key press event, etc. Same goes for XI and XI2.
    
    Reproducible with a simple client requesting a button grab in the form of:
        XGrabButton(dpy, AnyButton, AnyModifier, win, True, ButtonReleaseMask,
                    GrabModeAsync, GrabModeAsync, None, None);
    
    On servers before MPX/XI2, the client will receive a button press and
    release event. On current servers, the client receives only the release.
    Clients that expect the press event to be delivered unconditionally.
    
    XTS Xlib13 XGrabButton 5/39 now passes.
    
    This reverts commit 48585bd1e3e98db0f3df1ecc68022510216e00cc.
    Effectively reverts commit 1c612acca8568fcdf9761d23f112adaf4d496f1b as well,
    the code introduced with 1c612 is not needed anymore.
    
    Conflicts:
    
    	dix/events.c
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Acked-by: Daniel Stone <daniel@fooishbar.org>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 1884db430a5680e37e94726dff46686e2218d525)

diff --git a/dix/events.c b/dix/events.c
index 44c4624..9d35b22 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3440,7 +3440,6 @@ CheckPassiveGrabsOnWindow(
     {
 	DeviceIntPtr	gdev;
 	XkbSrvInfoPtr	xkbi = NULL;
-	Mask		mask = 0;
 
 	gdev= grab->modifierDevice;
         if (grab->grabtype == GRABTYPE_CORE)
@@ -3555,9 +3554,6 @@ CheckPassiveGrabsOnWindow(
                 }
                 xE = &core;
                 count = 1;
-                mask = grab->eventMask;
-                if (grab->ownerEvents)
-                    mask |= pWin->eventMask;
             } else if (match & XI2_MATCH)
             {
                 rc = EventToXI2((InternalEvent*)event, &xE);
@@ -3569,34 +3565,6 @@ CheckPassiveGrabsOnWindow(
                     continue;
                 }
                 count = 1;
-
-                /* FIXME: EventToXI2 returns NULL for enter events, so
-                 * dereferencing the event is bad. Internal event types are
-                 * aligned with core events, so the else clause is valid.
-                 * long-term we should use internal events for enter/focus
-                 * as well */
-                if (xE)
-                    mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8];
-                else if (event->type == XI_Enter || event->type == XI_FocusIn)
-                    mask = grab->xi2mask[device->id][event->type/8];
-
-                if (grab->ownerEvents && wOtherInputMasks(grab->window))
-                {
-                    InputClientsPtr icp =
-                        wOtherInputMasks(grab->window)->inputClients;
-
-                    while(icp)
-                    {
-                        if (rClient(icp) == rClient(grab))
-                        {
-                            int evtype = (xE) ? ((xGenericEvent*)xE)->evtype : event->type;
-                            mask |= icp->xi2mask[device->id][evtype/8];
-                            break;
-                        }
-
-                        icp = icp->next;
-                    }
-                }
             } else
             {
                 rc = EventToXI((InternalEvent*)event, &xE, &count);
@@ -3607,23 +3575,6 @@ CheckPassiveGrabsOnWindow(
                                 "(%d, %d).\n", device->name, event->type, rc);
                     continue;
                 }
-                mask = grab->eventMask;
-                if (grab->ownerEvents && wOtherInputMasks(grab->window))
-                {
-                    InputClientsPtr icp =
-                        wOtherInputMasks(grab->window)->inputClients;
-
-                    while(icp)
-                    {
-                        if (rClient(icp) == rClient(grab))
-                        {
-                            mask |= icp->mask[device->id];
-                            break;
-                        }
-
-                        icp = icp->next;
-                    }
-                }
             }
 
 	    (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
@@ -3632,7 +3583,8 @@ CheckPassiveGrabsOnWindow(
             {
                 FixUpEventFromWindow(device, xE, grab->window, None, TRUE);
 
-                TryClientEvents(rClient(grab), device, xE, count, mask,
+                TryClientEvents(rClient(grab), device, xE, count,
+                                       GetEventFilter(device, xE),
                                        GetEventFilter(device, xE), grab);
             }
 

commit 2fce4783f41b7fb1106b2945cc98bfc8da39501d
Author: Joe Shaw <joeshaw@litl.com>
Date:   Thu Oct 14 15:09:20 2010 -0400

    fix a sign problem with valuator data.
    
    Without this patch, any negative valuator value is wrong when returned
    from XQueryDeviceState().  This is a regression from at least xserver
    1.4.
    
    Valuator data is set in dix/getevents.c:set_valuators() by copying
    signed int values into an unsigned int field
    DeviceEvent.valuators.data.
    
    That data is converted into a double with an implicit cast by
    assignment to axisVal[i] in Xi/exevents.c:UpdateDeviceState().
    
    That double is converted back to a signed int in
    queryst.c:ProcXQueryDeviceState().  If the original value in
    set_valuators() is negative, the double value will be > 2^31 and the
    conversion back to a signed int is undefined.  (Although I
    consistently see the value -2^31.)
    
    Fix this by changing the definition of DeviceEvent.valuators.data from
    uint32_t to int32_t.
    
    Signed-off-by: Joe Shaw <joeshaw@litl.com>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit e354ccac36a8ee3a23bdc845833c16a5646cc200)

diff --git a/dix/getevents.c b/dix/getevents.c
index 82bb77b..531595e 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -177,7 +177,7 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, int first_valuator,
     }
 
     memcpy(&event->valuators.data[first_valuator],
-           valuators, num_valuators * sizeof(uint32_t));
+           valuators, num_valuators * sizeof(int32_t));
 
 }
 
diff --git a/include/eventstr.h b/include/eventstr.h
index 433227e..377cceb 100644
--- a/include/eventstr.h
+++ b/include/eventstr.h
@@ -99,7 +99,7 @@ struct _DeviceEvent
     struct {
         uint8_t  mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */
         uint8_t  mode[(MAX_VALUATORS + 7)/8]; /**< Valuator mode (Abs or Rel)*/
-        uint32_t data[MAX_VALUATORS];         /**< Valuator data */
+        int32_t  data[MAX_VALUATORS];         /**< Valuator data */
         int32_t  data_frac[MAX_VALUATORS];    /**< Fractional part for data */
     } valuators;
     struct {

commit 9d939ea0f42954f40bbc8388b7c7f62470cdf338
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Feb 15 16:54:35 2010 -0500

    dix: Default DPMS timeout values to match screensaver values
    
    These have the same default, but if you specify something different with
    -s on the command line, only the screensaver time is changed.  As DPMS
    is usually what's desired, change it to match.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 2a763c9023b8bc978b32eaa56d2c625b6f2badee)

diff --git a/dix/main.c b/dix/main.c
index f96245a..df6963f 100644


Reply to: