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

xorg-server: Changes to 'debian-experimental'



 ChangeLog                                                                    |  336 ++
 Xext/xtest.c                                                                 |    2 
 Xi/exevents.c                                                                |   20 
 Xi/queryst.c                                                                 |    3 
 configure.ac                                                                 |    5 
 debian/changelog                                                             |    7 
 debian/patches/0001-mi-force-the-paired-kbd-device-before-CopyKeyClass.patch |   37 
 debian/patches/series                                                        |    1 
 dix/devices.c                                                                |   32 
 dix/events.c                                                                 |   29 
 dix/getevents.c                                                              |   14 
 dix/main.c                                                                   |   14 
 exa/exa_glyphs.c                                                             |    9 
 hw/xfree86/modes/xf86Rotate.c                                                |    8 
 hw/xquartz/GL/indirect.c                                                     | 1122 ++--------
 hw/xquartz/X11Application.m                                                  |   12 
 hw/xquartz/X11Controller.m                                                   |   17 
 hw/xquartz/bundle/Makefile.am                                                |    5 
 hw/xquartz/bundle/mk_bundke.sh                                               |   16 
 hw/xquartz/darwinEvents.c                                                    |    4 
 hw/xquartz/darwinEvents.h                                                    |    3 
 hw/xquartz/mach-startup/Makefile.am                                          |    4 
 hw/xquartz/xpr/dri.c                                                         |  207 +
 include/Makefile.am                                                          |    2 
 include/dix-config-apple-verbatim.h                                          |    8 
 include/dix-config.h.in                                                      |    6 
 include/input.h                                                              |    1 
 include/inputstr.h                                                           |    9 
 mi/mi.h                                                                      |    4 
 mi/mieq.c                                                                    |   51 
 mi/mipointer.c                                                               |    2 
 randr/randr.c                                                                |    2 
 randr/randrstr.h                                                             |    2 
 randr/rrcrtc.c                                                               |   23 
 randr/rrinfo.c                                                               |   10 
 randr/rroutput.c                                                             |    5 
 randr/rrscreen.c                                                             |   21 
 randr/rrxinerama.c                                                           |   50 
 xkb/ddxDevBtn.c                                                              |    2 
 xkb/xkbActions.c                                                             |    4 
 40 files changed, 1048 insertions(+), 1061 deletions(-)

New commits:
commit cba316de029acabc2601e1d7aefe9953e2b15118
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Jan 31 19:32:43 2009 +0100

    Prepare changelog for upload

diff --git a/debian/changelog b/debian/changelog
index e158baa..86e4316 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,11 @@
-xorg-server (2:1.5.99.902-1) UNRELEASED; urgency=low
+xorg-server (2:1.5.99.902-1) experimental; urgency=low
 
   * New upstream release candidate.
   * xserver-xorg-core.install: there are no more font modules.
   * 0001-mi-force-the-paired-kbd-device-before-CopyKeyClass.patch: new patch,
     fixes a crash with some multimedia keyboards (closes: #513384).
 
- -- Julien Cristau <jcristau@debian.org>  Wed, 28 Jan 2009 17:39:07 +0100
+ -- Julien Cristau <jcristau@debian.org>  Sat, 31 Jan 2009 19:32:31 +0100
 
 xorg-server (2:1.5.99.901-2) experimental; urgency=low
 

commit fd314e6de7d3f457009b192b48b340a0d099d5dc
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Jan 31 19:09:20 2009 +0100

    Fix a crash with some multimedia keyboards (closes: #513384).
    
    0001-mi-force-the-paired-kbd-device-before-CopyKeyClass.patch: new patch,
    taken from http://bugs.freedesktop.org/show_bug.cgi?id=19574
    (http://bugs.freedesktop.org/attachment.cgi?id=22028)

diff --git a/debian/changelog b/debian/changelog
index 71172ed..e158baa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ xorg-server (2:1.5.99.902-1) UNRELEASED; urgency=low
 
   * New upstream release candidate.
   * xserver-xorg-core.install: there are no more font modules.
+  * 0001-mi-force-the-paired-kbd-device-before-CopyKeyClass.patch: new patch,
+    fixes a crash with some multimedia keyboards (closes: #513384).
 
  -- Julien Cristau <jcristau@debian.org>  Wed, 28 Jan 2009 17:39:07 +0100
 
diff --git a/debian/patches/0001-mi-force-the-paired-kbd-device-before-CopyKeyClass.patch b/debian/patches/0001-mi-force-the-paired-kbd-device-before-CopyKeyClass.patch
new file mode 100644
index 0000000..d89a93f
--- /dev/null
+++ b/debian/patches/0001-mi-force-the-paired-kbd-device-before-CopyKeyClass.patch
@@ -0,0 +1,37 @@
+From 0d4beba90ad82998f123f05dc0a03003f031b6f0 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@redhat.com>
+Date: Fri, 16 Jan 2009 20:38:57 +1000
+Subject: [PATCH] mi: force the paired kbd device before CopyKeyClass. (#19574)
+
+Some multi-media keyboards send the key events for multimedia keys through the
+device file used by the mouse. Sending a key event through the VCP however
+will fail. The VCP doesn't have a key class so the server crashes or (with an
+appropriate fix) the event is simply swallowed.
+
+Thus, for key events if the master does not have a key class, get the device
+paired with the master (i.e. the VCK) before processing the event any further.
+
+X.Org Bug 19574 <http://bugs.freedesktop.org/show_bug.cgi?id=19574>
+---
+ mi/mieq.c |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/mi/mieq.c b/mi/mieq.c
+index 15ba8e7..a602f87 100644
+--- a/mi/mieq.c
++++ b/mi/mieq.c
+@@ -414,7 +414,11 @@ mieqProcessInputEvents(void)
+                    is transferred. */
+                 if (event->u.u.type == DeviceKeyPress ||
+                     event->u.u.type == DeviceKeyRelease)
++                {
++                    if (!master->key)
++                        master = GetPairedDevice(master);
+ 		    CopyKeyClass(dev, master);
++                }
+ 
+                 CopyGetMasterEvent(master, event, masterEvents, nevents);
+             }
+-- 
+1.5.4.3
+
diff --git a/debian/patches/series b/debian/patches/series
index 0d18c37..ac82720 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+0001-mi-force-the-paired-kbd-device-before-CopyKeyClass.patch
 001_fedora_extramodes.patch
 #06_use_proc_instead_of_sysfs_for_pci_domains.diff
 #13_debian_add_xkbpath_env_variable.diff

commit 0b2591383d7966e0f06892c8b214a6d74125daac
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Jan 31 19:00:49 2009 +0100

    Update changelogs

diff --git a/ChangeLog b/ChangeLog
index a202e54..49d6bc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,339 @@
+commit 1f729b42d567ae9533ac0e467afc9fbc83390776
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 30 21:12:17 2009 -0800
+
+    Version to 1.5.99.902
+
+commit 56f6fb8c8652c85e522e42557f8969987069076b
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Jan 30 19:06:17 2009 -0800
+
+    randr: Avoid re-querying the configuration on everything but GetScreenResources.
+    
+    The new path should only re-query on the other requests when we haven't
+    gathered the information from the DDX yet (such as with a non-RandR 1.2 DDX).
+    
+    Bug #19037.
+    (cherry picked from commit 317f2b4a9fe4b606975711bc332166a82db5087d)
+
+commit 6d928aa227b12832dd358619722a5f4dc71b5d19
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 30 20:17:10 2009 -0800
+
+    RandR crtcs not fetched correctly when primary output is set.
+    
+    Primary outputs may not have a CRTC.
+    Loops fetching CRTCs respecting primary output were broken.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit 4de5705545792d77c9990bbec3e263a517757a2a)
+
+commit 759ed0679a030f502b74a6ff44c15d1c97d9a937
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 30 19:14:36 2009 -0800
+
+    RandR SetOutputPrimary should work with or without a crtc connected
+    
+    The test was inverted from the protocol spec, and besides, the test is bogus
+    anyways.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit c1f2be1f3fd0c80cb4c85b98140b98aa9311242b)
+
+commit b893dc59da9f5a7afb59ea0b2cd794872fc5727f
+Author: Thomas Jaeger <ThJaeger@gmail.com>
+Date:   Sat Dec 20 16:17:02 2008 +0100
+
+    Don't release grabs unless all buttons are up
+    
+    Previously, only buttons <= 5 would count here, but the core protocol
+    allows for 255 buttons.
+    
+    http://lists.freedesktop.org/archives/xorg/2009-January/042092.html
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 717a961528ec69a6e630d536e15568670e0b398a)
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 191161a24a80dc553b11f829c12cfffb76ec7185
+Author: Thomas Jaeger <ThJaeger@gmail.com>
+Date:   Mon Dec 22 00:55:09 2008 +0100
+
+    Count the number of logically down buttons in buttonsDown
+    
+    This fixes the following bug.  Assuming your window manager grabs
+    Alt+Button1 to move windows, map Button3 to 0 via XSetPointerMapping,
+    then press the physical button 3 (this shouldn't have any effect), press
+    Alt and then button 1.  The press event is delivered to the application
+    instead of firing the grab.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit f7f85f696570541e2dd43462675de9e6ee46f545)
+
+commit fe0abdceb483ec0bb2977016b00aef57033aa449
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Jan 8 11:53:30 2009 +1000
+
+    mi: ensure chained button mappings from SD -> MD (#19282)
+    
+    After copying the master event, flip the detail field to the mapped button of
+    the SD, not the physical button. This way if the SD has a mapping 1:3 and the
+    MD has a mapping of 3:4, a press on button 1 on the SD results in a core event
+    on button 4.
+    
+    X.Org Bug 19282 <http://bugs.freedesktop.org/show_bug.cgi?id=19282>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 3441917008021fb13cf86fa619970859d927e17a
+Author: Thomas Jaeger <thjaeger@gmail.com>
+Date:   Mon Jan 5 01:26:42 2009 -0500
+
+    Don't alter device button maps in DoSetPointerMapping
+    
+    Currently, if a device map differs from the core pointer map, then the
+    request may return MappingBusy, even though all the affected core
+    buttons are in the up state.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 3d549438c29004d78032ecc50ab45ca0e3f49623)
+
+commit 364bcbea48d5e49bef8d36f6724e2702cbb4b1af
+Author: Thomas Jaeger <ThJaeger@gmail.com>
+Date:   Fri Jan 9 02:02:38 2009 -0500
+
+    Xext: Send out correct events in ProcXTestFakeInput
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit b2756a71a432f7cf7c870a48676c98625512558d)
+
+commit e789789196db8271a83c751fdf990ceb70164cb1
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Jan 5 15:48:45 2009 +1000
+
+    xkb: fix typo - missing negation when checking button state.
+    
+    Introduced with a85f0d6b98237d8a196de624207acf1983a1859a.
+    
+    Reported by Thomas Jaeger.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 515ce3e4ba42605a1ee9979e8bb5acd3cf6470a3)
+
+commit ebb3872925315d705e47e1ccd7f193ac90ac33dc
+Author: Peter Hutterer <peter.hutterer@redhat.com>
+Date:   Wed Nov 26 11:15:05 2008 +1000
+
+    Xi: fix use of button->down - bitflags instead of int arrays.
+    
+    The device's button down state array was changed to use DOWN_LENGTH and thus
+    bitflags for each button in cfcb3da7.
+    
+    Update the DBSN events to copy this bit-wise state.
+    Update xkb and Xi to check for the bit flag instead of the array value.
+    
+    Reported by ajax.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
+    (cherry picked from commit a85f0d6b98237d8a196de624207acf1983a1859a)
+
+commit 50d80c25525a691472e3fc5859fb303a3ffe1ef2
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Jan 12 15:29:36 2009 +1000
+
+    dix: fix WarpPointer calls for devices with custom valuator ranges (#19297)
+    
+    If the MD's lastSlave was a devices with custom axes ranges, then a
+    WarpPointer would position the cursor at the wrong location. A WarpPointer
+    request provides screen coordinates and these coordinates were scaled to the
+    device range before warping.
+    
+    This patch consists of two parts:
+    1) in the WarpPointer handling, get the lastSlave and post the event through
+       this device.
+    2) assume that WarpPointer coordinates are always in screen coordinates and
+       scale them to device coordinates in GPE before continuing. Note that this
+       breaks device-coordinate based XWarpDevicePointer calls (for which the spec
+       isn't nailed down yet anyway) until a better solution is found.
+    
+    X.Org Bug 19297 <http://bugs.freedesktop.org/show_bug.cgi?id=19297>
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit d36adf52a2b2711d22b11105f7bd907d4493fb9b)
+
+commit b19f12712a0762f20065282fd055fe9bc3ca975f
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Jan 12 16:16:24 2009 +1000
+
+    dix: EnqueueEvent and PlayReleasedEvent need to handle DeviceMotionNotifies
+    
+    No MotionNotify events in the processing anymore, so let's have them treat DMN
+    instead.
+    
+    Reported by Thomas Jaeger.
+    (cherry picked from commit 488d45295105daf10ccd17ca93ae6a6f4d0104f1)
+
+commit ef796a95dd7ddf4ad5761a6ee2de1cdb56190ba2
+Author: Xiang, Haihao <haihao.xiang@intel.com>
+Date:   Tue Jan 6 10:03:19 2009 +0800
+
+    avoid a potential endless loop.
+    
+    Previously it is possible that creating rotation data, then cleaning
+    up and creating again so that pScreen->BlockHandler and
+    xf86_config->BlockHandler all point to xf86RotateBlockHandler.
+    See bug #19343.
+    (cherry picked from commit 5f3188228eb988bd8f08b62c84f98a8ff66ee283)
+
+commit 840b4da5f29e43ccadc720f075e00237d12ef01b
+Author: George Staplin <gstaplin@apple.com>
+Date:   Mon Jan 26 03:02:38 2009 -0700
+
+    XQuartz: GL: indirect.c changes to fix the build with newer OpenGL frameworks.
+    (cherry picked from commit 143224405ba74929c702a95de52b56df140b0d1b)
+
+commit 97a6f55f221e3d470add18db80e3769713480103
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Fri Jan 16 19:26:07 2009 -0800
+
+    XQuartz: SnowLeopard: Help system book name changed in 10.6
+    (cherry picked from commit b57cb05c69acbedb00a97234099ea104309aa2cb)
+
+commit e81b4d495ba02d4fc0b05c26a53fd2a816a61eaa
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Fri Jan 16 13:54:08 2009 -0800
+
+    XQuartz: mieq: Wait for the server to finish initializing before letting other threads mieqEnqueue
+    
+    Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes
+    (cherry picked from commit 94e417ac87a98cd5c6bf2d7c495d702748398931)
+
+commit d6498ea62117cce6a00ac045ddeefb7268a70f5b
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Jan 30 16:17:58 2009 -0800
+
+    Move the apple fat binary hacks back to a header file, and make it apple-only.
+    (cherry picked from commit dd098501d800571e71d06ffc936635a6c9d44e05)
+
+commit b530a0e97b5737375ca1f4eced26d587a16f843f
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Thu Jan 15 20:57:42 2009 -0800
+
+    XQuartz: Fix builddir != srcdir issues and undef _XSERVER64 where appropriate on fat binary compilation
+    (cherry picked from commit f020900641b44a1142e5c2198e9678de2744454e)
+
+commit 82fd4d170824068dddf3b4e6581a12d48e1a069a
+Author: George Staplin <gstaplin@apple.com>
+Date:   Mon Jan 12 19:30:43 2009 -0700
+
+    XQuartz: xpr: Cleanup some of the code and possibly fix part of the GLX Pixmap problem.
+    
+    Split DRICreateSurface into 3 functions.
+    
+    Make CreateSurfaceForPixmap use xp_configure_surface.  I suspect this is partly why
+    GLXPixmaps never worked.
+    
+    It will require some more work and thoughts for pbuffers, unless we fake those with
+    pixmaps and surfaces.
+    (cherry picked from commit 9cf264e67744262b9f45079e6cd752eb3e3b0e08)
+
+commit 9cbdcf1fa4bdcc115def9f134a57ac96a56c69dd
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Sun Jan 11 14:49:39 2009 -0800
+
+    XQuartz: Only call DarwinUpdateModKeys when needed
+    
+    Previously, we were calling it on almost every itteration through sendX11Event
+    (cherry picked from commit 6461729647ff4441d80811e73f0c0d2f108f2700)
+
+commit 037e52fd7353410397dfd877b3e9af99f791fce1
+Author: George Staplin <gstaplin@apple.com>
+Date:   Mon Jan 12 14:14:44 2009 -0700
+
+    XQuartz: GL: Make indirect.c build and work in the 1.6 branch.
+    
+    Reorder some header files and provide some types earlier on.
+    
+    Remove the static __GLXextensionInfo __glDDXExtensionInfo; that isn't
+    used in 1.4 or 1.5, and seems to have been removed from 1.6.  Remove
+    the data structures associated with that too.
+    
+    Remove __glXAquaDrawableResize.  The GLX structure doesn't use
+    it anymore, and the Apple version did nothing useful before.
+    
+    __glXAquaDrawableSwapBuffers(): base no longer contains a drawGlxc
+    member.  Now provide the the Apple/Aqua context in the __GLXAquaDrawable
+    struct.  Add the context member to the __GLXAquaDrawable struct.
+    
+    Remove the fallback configs.  They aren't used in 1.4 or 1.5 either.
+    
+    Remove init_visuals().  It's not used in 1.4 or 1.5 either.
+    
+    In the drawable constructor initialize the state properly, including
+    the new context member.
+    
+    Remove glAquaResetExtension() -- it's not used anymore.
+    
+    This has been tested remotely and proven to work with glxgears,
+    fire, various texture programs I wrote, and various Mesa demos.
+    (cherry picked from commit d514152195452ae11ec7769c76489651620ad380)
+
+commit ee9736b26b1021fac2cf259e6b2142ea780b2af8
+Author: George Staplin <gstaplin@apple.com>
+Date:   Fri Jan 9 16:08:26 2009 -0700
+
+    XQuartz: GL: Set the __GLXconfig renderType to GLX_RGBA_BIT.
+    (cherry picked from commit 3c14546f58f8a138fe67c9cacc3bd0b7fa90c29a)
+    (cherry picked from commit a665ed16f736cf1901b89448dc5d37f4d16dfaf4)
+
+commit b646513861aac9538ba3ebd8e2c7ef530392ff5d
+Author: George Staplin <gstaplin@apple.com>
+Date:   Fri Jan 9 15:53:39 2009 -0700
+
+    XQuartz: GL: Make many more fbconfigs and visuals available for the 1.5 branch.
+    
+    Use a __GLXconfig linked list struct to store the configurations for the
+    fbconfigs and visuals in a pGlxScreen.
+    
+    Also, remove the __GLXvisualConfig/GlxSetVisualConfigs code that isn't used
+    anymore.  There is more code we can remove later, but I want to do that in
+    separate commits.
+    (cherry picked from commit 94162b0f8a25267aca280d25e216cc6bde47da6e)
+    (cherry picked from commit 15bb6abd59fdefe7037237faaea1a39711a972ed)
+
+commit 9e03178ae2da6beb939141f662d875c4c1d40354
+Author: Michel Dänzer <daenzer@vmware.com>
+Date:   Tue Jan 13 13:05:32 2009 +0100
+
+    EXA: Declare glyph cache picture as component-alpha when necessary.
+    
+    Without this, rendering component-alpha glyphs may break without a mask.
+    
+    Fixes http://bugs.freedesktop.org/show_bug.cgi?id=19233 .
+    (cherry picked from commit 639f289dcdbe00a516820f573c01a8339e120ed4)
+
+commit 648807adb059b6cfc413d41e3a37670ce850aee6
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 30 15:43:04 2009 -0800
+
+    Make RandR CRTC info report panning area instead of just crtc area
+    
+    This makes the RandR info consistent with the Xinerama info.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit 6e49fdd2c839b6244c23ce95c3ae76a1a265b986)
+
+commit 9b2958b3a2fb4b65d67916ba7e98dfd21ad434f3
+Author: Maarten Maathuis <madman2003@gmail.com>
+Date:   Fri Dec 19 18:59:27 2008 +0100
+
+    randr: Consider panned crtc's when calculating xinerama screen sizes.
+    
+    - This will allow window managers and applications to actually use the panned area.
+    (cherry picked from commit 332d65ec7a6e94d75efe95d53742f137835274de)
+
 commit 251d0d8090322b2c9dc0c8b7bef001f338d19433
 Author: Keith Packard <keithp@keithp.com>
 Date:   Mon Jan 12 13:03:30 2009 -0800
diff --git a/debian/changelog b/debian/changelog
index 0b22b61..71172ed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
-xorg-server (2:1.5.99.901-3) UNRELEASED; urgency=low
+xorg-server (2:1.5.99.902-1) UNRELEASED; urgency=low
 
+  * New upstream release candidate.
   * xserver-xorg-core.install: there are no more font modules.
 
  -- Julien Cristau <jcristau@debian.org>  Wed, 28 Jan 2009 17:39:07 +0100

commit 1f729b42d567ae9533ac0e467afc9fbc83390776
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Jan 30 21:12:17 2009 -0800

    Version to 1.5.99.902

diff --git a/configure.ac b/configure.ac
index da5f488..61b8b12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,11 +26,13 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.5.99.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.5.99.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
 
+RELEASE_DATE="2009-1-30"
+
 dnl this gets generated by autoheader, and thus contains all the defines.  we
 dnl don't ever actually use it, internally.
 AC_CONFIG_HEADERS(include/do-not-use-config.h)
@@ -417,7 +419,6 @@ VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}"
 
 VENDOR_NAME="The X.Org Foundation"
 VENDOR_NAME_SHORT="X.Org"
-RELEASE_DATE="(unreleased)"
 VENDOR_WEB="http://wiki.x.org";
 
 m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])

commit 56f6fb8c8652c85e522e42557f8969987069076b
Author: Eric Anholt <eric@anholt.net>
Date:   Fri Jan 30 19:06:17 2009 -0800

    randr: Avoid re-querying the configuration on everything but GetScreenResources.
    
    The new path should only re-query on the other requests when we haven't
    gathered the information from the DDX yet (such as with a non-RandR 1.2 DDX).
    
    Bug #19037.
    (cherry picked from commit 317f2b4a9fe4b606975711bc332166a82db5087d)

diff --git a/randr/randrstr.h b/randr/randrstr.h
index b5cebdc..9c9b7c0 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -468,7 +468,7 @@ RRTellChanged (ScreenPtr pScreen);
  * Poll the driver for changed information
  */
 Bool
-RRGetInfo (ScreenPtr pScreen);
+RRGetInfo (ScreenPtr pScreen, Bool force_query);
 
 Bool RRInit (void);
 
diff --git a/randr/rrinfo.c b/randr/rrinfo.c
index 38314de..12b9a4a 100644
--- a/randr/rrinfo.c
+++ b/randr/rrinfo.c
@@ -178,12 +178,20 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations)
  * Poll the driver for changed information
  */
 Bool
-RRGetInfo (ScreenPtr pScreen)
+RRGetInfo (ScreenPtr pScreen, Bool force_query)
 {
     rrScrPriv (pScreen);
     Rotation	    rotations;
     int		    i;
 
+    /* Return immediately if we don't need to re-query and we already have the
+     * information.
+     */
+    if (!force_query) {
+	if (pScrPriv->numCrtcs != 0 || pScrPriv->numOutputs != 0)
+	    return TRUE;
+    }
+
     for (i = 0; i < pScrPriv->numOutputs; i++)
 	pScrPriv->outputs[i]->changed = FALSE;
     for (i = 0; i < pScrPriv->numCrtcs; i++)
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 95662c9..da633b2 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -224,7 +224,7 @@ ProcRRGetScreenSizeRange (ClientPtr client)
     
     if (pScrPriv) 
     {
-	if (!RRGetInfo (pScreen))
+	if (!RRGetInfo (pScreen, FALSE))
 	    return BadAlloc;
 	rep.minWidth  = pScrPriv->minWidth;
 	rep.minHeight = pScrPriv->minHeight;
@@ -340,7 +340,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
     rep.pad = 0;
     
     if (query && pScrPriv)
-	if (!RRGetInfo (pScreen))
+	if (!RRGetInfo (pScreen, query))
 	    return BadAlloc;
 
     if (!pScrPriv)
@@ -615,7 +615,7 @@ ProcRRGetScreenInfo (ClientPtr client)
     rep.pad = 0;
     
     if (pScrPriv)
-	if (!RRGetInfo (pScreen))
+	if (!RRGetInfo (pScreen, FALSE))
 	    return BadAlloc;
 
     output = RRFirstOutput (pScreen);
@@ -796,7 +796,7 @@ ProcRRSetScreenConfig (ClientPtr client)
 	rep.status = RRSetConfigFailed;
 	goto sendReply;
     }
-    if (!RRGetInfo (pScreen))
+    if (!RRGetInfo (pScreen, FALSE))
 	return BadAlloc;
     
     output = RRFirstOutput (pScreen);
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index 7f9a798..36135c6 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -307,12 +307,8 @@ ProcRRXineramaQueryScreens(ClientPtr client)
     REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
 
     if (RRXineramaScreenActive (pScreen))
-    {
-	rrScrPriv(pScreen);
-	if (pScrPriv->numCrtcs == 0 || pScrPriv->numOutputs == 0)
-	    RRGetInfo (pScreen);
-    }
-    
+	RRGetInfo (pScreen, FALSE);
+
     rep.type = X_Reply;
     rep.sequenceNumber = client->sequence;
     rep.number = RRXineramaScreenCount (pScreen);

commit 6d928aa227b12832dd358619722a5f4dc71b5d19
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Jan 30 20:17:10 2009 -0800

    RandR crtcs not fetched correctly when primary output is set.
    
    Primary outputs may not have a CRTC.
    Loops fetching CRTCs respecting primary output were broken.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 4de5705545792d77c9990bbec3e263a517757a2a)

