[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-xen master] ui/gtk: Fix build with older versions of gtk



commit 204af15b04a448aa6e954e37613ac43467fd76c4
Author:     Thomas Huth <thuth@xxxxxxxxxx>
AuthorDate: Wed Nov 2 11:08:48 2016 +0100
Commit:     Stefan Hajnoczi <stefanha@xxxxxxxxxx>
CommitDate: Thu Nov 10 15:29:58 2016 +0000

    ui/gtk: Fix build with older versions of gtk
    
    GDK_KEY_Delete is only defined with gtk version 2.22 and newer,
    on older versions this key was called GDK_Delete instead.
    Since this is the case for all GDK_KEY_* defines, change the
    already existing preprocessor check there to test for version 2.22,
    so we know that we can remove this code block in case we require
    that version as a minimum one day.
    
    Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>
    Reviewed-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
    Message-id: 1478081328-25515-1-git-send-email-thuth@xxxxxxxxxx
    Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>
---
 ui/gtk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index ca737c4..e816428 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -94,7 +94,7 @@
 #define GDK_IS_WIN32_DISPLAY(dpy) (dpy == dpy)
 #endif
 
-#ifndef GDK_KEY_0
+#if !GTK_CHECK_VERSION(2, 22, 0)
 #define GDK_KEY_0 GDK_0
 #define GDK_KEY_1 GDK_1
 #define GDK_KEY_2 GDK_2
@@ -104,6 +104,7 @@
 #define GDK_KEY_plus GDK_plus
 #define GDK_KEY_minus GDK_minus
 #define GDK_KEY_Pause GDK_Pause
+#define GDK_KEY_Delete GDK_Delete
 #endif
 
 /* Some older mingw versions lack this constant or have
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.