#include "modkeys.h"
#include "openbox.h"
#include "event.h"
-#include "xerror.h"
#include "screen.h"
#include "debug.h"
+#include "obt/display.h"
#include <glib.h>
#include <X11/Xlib.h>
{
guint i;
- xerror_set_ignore(TRUE); /* can get BadAccess from these */
- xerror_occured = FALSE;
+ /* can get BadAccess from these */
+ obt_display_ignore_errors(ob_display, TRUE);
for (i = 0; i < MASK_LIST_SIZE; ++i)
XGrabButton(ob_display, button, state | mask_list[i], win, False, mask,
pointer_mode, GrabModeAsync, None, ob_cursor(cur));
- xerror_set_ignore(FALSE);
- if (xerror_occured)
+ obt_display_ignore_errors(ob_display, FALSE);
+ if (obt_display_error_occured)
ob_debug("Failed to grab button %d modifiers %d", button, state);
}
{
guint i;
- xerror_set_ignore(TRUE); /* can get BadAccess' from these */
- xerror_occured = FALSE;
+ /* can get BadAccess' from these */
+ obt_display_ignore_errors(ob_display, TRUE);
for (i = 0; i < MASK_LIST_SIZE; ++i)
XGrabKey(ob_display, keycode, state | mask_list[i], win, FALSE,
GrabModeAsync, keyboard_mode);
- xerror_set_ignore(FALSE);
- if (xerror_occured)
+ obt_display_ignore_errors(ob_display, FALSE);
+ if (obt_display_error_occured)
ob_debug("Failed to grab keycode %d modifiers %d", keycode, state);
}