X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=obt%2Fdisplay.c;h=8b06cbfcf6cac47d213fe5a7ec33f12e6fbd1359;hb=a6141fe7a4895593d412a18bd24d1859d2d69c34;hp=37b1215737bf1117e3dc95dcd7839a65d76bcb01;hpb=8add92416dc9e43f689db64161cfc55fa1a73f10;p=chaz%2Fopenbox diff --git a/obt/display.c b/obt/display.c index 37b12157..8b06cbfc 100644 --- a/obt/display.c +++ b/obt/display.c @@ -20,6 +20,7 @@ #include "obt/prop.h" #include "obt/internal.h" #include "obt/keyboard.h" +#include "obt/xqueue.h" #ifdef HAVE_STRING_H # include @@ -31,6 +32,10 @@ # include #endif +/* from xqueue.c */ +extern void xqueue_init(void); +extern void xqueue_destroy(void); + Display* obt_display = NULL; gboolean obt_display_error_occured = FALSE; @@ -116,13 +121,19 @@ gboolean obt_display_open(const char *display_name) } g_free(n); + if (obt_display) + xqueue_init(); + return obt_display != NULL; } void obt_display_close(void) { obt_keyboard_shutdown(); - if (obt_display) XCloseDisplay(obt_display); + if (obt_display) { + xqueue_destroy(); + XCloseDisplay(obt_display); + } } static gint xerror_handler(Display *d, XErrorEvent *e)