Comment 21 for bug 780961

Revision history for this message
Bryce Harrington (bryce) wrote : Re: Natty Xorg crashes on Thinkpad X201 (i915 driver) when using keyboard-based window management

The (Ubuntu patched) code in question is:

static void
PlayReleasedEvents(void)
{
    QdEventPtr prev, qe = syncEvents.pending;
    DeviceIntPtr dev;
    DeviceIntPtr pDev;

    prev = NULL;
    while (qe)
    {
        if (!qe->device->deviceGrab.sync.frozen) <== line 1188
        {
            if (syncEvents.pending == qe)
                syncEvents.pending = qe->next;
            pDev = qe->device;
            if (syncEvents.pendtail == qe)
                syncEvents.pendtail = prev;
            if (qe->event->any.type == ET_Motion)
                CheckVirtualMotion(pDev, qe, NullWindow);
            syncEvents.time.months = qe->months;
            syncEvents.time.milliseconds = qe->event->any.time;

Line 1188 is actually unchanged by the Xi2 patches, however much of the surrounding code has changed. I'm gathering that qe->device must be undefined at this point. I'm unsure whether simply checking qe->device as NULL is the right solution.