[Piglit] [PATCH 2/9] Fix deprecation warnings from XKeycodeToKeysym().

Eric Anholt eric at anholt.net
Sat Feb 22 19:35:52 PST 2014


Daniel Kurtz <djkurtz at chromium.org> writes:

> On Wed, Jan 29, 2014 at 10:52 AM, Eric Anholt <eric at anholt.net> wrote:
>> ---
>>  tests/egl/egl-util.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/egl/egl-util.c b/tests/egl/egl-util.c
>> index 5f4fffe..226ba0e 100644
>> --- a/tests/egl/egl-util.c
>> +++ b/tests/egl/egl-util.c
>> @@ -30,6 +30,7 @@
>>   * \author Kristian Høgsberg <krh at bitplanet.net>
>>   */
>>
>> +#include <X11/XKBlib.h>
>>  #include "piglit-util-gl-common.h"
>>  #include "egl-util.h"
>>
>> @@ -154,8 +155,9 @@ event_loop(struct egl_state *state, const struct egl_test *test)
>>                 }
>>
>>                 if (event.type == KeyPress) {
>> -                       KeySym sym = XKeycodeToKeysym (state->dpy,
>> -                                                      event.xkey.keycode, 0);
>> +                       KeySym sym = XkbKeycodeToKeysym (state->dpy,
>> +                                                        event.xkey.keycode,
>> +                                                        0, 0);
>
> This pulls in an XKB dependency that wasn't there before.
> From this post [0], I think the recommend migration path is to use
> XGetKeyboardMapping:

XkbKeycodeToKeysym is in libX11, not a separate libarry, and it's the
recommended replacement according to the manpage for XKeycodeToKeysym.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140222/627dadd8/attachment.pgp>


More information about the Piglit mailing list