summaryrefslogtreecommitdiff
path: root/libslab/libslab-utils.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-24 16:01:49 +0100
committerStefano Karapetsas <[email protected]>2014-01-24 16:01:49 +0100
commit80c3d8ace4794481e711fb63e4eefd9f1f5cc1ef (patch)
treec9ca5dade16593759c5d2ced120c028e963ae7d6 /libslab/libslab-utils.c
parent31bfbb9e6aba9a1c82999823f7a3cd9dd6ec500b (diff)
downloadmate-control-center-80c3d8ace4794481e711fb63e4eefd9f1f5cc1ef.tar.bz2
mate-control-center-80c3d8ace4794481e711fb63e4eefd9f1f5cc1ef.tar.xz
libslab: Add GTK3 support
Diffstat (limited to 'libslab/libslab-utils.c')
-rw-r--r--libslab/libslab-utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libslab/libslab-utils.c b/libslab/libslab-utils.c
index 6e073b0e..5c553069 100644
--- a/libslab/libslab-utils.c
+++ b/libslab/libslab-utils.c
@@ -191,7 +191,11 @@ libslab_get_current_screen (void)
event = gtk_get_current_event ();
if (event) {
if (event->any.window)
+#if GTK_CHECK_VERSION (3, 0, 0)
+ screen = gtk_window_get_screen (GTK_WINDOW (event->any.window));
+#else
screen = gdk_drawable_get_screen (GDK_DRAWABLE (event->any.window));
+#endif
gdk_event_free (event);
}