[xorg-x11-server] Update to 1.15.99.904

Hans de Goede jwrdegoede at fedoraproject.org
Tue Jul 8 11:19:11 UTC 2014


commit ce1052ae896b08e49f59ddeecd4cb516702ea4ec
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Tue Jul 8 13:19:18 2014 +0200

    Update to 1.15.99.904

 ...-crash-in-fbCloseScreen-on-client-disconn.patch |   35 ----
 ...d-Snap-damage-reports-to-the-bounding-box.patch |   10 +-
 ...fix-up-coordinate-scaling-when-external-m.patch |  133 +++++++++++++++
 add-SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS.patch    |  107 ------------
 platform-support-non-pci-platform-devices.patch    |  170 --------------------
 sources                                            |    2 +-
 xorg-x11-server.spec                               |   18 +-
 7 files changed, 151 insertions(+), 324 deletions(-)
---
diff --git a/0001-xwayland-Snap-damage-reports-to-the-bounding-box.patch b/0001-xwayland-Snap-damage-reports-to-the-bounding-box.patch
index df982d4..73e686f 100644
--- a/0001-xwayland-Snap-damage-reports-to-the-bounding-box.patch
+++ b/0001-xwayland-Snap-damage-reports-to-the-bounding-box.patch
@@ -22,7 +22,7 @@ diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
 index b966e50..a4aeecd 100644
 --- a/hw/xwayland/xwayland.c
 +++ b/hw/xwayland/xwayland.c
-@@ -326,25 +326,21 @@ xwl_screen_post_damage(struct xwl_screen *xwl_screen)
+@@ -326,31 +326,27 @@ xwl_screen_post_damage(struct xwl_screen *xwl_screen)
      struct xwl_window *xwl_window;
      RegionPtr region;
      BoxPtr box;
@@ -37,7 +37,13 @@ index b966e50..a4aeecd 100644
 -
          pixmap = (*xwl_screen->screen->GetWindowPixmap) (xwl_window->window);
  
