xorg-server: Changes to 'ubuntu+1'
debian/changelog | 8 +++
debian/patches/224_return_BadWindow_not_BadMatch.diff | 47 ++++++++++++++++++
debian/patches/series | 1
3 files changed, 56 insertions(+)
New commits:
commit 9e211dae959dcf8402c5ba2122f695c5279523a0
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Mon Jan 23 16:10:21 2012 +1100
Cherry-pick commit fixing BadWindow error returns; fixes some g-s-d crashers
diff --git a/debian/changelog b/debian/changelog
index 1fe6b50..31ee64a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+xorg-server (2:1.11.3-0ubuntu8) precise; urgency=low
+
+ * debian/patches/224_return_BadWindow_not_BadMatch.diff:
+ - Fix the error values of a whole slew of window-related calls.
+ Fixes some gnome-settings-daemon aborts in XLib (LP: #903973)
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com> Mon, 23 Jan 2012 16:09:29 +1100
+
xorg-server (2:1.11.3-0ubuntu7) precise; urgency=low
* Fixes for relative devices
diff --git a/debian/patches/224_return_BadWindow_not_BadMatch.diff b/debian/patches/224_return_BadWindow_not_BadMatch.diff
new file mode 100644
index 0000000..12f59eb
--- /dev/null
+++ b/debian/patches/224_return_BadWindow_not_BadMatch.diff
@@ -0,0 +1,47 @@
+commit ef492e9797b6d4f6bbc25e86bedc24477819fde7
+Author: Chris Halse Rogers <christopher.halse.rogers@canonical.com>
+Date: Thu Jan 5 01:22:39 2012 +0000
+
+ dix: Return BadWindow rather than BadMatch from dixLookupWindow
+
+ dixLookupWindow uses dixLookupDrawable internally, which returns
+ BadMatch when the XID matches a non-Window drawable. Users
+ of dixLookupWindow don't care about this, just that it's not
+ a valid Window.
+
+ This is a generalised version of the fix for X.Org Bug 23562,
+ where GetProperty was incorrectly returning BadMatch. Auditing other
+ window requests, all that I checked would incorrectly return BadMatch
+ in these circumstances. An incomplete list of calls that could
+ incorrectly return BadMatch is: ListProperties, SetSelectionOwner,
+ {Destroy,Map,Unmap}{,Sub}Window.
+
+ None of the callers of dixLookupWindow, except for GetProperty, check
+ for BadMatch
+
+ Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
+ Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+diff --git a/dix/dixutils.c b/dix/dixutils.c
+index 2b5391f..da26dc1 100644
+--- a/dix/dixutils.c
++++ b/dix/dixutils.c
+@@ -224,7 +224,15 @@ dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access)
+ {
+ int rc;
+ rc = dixLookupDrawable((DrawablePtr*)pWin, id, client, M_WINDOW, access);
+- return (rc == BadDrawable) ? BadWindow : rc;
++ /* dixLookupDrawable returns BadMatch iff id is a valid Drawable
++ but is not a Window. Users of dixLookupWindow expect a BadWindow
++ error in this case; they don't care that it's a valid non-Window XID */
++ if (rc == BadMatch)
++ rc = BadWindow;
++ /* Similarly, users of dixLookupWindow don't want BadDrawable. */
++ if (rc == BadDrawable)
++ rc = BadWindow;
++ return rc;
+ }
+
+ int
diff --git a/debian/patches/series b/debian/patches/series
index 50da304..c481ca5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -31,3 +31,4 @@
221_pointer_motion_update_fix.patch
222_touch_valuators_absolute.patch
223_indirect_touch_x_y_valuators.patch
+224_return_BadWindow_not_BadMatch.diff
Reply to: