uint32_t Keyboard::Alt = GDK_MOD1_MASK;
uint32_t Keyboard::Meta;
-Keyboard* Keyboard::_the_keyboard = 0;
+Keyboard* Keyboard::_the_keyboard = 0;
+Gtk::Window* Keyboard::current_window = 0;
+bool Keyboard::_some_magic_widget_has_focus = false;
/* set this to initially contain the modifiers we care about, then track changes in ::set_edit_modifier() etc. */
GdkModifierType Keyboard::RelevantModifierKeyMask;
-bool Keyboard::_some_magic_widget_has_focus = false;
-
void
Keyboard::magic_widget_grab_focus ()
{
}
+ if (event->type == GDK_KEY_RELEASE && event->keyval == GDK_w && modifier_state_equals (event->state, Control)) {
+ if (current_window) {
+ current_window->hide ();
+ current_window = 0;
+ }
+ }
+
return false;
}
bool
Keyboard::enter_window (GdkEventCrossing *ev, Gtk::Window* win)
{
+ current_window = win;
return false;
}
cerr << "clearing current target\n";
}
state.clear ();
+ current_window = 0;
}
return false;