summaryrefslogtreecommitdiff
path: root/obt/display.c
diff options
context:
space:
mode:
Diffstat (limited to 'obt/display.c')
-rw-r--r--obt/display.c13
1 files changed, 12 insertions, 1 deletions
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 <string.h>
@@ -31,6 +32,10 @@
# include <unistd.h>
#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)