diff --git a/randr/randr.c b/randr/randr.c
index 2e482f0..6fe9b56 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -438,7 +438,7 @@ RRFirstOutput (ScreenPtr pScreen)
     RROutputPtr		    output;
     int	i, j;
     
-    if (pScrPriv->primaryOutput)
+    if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc)
 	return pScrPriv->primaryOutput;
 
     for (i = 0; i < pScrPriv->numCrtcs; i++)
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 9b1024e..95662c9 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -324,7 +324,7 @@ rrGetScreenResources(ClientPtr client, Bool query)
     rrScrPrivPtr		pScrPriv;
     CARD8			*extra;
     unsigned long		extraLen;
-    int				i, n, rc, has_primary;
+    int				i, n, rc, has_primary = 0;
     RRCrtc			*crtcs;
     RROutput			*outputs;
     xRRModeInfo			*modeinfos;
@@ -402,19 +402,22 @@ rrGetScreenResources(ClientPtr client, Bool query)
 	modeinfos = (xRRModeInfo *) (outputs + pScrPriv->numOutputs);
 	names = (CARD8 *) (modeinfos + num_modes);
 
-	has_primary = (pScrPriv->primaryOutput != NULL);
-	if (pScrPriv->primaryOutput)
+	if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc)
 	{
-	    crtcs[0] = pScrPriv->primaryOutput->id;
+	    has_primary = 1;
+	    crtcs[0] = pScrPriv->primaryOutput->crtc->id;
 	    if (client->swapped)
 		swapl (&crtcs[0], n);
 	}
 	
 	for (i = 0; i < pScrPriv->numCrtcs; i++)
 	{
-	    if (pScrPriv->primaryOutput &&
+	    if (has_primary &&
 		pScrPriv->primaryOutput->crtc == pScrPriv->crtcs[i])
+	    {
+		has_primary = 0;
 		continue;
+	    }
 	    crtcs[i + has_primary] = pScrPriv->crtcs[i]->id;
 	    if (client->swapped)
 		swapl (&crtcs[i + has_primary], n);
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index 5af6fb0..7f9a798 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -328,16 +328,21 @@ ProcRRXineramaQueryScreens(ClientPtr client)
     if(rep.number) {
 	rrScrPriv(pScreen);
 	int i;
-	int has_primary = (pScrPriv->primaryOutput != NULL);
+	int has_primary = 0;
 
-	if (has_primary) {
+	if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc) {
+	    has_primary = 1;
 	    RRXineramaWriteCrtc(client, pScrPriv->primaryOutput->crtc);
 	}
 
 	for(i = 0; i < pScrPriv->numCrtcs; i++) {
-	    RRCrtcPtr	crtc = pScrPriv->crtcs[i];
-	    if (!has_primary || (crtc != pScrPriv->primaryOutput->crtc))
-		RRXineramaWriteCrtc(client, crtc);
+	    if (has_primary &&
+		pScrPriv->primaryOutput->crtc == pScrPriv->crtcs[i])
+	    {
+		has_primary = 0;
+		continue;
+	    }
+	    RRXineramaWriteCrtc(client, pScrPriv->crtcs[i]);
 	}
     }
 

commit 759ed0679a030f502b74a6ff44c15d1c97d9a937
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Jan 30 19:14:36 2009 -0800

    RandR SetOutputPrimary should work with or without a crtc connected
    
    The test was inverted from the protocol spec, and besides, the test is bogus
    anyways.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit c1f2be1f3fd0c80cb4c85b98140b98aa9311242b)

diff --git a/randr/rroutput.c b/randr/rroutput.c
index 82c2530..939c14d 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -588,11 +588,6 @@ ProcRRSetOutputPrimary(ClientPtr client)
 	    return RRErrorBase + BadRROutput;
 	}
 
-	if (output->crtc) {
-	    client->errorValue = stuff->output;
-	    return BadMatch;
-	}
-
 	if (output->pScreen != pWin->drawable.pScreen) {
 	    client->errorValue = stuff->window;
 	    return BadMatch;

commit b893dc59da9f5a7afb59ea0b2cd794872fc5727f
Author: Thomas Jaeger <ThJaeger@gmail.com>
Date:   Sat Dec 20 16:17:02 2008 +0100

    Don't release grabs unless all buttons are up
    
    Previously, only buttons <= 5 would count here, but the core protocol
    allows for 255 buttons.
    
    http://lists.freedesktop.org/archives/xorg/2009-January/042092.html
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 717a961528ec69a6e630d536e15568670e0b398a)
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/Xi/exevents.c b/Xi/exevents.c
index b4359a8..482041f 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1069,7 +1069,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count)
 	    xE->u.u.detail = key;
 	    return;
 	}
-        if (!b->state && device->deviceGrab.fromPassiveGrab)
+        if (!b->buttonsDown && device->deviceGrab.fromPassiveGrab)
             deactivateDeviceGrab = TRUE;
     }
 
diff --git a/dix/events.c b/dix/events.c
index 768a33e..6743cae 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3848,7 +3848,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
 	    if (xE->u.u.detail == 0)
 		return;
             filters[mouse->id][Motion_Filter(butc)] = MotionNotify;
-	    if (!butc->state && mouse->deviceGrab.fromPassiveGrab)
+	    if (!butc->buttonsDown && mouse->deviceGrab.fromPassiveGrab)
 		deactivateGrab = TRUE;
 	    break;
 	default:

commit 191161a24a80dc553b11f829c12cfffb76ec7185
Author: Thomas Jaeger <ThJaeger@gmail.com>
Date:   Mon Dec 22 00:55:09 2008 +0100

    Count the number of logically down buttons in buttonsDown
    
    This fixes the following bug.  Assuming your window manager grabs
    Alt+Button1 to move windows, map Button3 to 0 via XSetPointerMapping,
    then press the physical button 3 (this shouldn't have any effect), press
    Alt and then button 1.  The press event is delivered to the application
    instead of firing the grab.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit f7f85f696570541e2dd43462675de9e6ee46f545)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 2aa3161..b4359a8 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -895,10 +895,10 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count)
         *kptr |= bit;
 	if (device->valuator)
 	    device->valuator->motionHintWindow = NullWindow;
-        b->buttonsDown++;
-	b->motionMask = DeviceButtonMotionMask;
         if (!b->map[key])
             return DONT_PROCESS;
+        b->buttonsDown++;
+	b->motionMask = DeviceButtonMotionMask;
         if (b->map[key] <= 5)
 	    b->state |= (Button1Mask >> 1) << b->map[key];
 	SetMaskForEvent(device->id, Motion_Filter(b), DeviceMotionNotify);
@@ -927,10 +927,10 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count)
         *kptr &= ~bit;
 	if (device->valuator)
 	    device->valuator->motionHintWindow = NullWindow;
-        if (b->buttonsDown >= 1 && !--b->buttonsDown)
-	    b->motionMask = 0;
         if (!b->map[key])
             return DONT_PROCESS;
+        if (b->buttonsDown >= 1 && !--b->buttonsDown)
+	    b->motionMask = 0;
 	if (b->map[key] <= 5)
 	    b->state &= ~((Button1Mask >> 1) << b->map[key]);
 	SetMaskForEvent(device->id, Motion_Filter(b), DeviceMotionNotify);
