1 --- a/src/x11-property.c
2 +++ b/src/x11-property.c
3 @@ -43,11 +43,15 @@ static Window window;
4 void x11_property_init()
6 display = gdk_x11_get_default_xdisplay();
7 + if (!GDK_IS_X11_DISPLAY(display)) return;
8 + Screen* scr = ScreenOfDisplay(display, 0);
10 window = RootWindow(display, 0);
13 void x11_property_set(const char* key, const char* value)
15 + if (!GDK_IS_X11_DISPLAY(display)) return;
16 g_debug("[x11-property] setting '%s' to '%s'", key, value);
18 Atom atom = XInternAtom(display, key, False);
19 @@ -57,6 +61,7 @@ void x11_property_set(const char* key, c
21 void x11_property_del(const char* key)
23 + if (!GDK_IS_X11_DISPLAY(display)) return;
24 g_debug("[x11-property] deleting '%s'", key);
26 Atom atom = XInternAtom(display, key, False);
27 @@ -65,6 +70,7 @@ void x11_property_del(const char* key)
29 char* x11_property_get(const char* key)
31 + if (!GDK_IS_X11_DISPLAY(display)) return NULL;
32 Atom property = XInternAtom(display, key, False);