]> git.proxmox.com Git - qemu.git/commitdiff
Add compat for gdk_drawable_get_size on GTK3
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 25 Feb 2013 15:20:34 +0000 (15:20 +0000)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 26 Feb 2013 19:29:51 +0000 (13:29 -0600)
GTK3 lacks the gdk_drawable_get_size method, so we create a
stub impl which gets the get_width/get_height mehtods instead

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1361805646-6425-2-git-send-email-berrange@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ui/gtk.c

index dcce36d2431274a93f7b694b775a81733b4abf29..dfffbb86f2061db8b66dd3733168e0fcca0c9457 100644 (file)
--- a/ui/gtk.c
+++ b/ui/gtk.c
 
 #define MAX_VCS 10
 
+
+/* Compatibility define to let us build on both Gtk2 and Gtk3 */
+#if GTK_CHECK_VERSION(3, 0, 0)
+static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
+{
+    *ww = gdk_window_get_width(w);
+    *wh = gdk_window_get_height(w);
+}
+#endif
+
 typedef struct VirtualConsole
 {
     GtkWidget *menu_item;