~ubuntu-branches/ubuntu/precise/xorg-server/precise

« back to all changes in this revision

Viewing changes to hw/xfree86/common/xf86Init.c

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen, Christopher James Halse Rogers, Ricardo Salveti de Araujo, Timo Aaltonen, Bryce Harrington, Chase Douglas
  • Date: 2011-09-09 14:13:07 UTC
  • mfrom: (1.1.45 upstream) (0.11.27 sid)
  • Revision ID: package-import@ubuntu.com-20110909141307-7x9s9j3l5kkren6o
Tags: 2:1.10.4-1ubuntu1
[ Christopher James Halse Rogers ]
* Drop i8xx-disablement patch.  2.6.39 and later kernels contain a patch
  which alledgedly fixes the cache-incoherency problems. (LP: #817814)

[ Ricardo Salveti de Araujo ]
* debian/patches/112_armel-pvr-drv.patch:
  - Include support for the pvr driver available on OMAP 4 (LP: #828494)

[ Timo Aaltonen ]
* Merge from Debian unstable.
  - Fixes Xephyr assert failure in dixGetPrivateAddr (LP: #821090)
* debian/rules: Modify the patch stampdir creation.
* Update patch 500_xi2.1.patch to apply.
* Refresh patches.
* debian/rules: Add PATH for the xvfb-run check, otherwise Xvfb is not found.
* debian/rules: Shift the xvfb-run test to be run later, to ensure that the
  binaries are installed.

[ Bryce Harrington ]
* debian/rules: Add check target invoking xvfb-run to test that it works
* debian/control: Add build dependency on xauth, required by xvfb-run

[ Chase Douglas ]
* Add fixes for touch grab handling, courtesy of Carlos Garnacho
  - 505_Xi_ensure_replayed_touch_events_have_devices.patch
  - 506_Xi_ensure_touch_events_update_currentTime.patch
  - 507_dix_Ensure_touch_events_are_delivered_to_next_client.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
791
791
                                 NULL);
792
792
}
793
793
 
 
794
static InputInfoPtr
 
795
duplicateDevice(InputInfoPtr pInfo)
 
796
{
 
797
    InputInfoPtr dup = calloc(1, sizeof(InputInfoRec));
 
798
    if (dup) {
 
799
        dup->name = strdup(pInfo->name);
 
800
        dup->driver = strdup(pInfo->driver);
 
801
        dup->options = xf86OptionListDuplicate(pInfo->options);
 
802
        /* type_name is a const string */
 
803
        dup->type_name = pInfo->type_name;
 
804
        dup->fd = -1;
 
805
    }
 
806
    return dup;
 
807
}
 
808
 
794
809
/*
795
810
 * InitInput --
796
811
 *      Initialize all supported input devices.
799
814
void
800
815
InitInput(int argc, char **argv)
801
816
{
802
 
    InputInfoPtr* pDev;
 
817
    InputInfoPtr* pInfo;
803
818
    DeviceIntPtr dev;
804
819
 
805
820
    xf86Info.vtRequestsPending = FALSE;
809
824
    GetEventList(&xf86Events);
810
825
 
811
826
    /* Initialize all configured input devices */
812
 
    for (pDev = xf86ConfigLayout.inputs; pDev && *pDev; pDev++) {
 
827
    for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) {
 
828
        InputInfoPtr dup;
813
829
        /* Replace obsolete keyboard driver with kbd */
814
 
        if (!xf86NameCmp((*pDev)->driver, "keyboard")) {
815
 
            strcpy((*pDev)->driver, "kbd");
 
830
        if (!xf86NameCmp((*pInfo)->driver, "keyboard")) {
 
831
            strcpy((*pInfo)->driver, "kbd");
816
832
        }
817
833
 
 
834
        /* Data passed into xf86NewInputDevice will be freed on shutdown.
 
835
         * Duplicate from xf86ConfigLayout.inputs, otherwise we don't have any
 
836
         * xorg.conf input devices in the second generation
 
837
         */
 
838
        dup = duplicateDevice(*pInfo);
 
839
 
818
840
        /* If one fails, the others will too */
819
 
        if (xf86NewInputDevice(*pDev, &dev, TRUE) == BadAlloc)
 
841
        if (xf86NewInputDevice(dup, &dev, TRUE) == BadAlloc)
820
842
            break;
821
843
    }
822
844