[ui/gtk,13/13] Add compat for GDK_KEY_XXX symbols

Submitted by Daniel P. Berrange on Feb. 25, 2013, 3:20 p.m.

Details

Message ID 1361805646-6425-14-git-send-email-berrange@redhat.com
State New
Headers show

Commit Message

Daniel P. Berrange Feb. 25, 2013, 3:20 p.m.
From: "Daniel P. Berrange" <berrange@redhat.com>

The GDK_KEY_XXX symbols are new in GTK3 and only the most
recent GTK2 releases. Most versions of GTK2 have simply
used GDK_XXX

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 ui/gtk.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Stefan Weil Feb. 25, 2013, 5:29 p.m.
Am 25.02.2013 16:20, schrieb Daniel P. Berrange:
> From: "Daniel P. Berrange" <berrange@redhat.com>
>
> The GDK_KEY_XXX symbols are new in GTK3 and only the most
> recent GTK2 releases. Most versions of GTK2 have simply
> used GDK_XXX
>
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  ui/gtk.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/ui/gtk.c b/ui/gtk.c
> index 82f0bb2..544593e 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -88,6 +88,15 @@ static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
>  #define gtk_widget_get_realized(widget) GTK_WIDGET_REALIZED(widget)
>  #endif
>  
> +#ifndef GDK_KEY_0
> +#define GDK_KEY_0 GDK_0
> +#define GDK_KEY_1 GDK_1
> +#define GDK_KEY_2 GDK_2
> +#define GDK_KEY_f GDK_f
> +#define GDK_KEY_g GDK_g
> +#define GDK_KEY_plus GDK_plus
> +#define GDK_KEY_minus GDK_minus
> +#endif
>  
>  typedef struct VirtualConsole
>  {


Patch http://patchwork.ozlabs.org/patch/222612/ does
essentially the same.

Regards,

Stefan Weil

Patch hide | download patch | download mbox

diff --git a/ui/gtk.c b/ui/gtk.c
index 82f0bb2..544593e 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -88,6 +88,15 @@  static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
 #define gtk_widget_get_realized(widget) GTK_WIDGET_REALIZED(widget)
 #endif
 
+#ifndef GDK_KEY_0
+#define GDK_KEY_0 GDK_0
+#define GDK_KEY_1 GDK_1
+#define GDK_KEY_2 GDK_2
+#define GDK_KEY_f GDK_f
+#define GDK_KEY_g GDK_g
+#define GDK_KEY_plus GDK_plus
+#define GDK_KEY_minus GDK_minus
+#endif
 
 typedef struct VirtualConsole
 {