]> Dogcows Code - chaz/openbox/blobdiff - openbox/grab.c
export if the keyboard and pointer are currently grabbed or not
[chaz/openbox] / openbox / grab.c
index de2efd9afa1e36689193839f5583819f383e8692..a53fe5e8241039a92ccfe4c8067740cfd5989ae3 100644 (file)
 
 /*! A list of all possible combinations of keyboard lock masks */
 static unsigned int mask_list[MASK_LIST_SIZE];
+static guint kgrabs = 0;
+static guint pgrabs = 0;
+
+gboolean grab_on_keyboard()
+{
+    return kgrabs > 0;
+}
+
+gboolean grab_on_pointer()
+{
+    return pgrabs > 0;
+}
 
 gboolean grab_keyboard(gboolean grab)
 {
-    static guint kgrabs = 0;
     gboolean ret = FALSE;
 
     if (grab) {
@@ -56,7 +67,6 @@ gboolean grab_keyboard(gboolean grab)
 
 gboolean grab_pointer(gboolean grab, ObCursor cur)
 {
-    static guint pgrabs = 0;
     gboolean ret = FALSE;
 
     if (grab) {
@@ -77,7 +87,6 @@ gboolean grab_pointer(gboolean grab, ObCursor cur)
 
 gboolean grab_pointer_window(gboolean grab, ObCursor cur, Window win)
 {
-    static guint pgrabs = 0;
     gboolean ret = FALSE;
 
     if (grab) {
This page took 0.021282 seconds and 4 git commands to generate.