summaryrefslogtreecommitdiff
path: root/client/gtk.c
diff options
context:
space:
mode:
authorMarcus Carlson <marcus@mejlamej.nu>2010-06-09 22:37:06 +0200
committerSamuel Lidén Borell <samuel@slbdata.se>2010-06-10 22:07:24 +0200
commit08ad5a6e53db09c74ae2b0477c22e8d02acb3334 (patch)
treebf9f30f505563a6637dc4a35b61e7020f6a42641 /client/gtk.c
parent979889751a0cb5d224b1c677b9c78d555ad0645e (diff)
downloadfribid-08ad5a6e53db09c74ae2b0477c22e8d02acb3334.tar.gz
fribid-08ad5a6e53db09c74ae2b0477c22e8d02acb3334.tar.bz2
fribid-08ad5a6e53db09c74ae2b0477c22e8d02acb3334.zip
Use GSEAL when building
This prevents direct access to data structures in GTK (and GLib in the future). Thanks to Marcus Carlson for this patch!
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;