- XUngrabKey(ob_display, AnyKey, AnyModifier, win);
+ XUngrabKey(obt_display, AnyKey, AnyModifier, win);
+}
+
+void grab_key_passive_count(int change)
+{
+ if (grab_on_keyboard()) return;
+ passive_count += change;
+ if (passive_count < 0) passive_count = 0;
+}
+
+void ungrab_passive_key(void)
+{
+ /*ob_debug("ungrabbing %d passive grabs\n", passive_count);*/
+ if (passive_count) {
+ /* kill our passive grab */
+ XUngrabKeyboard(obt_display, event_time());
+ passive_count = 0;
+ }