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

xorg-server: Changes to 'debian-unstable'



 ChangeLog                   |  240 ++++++++++++++++++++++++++++++++++++++++++++
 Xext/security.c             |    4 
 Xext/shm.c                  |    2 
 Xext/xselinux_ext.c         |    6 -
 Xext/xselinux_hooks.c       |    4 
 Xi/exevents.c               |    2 
 Xi/xichangehierarchy.c      |   15 ++
 Xi/xipassivegrab.c          |   10 +
 configure.ac                |   12 --
 debian/changelog            |    8 -
 dix/dispatch.c              |   23 ++--
 dix/extension.c             |   14 --
 hw/dmx/examples/Makefile.am |   56 +++++-----
 hw/kdrive/linux/keyboard.c  |    6 -
 hw/kdrive/linux/ms.c        |    4 
 hw/kdrive/linux/ps2.c       |    4 
 include/dixstruct.h         |    1 
 include/extension.h         |    2 
 record/record.c             |    8 -
 xfixes/cursor.c             |    4 
 20 files changed, 332 insertions(+), 93 deletions(-)

New commits:
commit 4c39e1b24a2fd46c9c1dab79e3b7de7dab16bd51
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sat Jan 7 22:25:49 2012 +0100

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index 19f9d26..e6a5e4a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-xorg-server (2:1.11.3.901-1) UNRELEASED; urgency=low
+xorg-server (2:1.11.3.901-1) unstable; urgency=low
 
   * New upstream release candidate (1.11.4 RC1):
     - Fix ShmPutImage for XYBitmap (Closes: #629611). Many thanks
       to Alan Curry again.
 
- -- Cyril Brulebois <kibi@debian.org>  Sat, 07 Jan 2012 22:21:05 +0100
+ -- Cyril Brulebois <kibi@debian.org>  Sat, 07 Jan 2012 22:25:44 +0100
 
 xorg-server (2:1.11.2.902-1) unstable; urgency=low
 

commit e70fa71a4dacb92abb77266f58ad600bff0f92ad
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sat Jan 7 22:25:41 2012 +0100

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index ab079f2..8ce5296 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,243 @@
+commit cea9f9f273cb525cb5daa2d2819d3f635582cb24
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Fri Jan 6 22:01:03 2012 -0800
+
+    configure.ac: 1.11.3.901 (1.11.4 RC1)
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit b15be8547d4d204f3e498f52d86713a76766e871
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Fri Jan 6 22:12:14 2012 -0800
+
+    Xi: Fix mishandled git merge
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 82e0ae042379181eb143431e1413084432a17079
+Merge: f9b00c2 4e4bb31
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Mon Jan 2 20:58:22 2012 -0500
+
+    Merge remote-tracking branch 'whot/server-1.11-branch' into server-1.11-branch
+
+commit 4e4bb319a4f9510277557f65676948cd1db10e93
+Author: Carlos Garnacho <carlosg@gnome.org>
+Date:   Tue Dec 13 15:41:23 2011 +0100
+
+    Xi: assign correct grab_mode/other_device_mode in XI2 passive grabs
+    
+    CreateGrab() expects the keyboard mode to be stored in grab_mode, and the
+    pointer mode in other_device_mode, so respect this in passive XI2 grabs,
+    and switch modes if needed.
+    
+    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
+    (cherry picked from commit 5b169cb695bd450d7f64e3800f00c9237ee67f96)
+
+commit 8c73f6bcbdc04380cc41d9f6dc7e849c7c4f9298
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Dec 8 21:52:07 2011 -0800
+
+    Change disable_clientpointer return type to void
+    
+    It doesn't return anything, nor does it's caller expect it to.
+    
+    Fixes Solaris Studio compiler error:
+    "xichangehierarchy.c", line 214: Function has no return statement : disable_clientpointer
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit 372a6f10dc2d74d2d179e8b92449e9b8636a99ef)
+
+commit ae4272a5742119b10074a542d0dcd4c493cb83e4
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Nov 30 09:06:06 2011 +1000
+
+    xfixes: don't dereference a NULL cursor
+    
+    If the new cursor is the NULL cursor, don't dereference it and use zeros
+    instead.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 1ab50be938524dcd4a9e56d27e3b96a27c2db2c0)
+
+commit 20efd3c15829d8fbb3610d5af41b67a627e63d21
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Nov 29 16:15:37 2011 +1000
+
+    Xi: when removing a device, reset ClientPointers where needed
+    
+    if a client had the to-be-removed device as ClientPointer, reset to NULL.
+    
+    Fixes #43165
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit d2ebbcdaf6b13d70eee704b1764ff349e1be22a0)
+
+commit cf296f2eeffe4b438e9378268f84a1f63c555e52
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Nov 9 15:31:10 2011 +1000
+
+    Xext: don't swap CARD8 in SProcSELinuxQueryVersion
+    
+    xselinux_ext.c: In function 'SELinuxSendItemsToClient':
+    xselinux_ext.c:340:16: warning: unused variable 'n' [-Wunused-variable]
+    xselinux_ext.c: In function 'SProcSELinuxQueryVersion':
+    xselinux_ext.c:532:62: error: call to 'wrong_size' declared with attribute
+    error: wrong sized variable passed to swap
+    xselinux_ext.c:533:62: error: call to 'wrong_size' declared with attribute
+    error: wrong sized variable passed to swap
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+    (cherry picked from commit bb4aa1f263ad38c175bfda3b7e6c325260ce3f28)
+    
+    Conflicts:
+    
+    	Xext/xselinux_ext.c
+
+commit 4b386610243b1a30db7e4cdb89cb43012198407d
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Dec 16 12:41:08 2011 +1000
+
+    dix: button state must show the logical buttons, not physical buttons
+    
+    If the device is mapped 3 2 1, a click on physical button 1 sends a button 3
+    press, but the state was set for button 1. Fix this, the state must be set
+    for that button's logical mapping.
+    
+    https://bugzilla.gnome.org/show_bug.cgi?id=655928
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    (cherry picked from commit 9567d21e85b99febe805263a4d93b15fd1f7ab42)
+    
+    Conflicts:
+    
+    	dix/inpututils.c
+
+commit f9b00c2aba496fe470c24d0f8d3e3d0e3b05aa65
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Nov 29 16:15:37 2011 +1000
+
+    Xi: when removing a device, reset ClientPointers where needed
+    
+    if a client had the to-be-removed device as ClientPointer, reset to NULL.
+    
+    Fixes #43165
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit d2ebbcdaf6b13d70eee704b1764ff349e1be22a0)
+
+commit e4984b3023351b5fcc506f4a196ad699db8b0535
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Wed Nov 30 09:06:06 2011 +1000
+
+    xfixes: don't dereference a NULL cursor
+    
+    If the new cursor is the NULL cursor, don't dereference it and use zeros
+    instead.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    (cherry picked from commit 1ab50be938524dcd4a9e56d27e3b96a27c2db2c0)
+
+commit 625d1088192a9ad972c20fbdbcb4bb9fda979157
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Dec 16 09:15:25 2011 -0500
+
+    dmx: force -fno-strict-aliasing for xinput example
+    
+    Compiler warning:
+    xinput.c:272: warning: dereferencing pointer 'e' does break strict-aliasing
+    rules
+    
+    The code itself is the usual XInput client-side code:
+            XEvent event;
+            XDeviceMotionEvent *e = (XDeviceMotionEvent *)&event;
+            XNextEvent(display, &event);
+            printf("%d\n", e->type);
+    
+    Since XDeviceMotionEvent is not guaranteed the same size as XEvent, clients
+    must use pointer aliasing as above when using the XNextEvent API. Disable
+    strict aliasing for this example.
+    
+    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit 3aca8199405cff5097ee5813605ec78b5ae44a43)
+
+commit 53e347b22bb79043243e25891cd7d6f374a8aa23
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Nov 8 10:13:15 2011 -0800
+
+    Save major/minor opcodes in ClientRec for RecordAReply
+    
+    The record extension needs the major and minor opcodes in the reply
+    hook, but the request buffer may have been freed by the time the hook
+    is invoked. Saving the request major and minor codes as the request is
+    executed avoids fetching from the defunct request buffer.
+    
+    This patch also eliminates the public MinorOpcodeOfRequest function,
+    inlining it into Dispatch. Usages of that function have been replaced
+    with direct access to the new ClientRec field.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Jamey Sharp <jamey@minilop.net>
+    (cherry picked from commit fb22a408c69a84f81905147de9e82cf66ffb6eb2)
+    
+    Conflicts:
+    
+    	include/extension.h
+
+commit b736f8c92bae7773ff6e1fca886f9ccc50156488
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sat Nov 5 13:00:07 2011 +0100
+
+    Fix ShmPutImage for XYBitmap
+    
+    We can't call CopyArea in that case because the image has depth 1, which
+    might not match the target drawable, so we might overrun the shm
+    segment.  Commit 11817a881cb93a89788105d1e575a468f2a8d27c apparently
+    fixed a similar bug for XYPixmap, but missed the bitmap case.
+    
+    Fixes: http://bugs.debian.org/629611
+    
+    Thanks to Alan Curry for diagnosing this and providing a test case.
+    
+    Reported-and-tested-by: Alan Curry <pacman@kosh.dhis.org>
+    Reviewed-by: Peter Harris <pharris@opentext.com>
+    Signed-off-by: Julien Cristau <jcristau@debian.org>
+    (cherry picked from commit 08ec4da6a7617637914bee1636858474213cf39d)
+
+commit b2a4c09507b267495ea5e4c2e05373b323c80edf
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sat Dec 17 12:56:59 2011 -0800
+
+    kdrive/linux: Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
+    
+    Reported-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Reviewed-by: Jamey Sharp <jamey@minilop.net>
+    (cherry picked from commit 1deede3c48d5ac91f50774c79f02afc6e036614e)
+
+commit beaa7ad2ec45811e16722283a8b557a08e91ef18
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sat Dec 17 12:25:26 2011 -0800
+
+    configure.ac: Make Xephyr dependency error message more informative
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Reviewed-by: Jamey Sharp <jamey@minilop.net>
+    (cherry picked from commit d0170d54c71fc761b8f1ae7a0e555dc2ca23cf9c)
+
 commit 41524dd61020f2a446ec54643fa17aa791338cac
 Author: Jeremy Huddleston <jeremyhu@apple.com>
 Date:   Fri Dec 16 17:47:46 2011 -0800
