summaryrefslogtreecommitdiff
path: root/client/gtk.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/gtk.c')
-rw-r--r--client/gtk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/gtk.c b/client/gtk.c
index a668b3e..125c347 100644
--- a/client/gtk.c
+++ b/client/gtk.c
@@ -248,9 +248,11 @@ void platform_startSign(const char *url, const char *hostname, const char *ip,
GdkWindow *parent = gdk_window_foreign_new((GdkNativeWindow)parentWindowId);
if (parent != NULL) {
gtk_widget_realize(GTK_WIDGET(signDialog));
- // Only available in GTK 2.14+
- //GdkWindow *ourWindow = gtk_widget_get_window(GTK_WINDOW(signDialog));
+#if GTK_CHECK_VERSION(2, 14, 0)
+ GdkWindow *ourWindow = gtk_widget_get_window(GTK_WIDGET(signDialog));
+#else
GdkWindow *ourWindow = GTK_WIDGET(signDialog)->window;
+#endif
if (ourWindow != NULL) {
gdk_window_set_transient_for(ourWindow, parent);
transientOk = true;