summaryrefslogtreecommitdiff
path: root/libwnck/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'libwnck/util.c')
-rw-r--r--libwnck/util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libwnck/util.c b/libwnck/util.c
index 01901b7..bc235bb 100644
--- a/libwnck/util.c
+++ b/libwnck/util.c
@@ -808,9 +808,12 @@ _wnck_init (void)
Display *
_wnck_get_default_display (void)
{
+ GdkDisplay *display = gdk_display_get_default ();
/* FIXME: when we fix libwnck to not use the GDK default display, we will
* need to fix wnckprop accordingly. */
- return GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
+ if (!GDK_IS_X11_DISPLAY (display))
+ return NULL;
+ return GDK_DISPLAY_XDISPLAY (display);
}
/**