-         buffer = xwl_shm_pixmap_get_wl_buffer(pixmap);
+ #if GLAMOR_HAS_GBM
+         if (xwl_screen->glamor)
+             buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap);
+ #endif
+         if (!xwl_screen->glamor)
+             buffer = xwl_shm_pixmap_get_wl_buffer(pixmap);
+ 
          wl_surface_attach(xwl_window->surface, buffer, 0, 0);
 -        for (i = 0; i < count; i++) {
 -            box = &RegionRects(region)[i];
diff --git a/0002-Revert-dix-fix-up-coordinate-scaling-when-external-m.patch b/0002-Revert-dix-fix-up-coordinate-scaling-when-external-m.patch
new file mode 100644
index 0000000..f33d881
--- /dev/null
+++ b/0002-Revert-dix-fix-up-coordinate-scaling-when-external-m.patch
@@ -0,0 +1,133 @@
+From 5a16e22115ad88bf9abe91c43c203385e2ea41bb Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Tue, 8 Jul 2014 11:10:39 +0200
+Subject: [PATCH 2/2] Revert "dix: fix up coordinate scaling when external
+ monitors are present"
+
+This reverts commit d90b5f83010248be65b2039b0b2d0b9e6a4e93cf.
+---
+ dix/getevents.c | 80 +++++++++++++++------------------------------------------
+ 1 file changed, 20 insertions(+), 60 deletions(-)
+
+diff --git a/dix/getevents.c b/dix/getevents.c
+index d68fa96..ffa89fa 100644
+--- a/dix/getevents.c
++++ b/dix/getevents.c
+@@ -770,65 +770,27 @@ add_to_scroll_valuator(DeviceIntPtr dev, ValuatorMask *mask, int valuator, doubl
+ }
+ 
+ 
+-/* FIXME: relative events from devices with absolute axis ranges is
+-   fundamentally broken. We map the device coordinate range into the screen
+-   range, but don't really account for device resolution in that.
+-
+-   what we do here is a hack to make touchpads usable. for a given relative
+-   motion vector in device coordinates:
+-   1. calculate physical movement on the device in metres
+-   2. calculate pixel vector that is the same physical movement on the
+-      screen (times some magic number to provide sensible base speed)
+-   3. calculate what percentage this vector is of the current screen
+-      width/height
+-   4. calculate equivalent vector in % on the device's min/max axis range
+-   5. Use that device vector as the actual motion vector
+-
+-   e.g. 10/50mm on the device, 10/50mm on the screen are 30/100 pixels,
+-   30/100 pixels are 1/3% of the width, 1/3% of the device is a vector of
+-   20/80 -> use 20/80 as dx/dy.
+-
+-   dx/dy is then applied to the current position in device coordinates,
+-   mapped to screen coordinates and thus the movement on the screen reflects
+-   the motion direction on the device.
+- */
+ static void
+ scale_for_device_resolution(DeviceIntPtr dev, ValuatorMask *mask)
+ {
+-    double x, y;
++    double y;
+     ValuatorClassPtr v = dev->valuator;
+     int xrange = v->axes[0].max_value - v->axes[0].min_value + 1;
+     int yrange = v->axes[1].max_value - v->axes[1].min_value + 1;
+ 
+-    /* Assume 100 units/m for devices without resolution */
+-    int xres = 100000, yres = 100000;
+-
+-    /* If we have multiple screens with different dpi, it gets complicated:
+-       we have to map which screen we're on and then take the dpi of that
+-       screen to be somewhat accurate.  */
+-    const ScreenPtr s = screenInfo.screens[0];
+-    const double screen_res = 1000.0 * s->width/s->mmWidth; /* units/m */
++    double screen_ratio = 1.0 * screenInfo.width/screenInfo.height;
++    double device_ratio = 1.0 * xrange/yrange;
++    double resolution_ratio = 1.0;
++    double ratio;
+ 
+-    /* some magic multiplier, so unaccelerated movement of x mm on the
+-       device reflects x * magic mm on the screen */
+-    const double magic = 4;
++    if (!valuator_mask_fetch_double(mask, 1, &y))
++        return;
+ 
+-    if (v->axes[0].resolution != 0 && v->axes[1].resolution != 0) {
+-        xres = v->axes[0].resolution;
+-        yres = v->axes[1].resolution;
+-    }
++    if (v->axes[0].resolution != 0 && v->axes[1].resolution != 0)
++        resolution_ratio = 1.0 * v->axes[0].resolution/v->axes[1].resolution;
+ 
+-    if (valuator_mask_isset(mask, 0)) {
+-        x = valuator_mask_get_double(mask, 0);
+-        x = magic * x/xres * screen_res/screenInfo.width * xrange;
+-        valuator_mask_set_double(mask, 0, x);
+-    }
+-
+-    if (valuator_mask_isset(mask, 1)) {
+-        y = valuator_mask_get_double(mask, 1);
+-        y = magic * y/yres * screen_res/screenInfo.height * yrange;
+-        valuator_mask_set_double(mask, 1, y);
+-    }
++    ratio = device_ratio/resolution_ratio/screen_ratio;
++    valuator_mask_set_double(mask, 1, y / ratio);
+ }
+ 
+ /**
+@@ -842,6 +804,15 @@ moveRelative(DeviceIntPtr dev, int flags, ValuatorMask *mask)
+ {
+     int i;
+     Bool clip_xy = IsMaster(dev) || !IsFloating(dev);
++    ValuatorClassPtr v = dev->valuator;
++
++    /* for abs devices in relative mode, we've just scaled wrong, since we
++       mapped the device's shape into the screen shape. Undo this. */
++    if ((flags & POINTER_ABSOLUTE) == 0 && v && v->numAxes > 1 &&
++        v->axes[0].min_value < v->axes[0].max_value &&
++        v->axes[1].min_value < v->axes[1].max_value) {
++        scale_for_device_resolution(dev, mask);
++    }
+ 
+     /* calc other axes, clip, drop back into valuators */
+     for (i = 0; i < valuator_mask_size(mask); i++) {
+@@ -1470,21 +1441,10 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
+             set_raw_valuators(raw, &mask, raw->valuators.data);
+     }
+     else {
+-        ValuatorClassPtr v = pDev->valuator;
+-
+         transformRelative(pDev, &mask);
+ 
+-        /* for abs devices in relative mode, we've just scaled wrong, since we
+-           mapped the device's shape into the screen shape. Undo this. */
+-        if (v && v->numAxes > 1 &&
+-            v->axes[0].min_value < v->axes[0].max_value &&
+-            v->axes[1].min_value < v->axes[1].max_value) {
+-            scale_for_device_resolution(pDev, &mask);
+-        }
+-
+         if (flags & POINTER_ACCELERATE)
+             accelPointer(pDev, &mask, ms);
+-
+         if ((flags & POINTER_NORAW) == 0 && raw)
+             set_raw_valuators(raw, &mask, raw->valuators.data);
+ 
+-- 
+2.0.0
+
diff --git a/sources b/sources
index 6657749..b0533b3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f2b746094e708c41bc28cf545624d16b  xorg-server-1.15.99.903.tar.bz2
+6840767d8306921b687d05437a952753  xorg-server-1.15.99.904.tar.bz2
diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec
index 6a21a8e..7e65c8c 100644
--- a/xorg-x11-server.spec
+++ b/xorg-x11-server.spec
@@ -41,8 +41,8 @@
 
 Summary:   X.Org X11 X server
 Name:      xorg-x11-server
-Version:   1.15.99.903
-Release:   5%{?gitdate:.%{gitdate}}%{dist}
+Version:   1.15.99.904
+Release:   1%{?gitdate:.%{gitdate}}%{dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X
@@ -75,8 +75,10 @@ Source31: xserver-sdk-abi-requires.git
 Source40: driver-abi-rebuild.sh
 
 # Submitted upstream
-Patch0001: 0001-fb-Fix-xvfb-crash-in-fbCloseScreen-on-client-disconn.patch
-Patch0002: 0001-headers-Fix-build-errors-with-latest-glibc.patch
+Patch0001: 0001-headers-Fix-build-errors-with-latest-glibc.patch
+
+# Revert of a touchpad motion scaling fix with known issues (rhbz#1104789)
+Patch0002: 0002-Revert-dix-fix-up-coordinate-scaling-when-external-m.patch
 
 # Trivial things to never merge upstream ever:
 # This really could be done prettier.
@@ -100,11 +102,6 @@ Patch9100: exa-only-draw-valid-trapezoids.patch
 # because the display-managers are not ready yet, do not upstream
 Patch10000: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch
 
-# submitted http://lists.x.org/archives/xorg-devel/2014-June/042826.html
-# needed to allow X to start on arm and other devices without video on pci buses
-Patch10100: platform-support-non-pci-platform-devices.patch
-Patch10101: add-SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS.patch
-
 # submitted http://lists.x.org/archives/xorg-devel/2014-July/042936.html
 Patch10200: 0001-xwayland-Snap-damage-reports-to-the-bounding-box.patch
 
@@ -622,6 +619,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
 
 
 %changelog
+* Tue Jul  8 2014 Hans de Goede <hdegoede at redhat.com> - 1.15.99.904-1
+- Update to 1.15.99.904
+
 * Wed Jul  2 2014 Hans de Goede <hdegoede at redhat.com> - 1.15.99.903-5
 - Fix code including glamor.h not compiling due to strndup re-definition
 


More information about the scm-commits mailing list