diff --git a/debian/changelog b/debian/changelog
index e9f7359..19f9d26 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,10 @@
-xorg-server (2:1.11.3-1) UNRELEASED; urgency=low
+xorg-server (2:1.11.3.901-1) UNRELEASED; urgency=low
 
-  * New upstream release.
+  * New upstream release candidate (1.11.4 RC1):
+    - Fix ShmPutImage for XYBitmap (Closes: #629611). Many thanks
+      to Alan Curry again.
 
- -- Cyril Brulebois <kibi@debian.org>  Tue, 20 Dec 2011 11:24:15 +0100
+ -- Cyril Brulebois <kibi@debian.org>  Sat, 07 Jan 2012 22:21:05 +0100
 
 xorg-server (2:1.11.2.902-1) unstable; urgency=low
 

commit cea9f9f273cb525cb5daa2d2819d3f635582cb24
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Jan 6 22:01:03 2012 -0800

    configure.ac: 1.11.3.901 (1.11.4 RC1)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/configure.ac b/configure.ac
index a871529..fdaa583 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.11.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2011-12-16"
+AC_INIT([xorg-server], 1.11.3.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2012-01-06"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE

commit b15be8547d4d204f3e498f52d86713a76766e871
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Jan 6 22:12:14 2012 -0800

    Xi: Fix mishandled git merge
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index 4a15d5c..3facadd 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -216,19 +216,6 @@ disable_clientpointer(DeviceIntPtr dev)
 }
 
 static int
-disable_clientpointer(DeviceIntPtr dev)
-{
-    int i;
-
-    for (i = 0; i < currentMaxClients; i++)
-    {
-        ClientPtr client = clients[i];
-        if (client && client->clientPtr == dev)
-            client->clientPtr = NULL;
-    }
-}
-
-static int
 remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
               int flags[MAXDEVICES])
 {

commit 4e4bb319a4f9510277557f65676948cd1db10e93
Author: Carlos Garnacho <carlosg@gnome.org>
Date:   Tue Dec 13 15:41:23 2011 +0100

    Xi: assign correct grab_mode/other_device_mode in XI2 passive grabs
    
    CreateGrab() expects the keyboard mode to be stored in grab_mode, and the
    pointer mode in other_device_mode, so respect this in passive XI2 grabs,
    and switch modes if needed.
    
    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit 5b169cb695bd450d7f64e3800f00c9237ee67f96)

diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index 5cdd8ac..af46282 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -140,11 +140,17 @@ ProcXIPassiveGrabDevice(ClientPtr client)
     memset(&param, 0, sizeof(param));
     param.grabtype = GRABTYPE_XI2;
     param.ownerEvents = stuff->owner_events;
-    param.this_device_mode = stuff->grab_mode;
-    param.other_devices_mode = stuff->paired_device_mode;
     param.grabWindow = stuff->grab_window;
     param.cursor = stuff->cursor;
 
+    if (IsKeyboardDevice(dev)) {
+        param.this_device_mode = stuff->grab_mode;
+        param.other_devices_mode = stuff->paired_device_mode;
+    } else {
+        param.this_device_mode = stuff->paired_device_mode;
+        param.other_devices_mode = stuff->grab_mode;
+    }
+
     if (stuff->cursor != None)
     {
         status = dixLookupResourceByType(&tmp, stuff->cursor,

commit 8c73f6bcbdc04380cc41d9f6dc7e849c7c4f9298
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Dec 8 21:52:07 2011 -0800

    Change disable_clientpointer return type to void
    
    It doesn't return anything, nor does it's caller expect it to.
    
    Fixes Solaris Studio compiler error:
    "xichangehierarchy.c", line 214: Function has no return statement : disable_clientpointer
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 372a6f10dc2d74d2d179e8b92449e9b8636a99ef)

diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index dfcd52f..3facadd 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -202,7 +202,7 @@ unwind:
     return rc;
 }
 
-static int
+static void
 disable_clientpointer(DeviceIntPtr dev)
 {
     int i;

commit ae4272a5742119b10074a542d0dcd4c493cb83e4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Nov 30 09:06:06 2011 +1000

    xfixes: don't dereference a NULL cursor
    
    If the new cursor is the NULL cursor, don't dereference it and use zeros
    instead.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 1ab50be938524dcd4a9e56d27e3b96a27c2db2c0)

diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index ecbed40..7b01c8b 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -179,9 +179,9 @@ CursorDisplayCursor (DeviceIntPtr pDev,
 		ev.type = XFixesEventBase + XFixesCursorNotify;
 		ev.subtype = XFixesDisplayCursorNotify;
 		ev.window = e->pWindow->drawable.id;
-		ev.cursorSerial = pCursor->serialNumber;
+		ev.cursorSerial = pCursor ? pCursor->serialNumber : 0;
 		ev.timestamp = currentTime.milliseconds;
-		ev.name = pCursor->name;
+		ev.name = pCursor ? pCursor->name : None;
 		WriteEventsToClient (e->pClient, 1, (xEvent *) &ev);
 	    }
 	}

commit 20efd3c15829d8fbb3610d5af41b67a627e63d21
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Nov 29 16:15:37 2011 +1000

    Xi: when removing a device, reset ClientPointers where needed
    
    if a client had the to-be-removed device as ClientPointer, reset to NULL.
    
    Fixes #43165
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit d2ebbcdaf6b13d70eee704b1764ff349e1be22a0)

diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index 96ead6f..dfcd52f 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -203,6 +203,19 @@ unwind:
 }
 
 static int
+disable_clientpointer(DeviceIntPtr dev)
+{
+    int i;
+
+    for (i = 0; i < currentMaxClients; i++)
+    {
+        ClientPtr client = clients[i];
+        if (client && client->clientPtr == dev)
+            client->clientPtr = NULL;
+    }
+}
+
+static int
 remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
               int flags[MAXDEVICES])
 {
@@ -252,6 +265,8 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
     if (rc != Success)
         goto unwind;
 
+    disable_clientpointer(ptr);
+
     /* Disabling sends the devices floating, reattach them if
      * desired. */
     if (r->return_mode == XIAttachToMaster)

commit cf296f2eeffe4b438e9378268f84a1f63c555e52
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Nov 9 15:31:10 2011 +1000

    Xext: don't swap CARD8 in SProcSELinuxQueryVersion
    
    xselinux_ext.c: In function 'SELinuxSendItemsToClient':
    xselinux_ext.c:340:16: warning: unused variable 'n' [-Wunused-variable]
    xselinux_ext.c: In function 'SProcSELinuxQueryVersion':
    xselinux_ext.c:532:62: error: call to 'wrong_size' declared with attribute
    error: wrong sized variable passed to swap
    xselinux_ext.c:533:62: error: call to 'wrong_size' declared with attribute
    error: wrong sized variable passed to swap
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit bb4aa1f263ad38c175bfda3b7e6c325260ce3f28)
    
    Conflicts:
    
    	Xext/xselinux_ext.c

diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c
index 374571c..85ca2dc 100644
--- a/Xext/xselinux_ext.c
+++ b/Xext/xselinux_ext.c
@@ -528,12 +528,6 @@ ProcSELinuxDispatch(ClientPtr client)
 static int
 SProcSELinuxQueryVersion(ClientPtr client)
 {
-    REQUEST(SELinuxQueryVersionReq);
-    int n;
-
-    REQUEST_SIZE_MATCH(SELinuxQueryVersionReq);
-    swaps(&stuff->client_major, n);
-    swaps(&stuff->client_minor, n);
     return ProcSELinuxQueryVersion(client);
 }
 

commit 4b386610243b1a30db7e4cdb89cb43012198407d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Dec 16 12:41:08 2011 +1000

    dix: button state must show the logical buttons, not physical buttons
    
    If the device is mapped 3 2 1, a click on physical button 1 sends a button 3
    press, but the state was set for button 1. Fix this, the state must be set
    for that button's logical mapping.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=655928
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 9567d21e85b99febe805263a4d93b15fd1f7ab42)
    
    Conflicts:
    
    	dix/inpututils.c

diff --git a/Xi/exevents.c b/Xi/exevents.c
index dcb496f..9d43564 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -927,7 +927,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device)
 
     for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
         if (BitIsOn(mouse->button->down, i))
-            SetBit(event->buttons, i);
+            SetBit(event->buttons, mouse->button->map[i]);
 
     if (kbd && kbd->key)
     {

commit f9b00c2aba496fe470c24d0f8d3e3d0e3b05aa65
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Nov 29 16:15:37 2011 +1000

    Xi: when removing a device, reset ClientPointers where needed
    
    if a client had the to-be-removed device as ClientPointer, reset to NULL.
    
    Fixes #43165
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit d2ebbcdaf6b13d70eee704b1764ff349e1be22a0)

diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index 96ead6f..dfcd52f 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -203,6 +203,19 @@ unwind:
 }
 
 static int
+disable_clientpointer(DeviceIntPtr dev)
+{
+    int i;
+
+    for (i = 0; i < currentMaxClients; i++)
+    {
+        ClientPtr client = clients[i];
+        if (client && client->clientPtr == dev)
+            client->clientPtr = NULL;
+    }
+}
+
+static int
 remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
               int flags[MAXDEVICES])
 {
@@ -252,6 +265,8 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
     if (rc != Success)
         goto unwind;
 
+    disable_clientpointer(ptr);
+
     /* Disabling sends the devices floating, reattach them if
      * desired. */
     if (r->return_mode == XIAttachToMaster)

commit e4984b3023351b5fcc506f4a196ad699db8b0535
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Nov 30 09:06:06 2011 +1000

    xfixes: don't dereference a NULL cursor
    
    If the new cursor is the NULL cursor, don't dereference it and use zeros
    instead.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 1ab50be938524dcd4a9e56d27e3b96a27c2db2c0)

diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index ecbed40..7b01c8b 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -179,9 +179,9 @@ CursorDisplayCursor (DeviceIntPtr pDev,
 		ev.type = XFixesEventBase + XFixesCursorNotify;
 		ev.subtype = XFixesDisplayCursorNotify;
 		ev.window = e->pWindow->drawable.id;
-		ev.cursorSerial = pCursor->serialNumber;
+		ev.cursorSerial = pCursor ? pCursor->serialNumber : 0;
 		ev.timestamp = currentTime.milliseconds;
-		ev.name = pCursor->name;
+		ev.name = pCursor ? pCursor->name : None;
 		WriteEventsToClient (e->pClient, 1, (xEvent *) &ev);
 	    }
 	}

commit 625d1088192a9ad972c20fbdbcb4bb9fda979157
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Dec 16 09:15:25 2011 -0500

    dmx: force -fno-strict-aliasing for xinput example
    
    Compiler warning:
    xinput.c:272: warning: dereferencing pointer 'e' does break strict-aliasing
    rules
    
    The code itself is the usual XInput client-side code:
            XEvent event;
            XDeviceMotionEvent *e = (XDeviceMotionEvent *)&event;
            XNextEvent(display, &event);
            printf("%d\n", e->type);
    
    Since XDeviceMotionEvent is not guaranteed the same size as XEvent, clients
    must use pointer aliasing as above when using the XNextEvent API. Disable
    strict aliasing for this example.
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 3aca8199405cff5097ee5813605ec78b5ae44a43)

diff --git a/hw/dmx/examples/Makefile.am b/hw/dmx/examples/Makefile.am
index 229bb57..d055ddc 100644
--- a/hw/dmx/examples/Makefile.am
+++ b/hw/dmx/examples/Makefile.am
@@ -10,60 +10,60 @@ bin_PROGRAMS = \
 noinst_PROGRAMS = xinput xtest evi res xled xbell $(EV_PROG)
 
 dmxinfo_SOURCES = dmxinfo.c