diff --git a/include/inputstr.h b/include/inputstr.h
index 4719d37..a6f823c 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -185,7 +185,11 @@ typedef struct _ValuatorClassRec {
 
 typedef struct _ButtonClassRec {
     CARD8		numButtons;
-    CARD8		buttonsDown;	/* number of buttons currently down */
+    CARD8		buttonsDown;	/* number of buttons currently down
+                                           This counts logical buttons, not
+					   physical ones, i.e if some buttons
+					   are mapped to 0, they're not counted
+					   here */
     unsigned short	state;
     Mask		motionMask;
     CARD8		down[DOWN_LENGTH];

commit fe0abdceb483ec0bb2977016b00aef57033aa449
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Jan 8 11:53:30 2009 +1000

    mi: ensure chained button mappings from SD -> MD (#19282)
    
    After copying the master event, flip the detail field to the mapped button of
    the SD, not the physical button. This way if the SD has a mapping 1:3 and the
    MD has a mapping of 3:4, a press on button 1 on the SD results in a core event
    on button 4.
    
    X.Org Bug 19282 <http://bugs.freedesktop.org/show_bug.cgi?id=19282>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/mi/mi.h b/mi/mi.h
index 444d3ad..6e8b89e 100644
--- a/mi/mi.h
+++ b/mi/mi.h
@@ -175,6 +175,10 @@ extern void mieqProcessInputEvents(
 typedef void (*mieqHandler)(int, xEventPtr, DeviceIntPtr, int);
 void mieqSetHandler(int event, mieqHandler handler);
 
+void
+CopyGetMasterEvent(DeviceIntPtr mdev, DeviceIntPtr sdev, xEvent* original,
+                   EventListPtr master, int count);
+
 /* miexpose.c */
 
 extern RegionPtr miHandleExposures(
diff --git a/mi/mieq.c b/mi/mieq.c
index 8d68ca1..226caa6 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -327,15 +327,32 @@ ChangeDeviceID(DeviceIntPtr dev, xEvent* event)
         DebugF("[mi] Unknown event type (%d), cannot change id.\n", type);
 }
 
+static void
+FixUpEventForMaster(DeviceIntPtr mdev, DeviceIntPtr sdev, xEvent* original,
+                    EventListPtr master, int count)
+{
+    /* Ensure chained button mappings, i.e. that the detail field is the
+     * value of the mapped button on the SD, not the physical button */
+    if (original->u.u.type == DeviceButtonPress || original->u.u.type == DeviceButtonRelease)
+    {
+        int btn = original->u.u.detail;
+        if (!sdev->button)
+            return; /* Should never happen */
+
+        master->event->u.u.detail = sdev->button->map[btn];
+    }
+}
+
 /**
  * Copy the given event into master.
  * @param mdev The master device
+ * @param sdev The slave device the original event comes from
  * @param original The event as it came from the EQ
  * @param master The event after being copied
  * @param count Number of events in original.
  */
 void
-CopyGetMasterEvent(DeviceIntPtr mdev, xEvent* original,
+CopyGetMasterEvent(DeviceIntPtr mdev, DeviceIntPtr sdev, xEvent* original,
                    EventListPtr master, int count)
 {
     int len = count * sizeof(xEvent);
@@ -350,11 +367,16 @@ CopyGetMasterEvent(DeviceIntPtr mdev, xEvent* original,
 
     memcpy(master->event, original, len);
     while (count--)
+    {
         ChangeDeviceID(mdev, &master->event[count]);
+        FixUpEventForMaster(mdev, sdev, original, master, count);
+    }
 }
 extern void
 CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
 
+
+
 /* Call this from ProcessInputEvents(). */
 void
 mieqProcessInputEvents(void)
@@ -431,7 +453,7 @@ mieqProcessInputEvents(void)
                     event->u.u.type == DeviceKeyRelease)
 		    CopyKeyClass(dev, master);
 
-                CopyGetMasterEvent(master, event, masterEvents, nevents);
+                CopyGetMasterEvent(master, dev, event, masterEvents, nevents);
             }
 
             /* If someone's registered a custom event handler, let them
diff --git a/xkb/ddxDevBtn.c b/xkb/ddxDevBtn.c
index 585ad19..44ee75f 100644
--- a/xkb/ddxDevBtn.c
+++ b/xkb/ddxDevBtn.c
@@ -117,7 +117,7 @@ DeviceIntPtr		master = NULL;
         if (!IsPointerDevice(master))
             master = GetPairedDevice(dev->u.master);
 
-        CopyGetMasterEvent(master, &events, masterEvents, count);
+        CopyGetMasterEvent(master, dev, &events, masterEvents, count);
     }
 
     (*dev->public.processInputProc)((xEventPtr)btn, dev, count);

commit 3441917008021fb13cf86fa619970859d927e17a
Author: Thomas Jaeger <thjaeger@gmail.com>
Date:   Mon Jan 5 01:26:42 2009 -0500

    Don't alter device button maps in DoSetPointerMapping
    
    Currently, if a device map differs from the core pointer map, then the


Reply to: