xorg-server: Changes to 'ubuntu'
debian/changelog | 15
debian/patches/206_intel_8xx_default_to_fbdev.patch | 22 -
debian/patches/220_xi21_always_deliver_raw_events.diff | 283 +++++++++++++++++
debian/patches/series | 2
4 files changed, 299 insertions(+), 23 deletions(-)
New commits:
commit a2a8c464fd8e4eea606aa77f76e8d42e9076ccba
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Mon Aug 1 16:28:43 2011 +1000
Re-enable i8xx cards. Here's hopin'!
diff --git a/debian/changelog b/debian/changelog
index d3e3737..bd96e13 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xorg-server (2:1.10.2.902-1ubuntu4) UNRELEASED; urgency=low
+
+ * Drop i8xx-disablement patch. 2.6.39 and later kernels contain a patch
+ which alledgedly fixes the cache-incoherency problems. (LP: #817814)
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com> Mon, 01 Aug 2011 16:27:52 +1000
+
xorg-server (2:1.10.2.902-1ubuntu3) oneiric; urgency=low
* debian/patches/220_xi21_always_deliver_raw_events.diff:
diff --git a/debian/patches/206_intel_8xx_default_to_fbdev.patch b/debian/patches/206_intel_8xx_default_to_fbdev.patch
deleted file mode 100644
index 1de14eb..0000000
--- a/debian/patches/206_intel_8xx_default_to_fbdev.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Description: Drop intel from the autoloaded drivers for i830, i845g, i855
- .
- These remain too unstable with the intel DDX.
-Author: Christopher James Halse Rogers <christohper.halse.rogers@canonical.com>
-
-Index: xorg-server/hw/xfree86/common/xf86pciBus.c
-===================================================================
---- xorg-server.orig/hw/xfree86/common/xf86pciBus.c 2011-04-09 10:38:10.000000000 +0300
-+++ xorg-server/hw/xfree86/common/xf86pciBus.c 2011-04-09 10:38:10.000000000 +0300
-@@ -1120,6 +1120,12 @@
- driverList[0] = "i740";
- } else if (dev->device_id == 0x8108) {
- break; /* "hooray" for poulsbo */
-+ } else if (dev->device_id == 0x3577) {
-+ break; /* Let i830 fall back to fbdev / vesa */
-+ } else if (dev->device_id == 0x2562) {
-+ break; /* Let i845g fall back to fbdev / vesa */
-+ } else if (dev->device_id == 0x3582) {
-+ break; /* Let i855 fall back to fbdev / vesa */
- } else {
- driverList[0] = "intel";
- }
diff --git a/debian/patches/series b/debian/patches/series
index 6cefaf2..cbe2d9e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -24,7 +24,6 @@
198_nohwaccess.patch
200_randr-null.patch
#201_report-real-dpi.patch
-206_intel_8xx_default_to_fbdev.patch
208_switch_on_release.diff
209_add_legacy_bgnone_option.patch
210_pixman_null_ptr_check.patch
commit ec329a5d2bf0f43fb0d81119a6d88ffe5f461f68
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Mon Jul 11 10:09:23 2011 +1000
Changelog entry for 220_xi21_always_deliver_raw_events, release to oneiric
diff --git a/debian/changelog b/debian/changelog
index 04d3087..d3e3737 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+xorg-server (2:1.10.2.902-1ubuntu3) oneiric; urgency=low
+
+ * debian/patches/220_xi21_always_deliver_raw_events.diff:
+ - Backport patch from the mailing list to deliver raw events regardless of
+ grab state. Bon appétit, DX!
+
+ -- Christopher James Halse Rogers <raof@ubuntu.com> Mon, 11 Jul 2011 10:03:26 +1000
+
xorg-server (2:1.10.2.902-1ubuntu2) oneiric; urgency=low
[ Bryce Harrington ]
commit e447c57fe4ab9d623d8e5613ffae3c8597df8689
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Fri Jul 8 18:36:30 2011 +1000
Backport XI2.1 patch to send raw events regardless of grab state
diff --git a/debian/patches/220_xi21_always_deliver_raw_events.diff b/debian/patches/220_xi21_always_deliver_raw_events.diff
new file mode 100644
index 0000000..18db033
--- /dev/null
+++ b/debian/patches/220_xi21_always_deliver_raw_events.diff
@@ -0,0 +1,283 @@
+Index: xorg-server/Xi/exevents.c
+===================================================================
+--- xorg-server.orig/Xi/exevents.c 2011-07-08 16:44:23.151303095 +1000
++++ xorg-server/Xi/exevents.c 2011-07-08 17:32:33.257674174 +1000
+@@ -896,32 +896,6 @@
+ return DEFAULT;
+ }
+
+-static void
+-ProcessRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
+-{
+- GrabPtr grab = device->deviceGrab.grab;
+-
+- if (grab)
+- DeliverGrabbedEvent((InternalEvent*)ev, device, FALSE);
+- else { /* deliver to all root windows */
+- xEvent *xi;
+- int i;
+-
+- i = EventToXI2((InternalEvent*)ev, (xEvent**)&xi);
+- if (i != Success)
+- {
+- ErrorF("[Xi] %s: XI2 conversion failed in ProcessRawEvent (%d)\n",
+- device->name, i);
+- return;
+- }
+-
+- for (i = 0; i < screenInfo.numScreens; i++)
+- DeliverEventsToWindow(device, screenInfo.screens[i]->root, xi, 1,
+- GetEventFilter(device, xi), NULL);
+- free(xi);
+- }
+-}
+-
+ /**
+ * Main device event processing function.
+ * Called from when processing the events from the event queue.
+@@ -949,7 +923,7 @@
+ ev->any.type == ET_RawButtonRelease ||
+ ev->any.type == ET_RawMotion)
+ {
+- ProcessRawEvent(&ev->raw_event, device);
++ DeliverRawEvent(&ev->raw_event, device);
+ return;
+ }
+
+Index: xorg-server/dix/events.c
+===================================================================
+--- xorg-server.orig/dix/events.c 2011-07-08 16:44:49.542287820 +1000
++++ xorg-server/dix/events.c 2011-07-08 17:33:38.190077010 +1000
+@@ -2105,6 +2105,216 @@
+ return nondeliveries;
+ }
+
++/* @return the core event type or 0 if the event is not a core event */
++static inline int
++core_get_type(const xEvent *event)
++{
++ int type = event->u.u.type;
++
++ return ((type & EXTENSION_EVENT_BASE) || type == GenericEvent) ? 0 : type;
++}
++
++/* @return the XI2 event type or 0 if the event is not a XI2 event */
++static inline int
++xi2_get_type(const xEvent *event)
++{
++ xGenericEvent* e = (xGenericEvent*)event;
++
++ return (e->type != GenericEvent || e->extension != IReqCode) ? 0 : e->evtype;
++}
++
++enum EventDeliveryState {
++ EVENT_DELIVERED, /**< Event has been delivered to a client */
++ EVENT_NOT_DELIVERED, /**< Event was not delivered to any client */
++ EVENT_SKIP, /**< Event can be discarded by the caller */
++ EVENT_REJECTED, /**< Event was rejected for delivery to the client */
++};
++
++/**
++ * Compare the two version numbers comprising of major.minor.
++ *
++ * @return A value less than 0 if a is less than b, 0 if a is equal to b,
++ * or a value greater than 0
++ */
++static inline int
++version_compare(uint16_t a_major, uint16_t a_minor,
++ uint16_t b_major, uint16_t b_minor)
++{
++ int a, b;
++
++ a = a_major << 16 | a_minor;
++ b = b_major << 16 | b_minor;
++
++ return (a - b);
++}
++
++/**
++ * Try delivery on each client in inputclients, provided the event mask
++ * accepts it and there is no interfering core grab..
++ */
++static enum EventDeliveryState
++DeliverEventToInputClients(DeviceIntPtr dev, InputClients *inputclients,
++ WindowPtr win, xEvent *events,
++ int count, Mask filter, GrabPtr grab,
++ ClientPtr *client_return, Mask *mask_return)
++{
++ int attempt;
++ enum EventDeliveryState rc = EVENT_NOT_DELIVERED;
++
++ for (; inputclients; inputclients = inputclients->next)
++ {
++ Mask mask;
++ ClientPtr client = rClient(inputclients);
++
++ if (IsInterferingGrab(client, dev, events))
++ continue;
++
++ mask = GetEventMask(dev, events, inputclients);
++
++ if (XaceHook(XACE_RECEIVE_ACCESS, client, win,
++ events, count))
++ /* do nothing */;
++ else if ( (attempt = TryClientEvents(client, dev,
++ events, count,
++ mask, filter, grab)) )
++ {
++ if (attempt > 0)
++ {
++ rc = EVENT_DELIVERED;
++ *client_return = client;
++ *mask_return = mask;
++ /* Success overrides non-success, so if we've been
++ * successful on one client, return that */
++ } else if (rc == EVENT_NOT_DELIVERED)
++ rc = EVENT_REJECTED;
++ }
++ }
++
++ return rc;
++}
++
++/**
++ * Get the list of clients that should be tried for event delivery on the
++ * given window.
++ *
++ * @return 1 if the client list should be traversed, zero if the event
++ * should be skipped.
++ */
++static Bool
++GetClientsForDelivery(DeviceIntPtr dev, WindowPtr win,
++ xEvent *events, Mask filter, InputClients **clients)
++{
++ int rc = 0;
++
++ if (core_get_type(events) != 0)
++ *clients = (InputClients *)wOtherClients(win);
++ else if (xi2_get_type(events) != 0)
++ {
++ OtherInputMasks *inputMasks = wOtherInputMasks(win);
++ /* Has any client selected for the event? */
++ if (!GetWindowXI2Mask(dev, win, events))
++ goto out;
++ *clients = inputMasks->inputClients;
++ } else {
++ OtherInputMasks *inputMasks = wOtherInputMasks(win);
++ /* Has any client selected for the event? */
++ if (!inputMasks ||
++ !(inputMasks->inputEvents[dev->id] & filter))
++ goto out;
++
++ *clients = inputMasks->inputClients;
++ }
++
++ rc = 1;
++out:
++ return rc;
++}
++
++/**
++ * Filter out raw events for XI 2.0 and XI 2.1 clients.
++ *
++ * If there is a grab on the device, 2.0 clients only get raw events if they
++ * have the grab. 2.1+ clients get raw events in all cases.
++ *
++ * @return TRUE if the event should be discarded, FALSE otherwise.
++ */
++static BOOL
++FilterRawEvents(const ClientPtr client, const GrabPtr grab)
++{
++ XIClientPtr client_xi_version;
++ int cmp;
++
++ /* device not grabbed -> don't filter */
++ if (!grab)
++ return FALSE;
++
++ client_xi_version = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey);
++
++ cmp = version_compare(client_xi_version->major_version,
++ client_xi_version->minor_version, 2, 0);
++ /* XI 2.0: if device is grabbed, skip
++ XI 2.1: if device is grabbed by us, skip, we've already delivered */
++ return (cmp == 0) ? TRUE : SameClient(grab, client);
++}
++
++/**
++ * Deliver a raw event to the grab owner (if any) and to all root windows.
++ *
++ * Raw event delivery differs between XI 2.0 and XI 2.1.
++ * XI 2.0: events delivered to the grabbing client (if any) OR to all root
++ * windows
++ * XI 2.1: events delivered to all root windows, regardless of grabbing
++ * state.
++ */
++void
++DeliverRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
++{
++ GrabPtr grab = device->deviceGrab.grab;
++ xEvent *xi;
++ int i;
++ int filter;
++
++ i = EventToXI2((InternalEvent*)ev, (xEvent**)&xi);
++ if (i != Success)
++ {
++ ErrorF("[Xi] %s: XI2 conversion failed in %s (%d)\n",
++ __func__, device->name, i);
++ return;
++ }
++
++ if (grab)
++ DeliverGrabbedEvent((InternalEvent*)ev, device, FALSE);
++
++ filter = GetEventFilter(device, xi);
++
++ for (i = 0; i < screenInfo.numScreens; i++)
++ {
++ WindowPtr root;
++ InputClients *inputclients;
++
++ root = screenInfo.screens[i]->root;
++ if (!GetClientsForDelivery(device, root, xi, filter, &inputclients))
++ continue;
++
++ for (; inputclients; inputclients = inputclients->next)
++ {
++ ClientPtr c; /* unused */
++ Mask m; /* unused */
++ InputClients ic = *inputclients;
++
++ /* Because we run through the list manually, terminate the list
++ * after our current client */
++ ic.next = NULL;
++
++ if (!FilterRawEvents(rClient(&ic), grab))
++ DeliverEventToInputClients(device, &ic, root, xi, 1,
++ filter, NULL, &c, &m);
++ }
++ }
++
++ free(xi);
++}
++
+ /* If the event goes to dontClient, don't send it and return 0. if
+ send works, return 1 or if send didn't work, return 2.
+ Only works for core events.
+Index: xorg-server/include/dix.h
+===================================================================
+--- xorg-server.orig/include/dix.h 2011-07-08 16:44:49.542287820 +1000
++++ xorg-server/include/dix.h 2011-07-08 17:32:32.887660484 +1000
+@@ -387,6 +387,11 @@
+ Mask /* filter */,
+ GrabPtr /* grab */);
+
++extern _X_EXPORT void DeliverRawEvent(
++ RawDeviceEvent* /* ev */,
++ DeviceIntPtr /* dev */
++);
++
+ extern int DeliverDeviceEvents(
+ WindowPtr /* pWin */,
+ InternalEvent* /* event */,
diff --git a/debian/patches/series b/debian/patches/series
index 6661354..6cefaf2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -31,6 +31,7 @@
214_glx_dri_searchdirs.patch
217_revert_bgnonevisitwindow.patch
219_fedora-pointer-barriers.diff
+220_xi21_always_deliver_raw_events.diff
500_xi2.1.patch
501_xf86CoordinatesToWindow.patch
502_gestures-extension.patch
Reply to: