On Nov 3, 2008, at 22:08, Peter Hutterer wrote:
...
righty-o. hunk 2 is different, with the change you suggested. To makethe flow cleaner, I moved all the EQ and memory alloc stuff together and thecopies into local variables below it.
Almost... you need to move the pop down 4 lines. ie this:
<bad>
miEventQueue.head = (miEventQueue.head + 1) % QUEUE_SIZE;
+ dev = e->pDev;
+ master = (!dev->isMaster && dev->u.master) ? dev->u.master :
NULL;
+ type = e->events->event->u.u.type; + screen = e->pScreen; + </bad> should be this: <good> + dev = e->pDev;+ master = (!dev->isMaster && dev->u.master) ? dev->u.master : NULL;
+ type = e->events->event->u.u.type;
+ screen = e->pScreen;
+
miEventQueue.head = (miEventQueue.head + 1) % QUEUE_SIZE;
</good>
After you increment miEventQueue.head, you can't read from e. ... so
you could also do this if you wanted to be anal about popping quickly:
<good>
+ dev = e->pDev;
+ screen = e->pScreen;
+
miEventQueue.head = (miEventQueue.head + 1) % QUEUE_SIZE;
+ type = event->u.u.type;
+ master = (!dev->isMaster && dev->u.master) ? dev->u.master :
NULL;
</good> --Jeremy
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
