]> git.pld-linux.org Git - packages/xorg-xserver-server.git/commitdiff
- from fc
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 26 Mar 2009 21:12:27 +0000 (21:12 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    xorg-xserver-server-less-acpi-brokenness.patch -> 1.1
    xorg-xserver-server-preferred-thinko.patch -> 1.1
    xorg-xserver-server-xatom-float.patch -> 1.1
    xorg-xserver-server-xinerama-cursors.patch -> 1.1
    xorg-xserver-server-xiproptoint.patch -> 1.1
    xorg-xserver-server-xtest-pointerscreen.patch -> 1.1

xorg-xserver-server-less-acpi-brokenness.patch [new file with mode: 0644]
xorg-xserver-server-preferred-thinko.patch [new file with mode: 0644]
xorg-xserver-server-xatom-float.patch [new file with mode: 0644]
xorg-xserver-server-xinerama-cursors.patch [new file with mode: 0644]
xorg-xserver-server-xiproptoint.patch [new file with mode: 0644]
xorg-xserver-server-xtest-pointerscreen.patch [new file with mode: 0644]

diff --git a/xorg-xserver-server-less-acpi-brokenness.patch b/xorg-xserver-server-less-acpi-brokenness.patch
new file mode 100644 (file)
index 0000000..cc80e6c
--- /dev/null
@@ -0,0 +1,31 @@
+From a8079882f1884edc62a9de28af915bd8b65dfbbe Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 11 Mar 2009 14:02:11 -0400
+Subject: [PATCH] Don't build the ACPI code.
+
+No good can come of this.
+---
+ configure.ac |    2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 72ae67e..04716f8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1269,13 +1269,11 @@ if test "x$XORG" = xyes; then
+               case $host_cpu in
+                 ia64*)
+                       linux_ia64=yes
+-                      linux_acpi="yes"
+                       ;;
+                 alpha*)
+                       linux_alpha=yes
+                       ;;
+                 i*86|amd64*|x86_64*)
+-                      linux_acpi="yes"
+                       ;;
+                 *)
+                       ;;
+-- 
+1.6.1.3
+
diff --git a/xorg-xserver-server-preferred-thinko.patch b/xorg-xserver-server-preferred-thinko.patch
new file mode 100644 (file)
index 0000000..55c69e0
--- /dev/null
@@ -0,0 +1,28 @@
+From 33c791b421db742e78c74028a5ef5f6604e66c48 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Mon, 2 Mar 2009 13:00:31 -0500
+Subject: [PATCH] Fix output setup when only one head, and it's not the zeroth one.
+
+---
+ hw/xfree86/modes/xf86Crtc.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
+index a8fd099..ad6ca98 100644
+--- a/hw/xfree86/modes/xf86Crtc.c
++++ b/hw/xfree86/modes/xf86Crtc.c
+@@ -2070,9 +2070,9 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
+                    (float)config->output[p]->mm_height;
+       if (aspect)
+-          preferred_match[0] = bestModeForAspect(config, enabled, aspect);
++          preferred_match[p] = bestModeForAspect(config, enabled, aspect);
+-      if (preferred_match[0])
++      if (preferred_match[p])
+           ret = TRUE;
+     } while (0);
+-- 
+1.6.1.3
+
diff --git a/xorg-xserver-server-xatom-float.patch b/xorg-xserver-server-xatom-float.patch
new file mode 100644 (file)
index 0000000..996f195
--- /dev/null
@@ -0,0 +1,123 @@
+From a48c81dcdf569a3f634ac23e08d2491354de6a36 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri, 5 Dec 2008 16:24:57 +1000
+Subject: [PATCH] Xi: add XATOM_FLOAT to server-defined properties.
+
+This property is used to denote type float for input properties. Such
+properties can be accessed easily through the XIPropToFloat() function.
+
+Code originally written by Simon Thum.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
+---
+ Xi/xiproperty.c              |   55 +++++++++++++++++++++++++++++++++++++++++-
+ include/exevents.h           |    6 ++++
+ include/xserver-properties.h |    4 +++
+ 3 files changed, 64 insertions(+), 1 deletions(-)
+
+diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
+index cd9805a..6da8424 100644
+--- a/Xi/xiproperty.c
++++ b/Xi/xiproperty.c
+@@ -49,7 +49,8 @@ static struct dev_properties
+     Atom type;
+     char *name;
+ } dev_properties[] = {
+-    {0, XI_PROP_ENABLED}
++    {0, XI_PROP_ENABLED},
++    {0, XATOM_FLOAT}
+ };
+ static long XIPropHandlerID = 1;
+@@ -137,6 +138,58 @@ XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return)
+     return Success;
+ }
++/**
++ * Convert the given property's value(s) into @nelem_return float values and
++ * store them in @buf_return. If @nelem_return is larger than the number of
++ * values in the property, @nelem_return is set to the number of values in the
++ * property.
++ *
++ * If *@buf_return is NULL and @nelem_return is 0, memory is allocated
++ * automatically and must be freed by the caller.
++ *
++ * Possible errors returned:
++ * Success
++ * BadMatch ... Wrong atom type, atom is not XA_FLOAT
++ * BadValue ... Wrong format, format is not 32
++ * BadAlloc ... NULL passed as buffer and allocation failed.
++ * BadLength ... @buff is NULL but @nelem_return is non-zero.
++ *
++ * @param val The property value
++ * @param nelem_return The maximum number of elements to return.
++ * @param buf_return Pointer to an array of at least @nelem_return values.
++ * @return Success or the error code if an error occured.
++ */
++_X_EXPORT int
++XIPropToFloat(XIPropertyValuePtr val, int *nelem_return, float **buf_return)
++{
++    int i;
++    float *buf;
++
++    if (!val->type || val->type != XIGetKnownProperty(XATOM_FLOAT))
++        return BadMatch;
++
++    if (val->format != 32)
++        return BadValue;
++    if (!*buf_return && *nelem_return)
++        return BadLength;
++
++    buf = *buf_return;
++
++    if (!buf && !(*nelem_return))
++    {
++        buf = xcalloc(val->size, sizeof(float));
++        if (!buf)
++            return BadAlloc;
++        *buf_return = buf;
++        *nelem_return = val->size;
++    } else if (val->size < *nelem_return)
++        *nelem_return = val->size;
++
++    for (i = 0; i < val->size && i < *nelem_return; i++)
++           buf[i] = ((float*)val->data)[i];
++
++    return Success;
++}
+ /**
+  * Init those properties that are allocated by the server and most likely used
+diff --git a/include/exevents.h b/include/exevents.h
+index 485347b..2504baf 100644
+--- a/include/exevents.h
++++ b/include/exevents.h
+@@ -257,4 +257,10 @@ extern _X_EXPORT int XIPropToInt(
+         int **buf_return
+ );
++extern _X_EXPORT int XIPropToFloat(
++        XIPropertyValuePtr val,
++        int *nelem_return,
++        float **buf_return
++);
++
+ #endif /* EXEVENTS_H */
+diff --git a/include/xserver-properties.h b/include/xserver-properties.h
+index 4d602b5..f8aeab6 100644
+--- a/include/xserver-properties.h
++++ b/include/xserver-properties.h
+@@ -26,6 +26,10 @@
+ #ifndef _XSERVER_PROPERTIES_H_
+ #define _XSERVER_PROPERTIES_H_
++/* Type for a 4 byte float. Storage format IEEE 754 in client's default
++ * byte-ordering. */
++#define XATOM_FLOAT "FLOAT"
++
+ /* BOOL. 0 - device disabled, 1 - device enabled */
+ #define XI_PROP_ENABLED      "Device Enabled"
+-- 
+1.6.0.6
+
diff --git a/xorg-xserver-server-xinerama-cursors.patch b/xorg-xserver-server-xinerama-cursors.patch
new file mode 100644 (file)
index 0000000..f410e11
--- /dev/null
@@ -0,0 +1,108 @@
+From 69e53f2493c142ef5569af01ce52565be5b2976e Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Tue, 3 Mar 2009 10:58:33 -0500
+Subject: [PATCH] Primary video device hack
+
+---
+ hw/xfree86/common/xf86pciBus.c |   60 ++++++++++++++++++++++++++++++++--------
+ 1 files changed, 48 insertions(+), 12 deletions(-)
+
+diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
+index 467a0c3..0d2d01c 100644
+--- a/hw/xfree86/common/xf86pciBus.c
++++ b/hw/xfree86/common/xf86pciBus.c
+@@ -60,11 +60,7 @@ static struct pci_device ** xf86PciVideoInfo = NULL;        /* PCI probe for video hw *
+ /* PCI classes that get included in xf86PciVideoInfo */
+ #define PCIINFOCLASSES(c) \
+     ( (((c) & 0x00ff0000) == (PCI_CLASS_PREHISTORIC << 16)) \
+-      || (((c) & 0x00ff0000) == (PCI_CLASS_DISPLAY << 16)) \
+-      || ((((c) & 0x00ffff00) \
+-         == ((PCI_CLASS_MULTIMEDIA << 16) | (PCI_SUBCLASS_MULTIMEDIA_VIDEO << 8)))) \
+-      || ((((c) & 0x00ffff00) \
+-         == ((PCI_CLASS_PROCESSOR << 16) | (PCI_SUBCLASS_PROCESSOR_COPROC << 8)))) )
++      || (((c) & 0x00ffff00) == (PCI_CLASS_DISPLAY << 16)) )
+ /*
+  * PCI classes that have messages printed always.  The others are only
+@@ -341,6 +337,39 @@ restorePciBusState(BusAccPtr ptr)
+ }
+ #undef MASKBITS
++/* oh god what have i done */
++static Bool
++looks_like_bios_primary(struct pci_device *info)
++{
++    unsigned char *bios;
++    unsigned short vendor, device;
++    int offset;
++    Bool ret = FALSE;
++
++    bios = xf86MapVidMem(-1, VIDMEM_MMIO, 0xc0000, 0x10000);
++    if (!bios)
++        return FALSE;
++
++    if (bios[0] != 0x55 || bios[1] != 0xAA)
++        goto out;
++
++    offset = (bios[0x19] << 8) + bios[0x18];
++
++    if (bios[offset] != 'P' ||
++        bios[offset+1] != 'C' ||
++        bios[offset+2] != 'I' ||
++        bios[offset+3] != 'R')
++        goto out;
++
++    vendor = (bios[offset+5] << 8) + bios[offset+4];
++    device = (bios[offset+7] << 8) + bios[offset+6];
++
++    ret = (info->vendor_id == vendor) && (info->device_id == device);
++
++out:
++    xf86UnMapVidMem(-1, bios, 0x10000);
++    return ret;
++}
+ /*
+  * xf86Bus.c interface
+@@ -375,24 +404,31 @@ xf86PciProbe(void)
+       }
+     }
+-
+     /* If we haven't found a primary device try a different heuristic */
+     if (primaryBus.type == BUS_NONE && num) {
+       for (i = 0; i < num; i++) {
+           uint16_t  command;
+           info = xf86PciVideoInfo[i];
++            if (!IS_VGA(info->device_class))
++                continue;
++
+           pci_device_cfg_read_u16(info, & command, 4);
+-          if ((command & PCI_CMD_MEM_ENABLE) 
+-              && ((num == 1) || IS_VGA(info->device_class))) {
+-              if (primaryBus.type == BUS_NONE) {
++          if ((command & PCI_CMD_MEM_ENABLE)) {
++                if (num == 1) {
+                   primaryBus.type = BUS_PCI;
+                   primaryBus.id.pci = info;
+-              } else {
+-                  xf86Msg(X_NOTICE,
++                    break;
++                } else if (looks_like_bios_primary(info)) {
++                    if (primaryBus.type == BUS_NONE) {
++                        primaryBus.type = BUS_PCI;
++                        primaryBus.id.pci = info;
++                    } else {
++                      xf86Msg(X_NOTICE,
+                           "More than one possible primary device found\n");
+-                  primaryBus.type ^= (BusType)(-1);
++                      primaryBus.type ^= (BusType)(-1);
++                    }
+               }
+           }
+       }
+-- 
+1.6.1.3
+
diff --git a/xorg-xserver-server-xiproptoint.patch b/xorg-xserver-server-xiproptoint.patch
new file mode 100644 (file)
index 0000000..c2c7672
--- /dev/null
@@ -0,0 +1,120 @@
+From 669f6810af9a89187d6149841925fe765f3988ff Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@redhat.com>
+Date: Wed, 19 Nov 2008 15:50:57 +1000
+Subject: [PATCH] Xi: add XIPropToInt() auxiliary function.
+
+Converts an XIPropertyValuePtr to an integer, provided that type and format is
+right.
+
+Code originally written by Simon Thum.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
+---
+ Xi/xiproperty.c    |   68 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ include/exevents.h |    6 ++++
+ 2 files changed, 74 insertions(+), 0 deletions(-)
+
+diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
+index e79a2ed..cd9805a 100644
+--- a/Xi/xiproperty.c
++++ b/Xi/xiproperty.c
+@@ -32,6 +32,7 @@
+ #include "dix.h"
+ #include "inputstr.h"
+ #include <X11/extensions/XI.h>
++#include <X11/Xatom.h>
+ #include <X11/extensions/XIproto.h>
+ #include "exglobals.h"
+ #include "exevents.h"
+@@ -71,6 +72,73 @@ XIGetKnownProperty(char *name)
+ }
+ /**
++ * Convert the given property's value(s) into @nelem_return integer values and
++ * store them in @buf_return. If @nelem_return is larger than the number of
++ * values in the property, @nelem_return is set to the number of values in the
++ * property.
++ *
++ * If *@buf_return is NULL and @nelem_return is 0, memory is allocated
++ * automatically and must be freed by the caller.
++ *
++ * Possible return codes.
++ * Success ... No error.
++ * BadMatch ... Wrong atom type, atom is not XA_INTEGER
++ * BadAlloc ... NULL passed as buffer and allocation failed.
++ * BadLength ... @buff is NULL but @nelem_return is non-zero.
++ *
++ * @param val The property value
++ * @param nelem_return The maximum number of elements to return.
++ * @param buf_return Pointer to an array of at least @nelem_return values.
++ * @return Success or the error code if an error occured.
++ */
++_X_EXPORT int
++XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return)
++{
++    int i;
++    int *buf;
++
++    if (val->type != XA_INTEGER)
++        return BadMatch;
++    if (!*buf_return && *nelem_return)
++        return BadLength;
++
++    switch(val->format)
++    {
++        case 8:
++        case 16:
++        case 32:
++            break;
++        default:
++            return BadValue;
++    }
++
++    buf = *buf_return;
++
++    if (!buf && !(*nelem_return))
++    {
++        buf = xcalloc(val->size, sizeof(int));
++        if (!buf)
++            return BadAlloc;
++        *buf_return = buf;
++        *nelem_return = val->size;
++    } else if (val->size < *nelem_return)
++        *nelem_return = val->size;
++
++    for (i = 0; i < val->size && i < *nelem_return; i++)
++    {
++        switch(val->format)
++        {
++            case 8:  buf[i] = ((CARD8*)val->data)[i]; break;
++            case 16: buf[i] = ((CARD16*)val->data)[i]; break;
++            case 32: buf[i] = ((CARD32*)val->data)[i]; break;
++        }
++    }
++
++    return Success;
++}
++
++
++/**
+  * Init those properties that are allocated by the server and most likely used
+  * by the DIX or the DDX.
+  */
+diff --git a/include/exevents.h b/include/exevents.h
+index 2a7ec97..485347b 100644
+--- a/include/exevents.h
++++ b/include/exevents.h
+@@ -251,4 +251,10 @@ extern _X_EXPORT Atom XIGetKnownProperty(
+ extern DeviceIntPtr XIGetDevice(xEvent *ev);
++extern _X_EXPORT int XIPropToInt(
++        XIPropertyValuePtr val,
++        int *nelem_return,
++        int **buf_return
++);
++
+ #endif /* EXEVENTS_H */
+-- 
+1.6.0.6
+
diff --git a/xorg-xserver-server-xtest-pointerscreen.patch b/xorg-xserver-server-xtest-pointerscreen.patch
new file mode 100644 (file)
index 0000000..286edd1
--- /dev/null
@@ -0,0 +1,73 @@
+From c3e5af42be915b27056644c2df6a4ce30b4ab5f3 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 25 Mar 2009 15:51:43 +1000
+Subject: [PATCH] Xext: set POINTER_SCREEN flag in XTestFakeInput if necessary. (RH #490984)
+
+The POINTER_SCREEN flag must be set explicitly for XTest core events to avoid
+out-of-range events when the lastSlave was an SD with an explicit axis range.
+Device events sent through XTest don't need this flag, they are expected to be
+in the valuator range of the device anyway.
+
+Red Hat Bug 490984 <https://bugzilla.redhat.com/show_bug.cgi?id=490984>
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+ Xext/xtest.c |   14 +++++++++++---
+ 1 files changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/Xext/xtest.c b/Xext/xtest.c
+index a7f3830..3ff02ed 100644
+--- a/Xext/xtest.c
++++ b/Xext/xtest.c
+@@ -161,6 +161,7 @@ ProcXTestFakeInput(client)
+     int nevents;
+     int i;
+     int base = 0;
++    int flags = 0;
+     nev = (stuff->length << 2) - sizeof(xReq);
+     if ((nev % sizeof(xEvent)) || !nev)
+@@ -211,8 +212,14 @@ ProcXTestFakeInput(client)
+                 client->errorValue = ev->u.u.type;
+                 return BadValue;
+             }
++
++            if (ev->u.u.detail == xFalse)
++                flags |= POINTER_ABSOLUTE;
+         } else
++        {
+             firstValuator = 0;
++            flags |= POINTER_ABSOLUTE;
++        }
+         if (nev == 1 && type == XI_DeviceMotionNotify && !dev->valuator)
+         {
+@@ -281,6 +288,8 @@ ProcXTestFakeInput(client)
+                 valuators[1] = ev->u.keyButtonPointer.rootY;
+                 numValuators = 2;
+                 firstValuator = 0;
++                if (ev->u.u.detail == xFalse)
++                    flags = POINTER_ABSOLUTE | POINTER_SCREEN;
+                 break;
+             default:
+                 client->errorValue = ev->u.u.type;
+@@ -378,14 +387,13 @@ ProcXTestFakeInput(client)
+     GetEventList(&events);
+     switch(type) {
+         case MotionNotify:
+-            nevents = GetPointerEvents(events, dev, type, 0,
+-                            (ev->u.u.detail == xFalse) ?  POINTER_ABSOLUTE : 0,
++            nevents = GetPointerEvents(events, dev, type, 0, flags,
+                             firstValuator, numValuators, valuators);
+             break;
+         case ButtonPress:
+         case ButtonRelease:
+             nevents = GetPointerEvents(events, dev, type, ev->u.u.detail,
+-                                       POINTER_ABSOLUTE, firstValuator,
++                                       flags, firstValuator,
+                                        numValuators, valuators);
+             break;
+         case KeyPress:
+-- 
+1.6.0.6
+
This page took 0.339229 seconds and 4 git commands to generate.