extern "C" {
#include <X11/keysym.h>
+#ifdef SHAPE
+#include <X11/extensions/shape.h>
+#endif // SHAPE
+
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif // HAVE_STDIO_H
unsigned int OBDisplay::_mask_list[8];
OBDisplay::ScreenInfoList OBDisplay::_screenInfoList;
BGCCache *OBDisplay::_gccache = (BGCCache*) 0;
+int OBDisplay::_grab_count = 0;
int OBDisplay::xerrorHandler(Display *d, XErrorEvent *e)
}
+void OBDisplay::grab()
+{
+ if (_grab_count == 0)
+ XGrabServer(display);
+ _grab_count++;
+}
+
+
+void OBDisplay::ungrab()
+{
+ if (_grab_count == 0) return;
+ _grab_count--;
+ if (_grab_count == 0)
+ XUngrabServer(display);
+}