[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: Re: xserver: Branch 'master' - 3 commits
From: Jeremy Huddleston <jeremyhu () apple ! com>
Date: 2012-01-31 18:06:19
Message-ID: 344F5C8C-B612-4198-9935-C59E69D6F0D2 () apple ! com
[Download RAW message or body]
On Jan 31, 2012, at 1:14 AM, Daniel Stone wrote:
> Hi,
>
> On 31 January 2012 04:56, Keith Packard <keithp@kemper.freedesktop.org> wrote:
>> + if (pDev->key) {
>> + for (i = 0; i < NUM_KEYCODES; i++) {
>> + if (BitIsOn(pDev->key->down, i + MIN_KEYCODE)) {
>> + QueueKeyboardEvents(pDev, KeyRelease, i + MIN_KEYCODE, NULL);
>> + }
>> + }
>> + }
>
> You should be using key_is_down(pDev, i + MIN_KEYCODE, KEY_POSTED),
> rather than directly poking pDev->key->down. This also eliminates a
> small race where you might fail to release a key because the event has
> been put in the event queue, but not processed.
Ah, I missed that. I should use button_is_down similarly.
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic