-// -*- mode: C++; indent-tabs-mode: nil; -*-
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.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);
+}