-dmxinfo_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxinfo_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxinfo_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxinfo_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxwininfo_SOURCES = dmxwininfo.c
-dmxwininfo_LDADD = @DMXXMUEXAMPLES_DEP_LIBS@
-dmxwininfo_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
+dmxwininfo_LDADD = $(DMXXMUEXAMPLES_DEP_LIBS)
+dmxwininfo_CFLAGS = $(DMXXMUEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxreconfig_SOURCES = dmxreconfig.c
-dmxreconfig_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxreconfig_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxreconfig_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxreconfig_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxresize_SOURCES = dmxresize.c
-dmxresize_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxresize_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxresize_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxresize_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxaddscreen_SOURCES = dmxaddscreen.c
-dmxaddscreen_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxaddscreen_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxaddscreen_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxaddscreen_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxrmscreen_SOURCES = dmxrmscreen.c
-dmxrmscreen_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxrmscreen_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxrmscreen_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxrmscreen_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxaddinput_SOURCES = dmxaddinput.c
-dmxaddinput_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxaddinput_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxaddinput_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxaddinput_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxrminput_SOURCES = dmxrminput.c
-dmxrminput_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxrminput_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxrminput_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxrminput_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 xinput_SOURCES = xinput.c
-xinput_LDADD = @DMXXIEXAMPLES_DEP_LIBS@
-xinput_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
+xinput_LDADD = $(DMXXIEXAMPLES_DEP_LIBS)
+xinput_CFLAGS = $(DMXXIEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 xtest_SOURCES = xtest.c
-xtest_LDADD = @XTSTEXAMPLES_DEP_LIBS@
-xtest_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
+xtest_LDADD = $(XTSTEXAMPLES_DEP_LIBS)
+xtest_CFLAGS = $(XTSTEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 evi_SOURCES = evi.c
-evi_LDADD = @X11EXAMPLES_DEP_LIBS@
-evi_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
+evi_LDADD = $(X11EXAMPLES_DEP_LIBS)
+evi_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 res_SOURCES = res.c
-res_LDADD = @XRESEXAMPLES_DEP_LIBS@
-res_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
+res_LDADD = $(XRESEXAMPLES_DEP_LIBS)
+res_CFLAGS = $(XRESEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 xled_SOURCES = xled.c
-xled_LDADD = @X11EXAMPLES_DEP_LIBS@
-xled_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
+xled_LDADD = $(X11EXAMPLES_DEP_LIBS)
+xled_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 xbell_SOURCES = xbell.c
-xbell_LDADD = @X11EXAMPLES_DEP_LIBS@
-xbell_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
+xbell_LDADD = $(X11EXAMPLES_DEP_LIBS)
+xbell_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 ev_SOURCES = ev.c
 ev_LDADD = 

commit 53e347b22bb79043243e25891cd7d6f374a8aa23
Author: Keith Packard <keithp@keithp.com>
Date:   Tue Nov 8 10:13:15 2011 -0800

    Save major/minor opcodes in ClientRec for RecordAReply
    
    The record extension needs the major and minor opcodes in the reply
    hook, but the request buffer may have been freed by the time the hook
    is invoked. Saving the request major and minor codes as the request is
    executed avoids fetching from the defunct request buffer.
    
    This patch also eliminates the public MinorOpcodeOfRequest function,
    inlining it into Dispatch. Usages of that function have been replaced
    with direct access to the new ClientRec field.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Jamey Sharp <jamey@minilop.net>
    (cherry picked from commit fb22a408c69a84f81905147de9e82cf66ffb6eb2)
    
    Conflicts:
    
    	include/extension.h

diff --git a/Xext/security.c b/Xext/security.c
index 8673880..aa78e54 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -148,9 +148,7 @@ SecurityLabelInitial(void)
 static _X_INLINE const char *
 SecurityLookupRequestName(ClientPtr client)
 {
-    int major = ((xReq *)client->requestBuffer)->reqType;
-    int minor = MinorOpcodeOfRequest(client);
-    return LookupRequestName(major, minor);
+    return LookupRequestName(client->majorOp, client->minorOp);
 }
 
 
diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c
index f1d8e5d..0d4c9ab 100644
--- a/Xext/xselinux_hooks.c
+++ b/Xext/xselinux_hooks.c
@@ -263,8 +263,8 @@ SELinuxAudit(void *auditdata,
     if (client) {
 	REQUEST(xReq);
 	if (stuff) {
-	    major = stuff->reqType;
-	    minor = MinorOpcodeOfRequest(client);
+	    major = client->majorOp;
+	    minor = client->minorOp;
 	}
     }
     if (audit->id)
diff --git a/dix/dispatch.c b/dix/dispatch.c
index f8200b1..a13274c 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -337,8 +337,6 @@ DisableLimitedSchedulingLatency(void)
 	SmartScheduleLatencyLimited = 0;
 }
 
-#define MAJOROP ((xReq *)client->requestBuffer)->reqType
-
 void
 Dispatch(void)
 {
@@ -419,21 +417,28 @@ Dispatch(void)
 	        }
 
 		client->sequence++;
+		client->majorOp = ((xReq *)client->requestBuffer)->reqType;
+		client->minorOp = 0;
+		if (client->majorOp >= EXTENSION_BASE) {
+		    ExtensionEntry *ext = GetExtensionEntry(client->majorOp);
+		    if (ext)
+			client->minorOp = ext->MinorOpcode(client);
+		}
 #ifdef XSERVER_DTRACE
-		XSERVER_REQUEST_START(LookupMajorName(MAJOROP), MAJOROP,
+		XSERVER_REQUEST_START(LookupMajorName(client->majorOp), client->majorOp,
 			      ((xReq *)client->requestBuffer)->length,
 			      client->index, client->requestBuffer);
 #endif
 		if (result > (maxBigRequestSize << 2))
 		    result = BadLength;
 		else {
-		    result = XaceHookDispatch(client, MAJOROP);
+		    result = XaceHookDispatch(client, client->majorOp);
 		    if (result == Success)
-			result = (* client->requestVector[MAJOROP])(client);
+			result = (* client->requestVector[client->majorOp])(client);
 		    XaceHookAuditEnd(client, result);
 		}
 #ifdef XSERVER_DTRACE
-		XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP,
+		XSERVER_REQUEST_DONE(LookupMajorName(client->majorOp), client->majorOp,
 			      client->sequence, client->index, result);
 #endif
 
@@ -444,8 +449,8 @@ Dispatch(void)
 		}
 		else if (result != Success)
 		{
-		    SendErrorToClient(client, MAJOROP,
-				      MinorOpcodeOfRequest(client),
+		    SendErrorToClient(client, client->majorOp,
+				      client->minorOp,
 				      client->errorValue, result);
 		    break;
 		}
@@ -466,8 +471,6 @@ Dispatch(void)
     SmartScheduleLatencyLimited = 0;
 }
 
-#undef MAJOROP
-
 static int  VendorRelease = VENDOR_RELEASE;
 static char *VendorString = VENDOR_NAME;
 
diff --git a/dix/extension.c b/dix/extension.c
index c7bbac5..b677cdb 100644
--- a/dix/extension.c
+++ b/dix/extension.c
@@ -228,20 +228,6 @@ StandardMinorOpcode(ClientPtr client)
     return ((xReq *)client->requestBuffer)->data;
 }
 
-unsigned short
-MinorOpcodeOfRequest(ClientPtr client)
-{
-    unsigned char major;
-
-    major = ((xReq *)client->requestBuffer)->reqType;
-    if (major < EXTENSION_BASE)
-	return 0;
-    major -= EXTENSION_BASE;
-    if (major >= NumExtensions)
-	return 0;
-    return (*extensions[major]->MinorOpcode)(client);
-}
-
 void
 CloseDownExtensions(void)
 {
diff --git a/include/dixstruct.h b/include/dixstruct.h
index 443e8b0..94eb526 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -123,6 +123,7 @@ typedef struct _Client {
     
     DeviceIntPtr clientPtr;
     ClientIdPtr  clientIds;
+    unsigned short majorOp, minorOp;
 }           ClientRec;
 
 /*
diff --git a/include/extension.h b/include/extension.h
index 29a11c3..9249951 100644
--- a/include/extension.h
+++ b/include/extension.h
@@ -52,8 +52,6 @@ _XFUNCPROTOBEGIN
 
 extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client*/);
 
-extern _X_EXPORT unsigned short MinorOpcodeOfRequest(ClientPtr /*client*/);
-
 extern _X_EXPORT Bool EnableDisableExtension(char *name, Bool enable);
 
 extern _X_EXPORT void EnableDisableExtensionError(char *name, Bool enable);
diff --git a/record/record.c b/record/record.c
index 93383ce..778849a 100644
--- a/record/record.c
+++ b/record/record.c
@@ -554,7 +554,7 @@ RecordARequest(ClientPtr client)
 	    }
 	    else /* extension, check minor opcode */
 	    {
-		int minorop = MinorOpcodeOfRequest(client);
+		int minorop = client->minorOp;
 		int numMinOpInfo;
 		RecordMinorOpPtr pMinorOpInfo = pRCAP->pRequestMinOpInfo;
 
@@ -611,12 +611,9 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
     RecordContextPtr pContext;
     RecordClientsAndProtocolPtr pRCAP;
     int eci;
-    int majorop;
     ReplyInfoRec *pri = (ReplyInfoRec *)calldata;
     ClientPtr client = pri->client;
-    REQUEST(xReq);
 
-    majorop = stuff->reqType;
     for (eci = 0; eci < numEnabledContexts; eci++)
     {
 	pContext = ppAllContexts[eci];
@@ -624,6 +621,7 @@ RecordAReply(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
 					  NULL);
 	if (pRCAP)
 	{
+	    int majorop = client->majorOp;
 	    if (pContext->continuedReply)
 	    {
 		RecordAProtocolElement(pContext, client, XRecordFromServer,


Reply to: