[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] ui/gtk: Support versions of gtk+-2.0 before
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] ui/gtk: Support versions of gtk+-2.0 before 2.90.7 |
Date: |
Fri, 22 Feb 2013 21:14:24 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 |
Am 22.02.2013 21:00, schrieb Anthony Liguori:
> Stefan Weil <address@hidden> writes:
>
>> This is needed for current Debian stable (Squeeze).
>>
>> Extract from NEWS in gtk+-2.0:
>>
>> Overview of Changes from GTK+ 2.90.6 to 2.90.7
>> ==============================================
>>
>> * All GDK keysym names have been changed from GDK_keysym to GDK_KEY_keysym;
>> the previous names are still available in gdkkeysyms-compat.h.
> Looks like this happened in 2.22 as best as I can tell.
>
> What I would suggest doing is:
>
> #ifndef GDK_KEY_f
> #define GDK_KEY_f GDK_f
> #define GDK_KEY_g GDK_g
> ...
> #endif
>
> Regards,
>
> Anthony Liguori
That would work, too.
Nevertheless the current patch is also fine, because it
matches the information in GTK's NEWS files:the change
was from GTK+ 2.90.6 to 2.90.7.
This was the GTK+ commit:
commit 913cdf3be750a1e74c09b20edf55a57f9a919fcc
Author: Colin Walters <address@hidden>
Date: Wed Sep 8 13:35:51 2010 -0400
GDK: Prefix key names with KEY_
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.
For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.
Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
Regards,
Stefan Weil