diff options
author | 2013-08-25 16:42:52 +0200 | |
---|---|---|
committer | 2013-08-25 16:42:52 +0200 | |
commit | 5802fcec75b58a270a9459fb26a606af018adaf0 (patch) | |
tree | fd2b4f1ce9f34993a136e0ec121a1ed36f2ee494 /plugins/gtkui/callbacks.c | |
parent | 78bf40fc922fdb1f6d5b3e7a511ed589a37a5a26 (diff) |
gtkui: fixed hotkeys vs focus problem; updated help.txt
Diffstat (limited to 'plugins/gtkui/callbacks.c')
-rw-r--r-- | plugins/gtkui/callbacks.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c index 4bec4c8e..c1f09515 100644 --- a/plugins/gtkui/callbacks.c +++ b/plugins/gtkui/callbacks.c @@ -199,6 +199,26 @@ on_mainwin_key_press_event (GtkWidget *widget, mods |= Mod4Mask; } trace ("keycode: %x, mods %x\n", event->keyval, mods); + +#if 0 + // only execute actions if one of playlist widgets is in focus, or none + GtkWidget *focus = gtk_window_get_focus (GTK_WINDOW (mainwin)); + if (focus) { + GtkWidget *parent = gtk_widget_get_parent (focus); + if (!parent) { + return FALSE; + } + parent = gtk_widget_get_parent (parent); + if (!parent) { + return FALSE; + } + parent = gtk_widget_get_parent (parent); + if (!parent || !DDB_IS_LISTVIEW (parent)) { + return FALSE; + } + } +#endif + DB_plugin_t *hkplug = deadbeef->plug_get_for_id ("hotkeys"); if (hkplug) { int ctx; |