aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index dcce36d..dfffbb8 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -74,6 +74,16 @@
#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;