{
      /*ob_debug("ungrabbing %d passive grabs\n", passive_count);*/
      if (passive_count) {
-         /* kill out passive grab */
+         /* kill our passive grab */
 -        XUngrabKeyboard(ob_display, event_curtime);
 +        XUngrabKeyboard(obt_display, event_curtime);
          passive_count = 0;
      }
  }
 
          p = curpos ? curpos->first_child : keyboard_firstnode;
          while (p) {
              if (p->key)
 -                grab_key(p->key, p->state, RootWindow(ob_display, ob_screen),
 +                grab_key(p->key, p->state, obt_root(ob_screen),
-                          GrabModeAsync);
+                          GrabModeSync);
              p = p->next_sibling;
          }
          if (curpos)
              grab_key(config_keyboard_reset_keycode,
                       config_keyboard_reset_state,
-                      obt_root(ob_screen), GrabModeAsync);
 -                     RootWindow(ob_display, ob_screen), GrabModeSync);
++                     obt_root(ob_screen), GrabModeSync);
      }
  }
  
          }
          p = p->next_sibling;
      }
 -    XAllowEvents(ob_display, AsyncKeyboard, event_curtime);
+ 
++    XAllowEvents(obt_display, AsyncKeyboard, event_curtime);
  }
  
  static void node_rebind(KeyBindingTree *node)
 
         this will also set the default names from the config file up for
         desktops that don't have names yet */
      screen_num_desktops = 0;
 -    if (PROP_GET32(RootWindow(ob_display, ob_screen),
 -                   net_number_of_desktops, cardinal, &d))
 +    if (OBT_PROP_GET32(obt_root(ob_screen),
 +                       NET_NUMBER_OF_DESKTOPS, CARDINAL, &d))
      {
          if (d != config_desktops_num) {
+             /* TRANSLATORS: If you need to specify a different order of the
+                arguments, you can use %1$d for the first one and %2$d for the
+                second one. For example,
+                "The current session has %2$d desktops, but Openbox is configured for %1$d ..." */
              g_warning(_("Openbox is configured for %d desktops, but the current session has %d.  Overriding the Openbox configuration."),
                        config_desktops_num, d);
          }