diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-02 00:59:07 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-02 00:59:07 +0000 |
| commit | 0da9aa2660b51ce6208b041cc6e14f15e522c289 (patch) | |
| tree | 77810ac57b56d6593864d1d9f59a7883f265c0b7 /openbox/keyboard.c | |
| parent | 66d6e1120ec4e66433ecec673258856def164070 (diff) | |
add a slight delay to the focus/desktop switch dialogs. so if you hit the key really fast there is no flicker. of course if you hit it fast but not fast enough there is still flicker. is this cool or does this make it feel bad? i dunno. we'll see..
make the keychain popup use the new delay popup facilities
Diffstat (limited to 'openbox/keyboard.c')
| -rw-r--r-- | openbox/keyboard.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/openbox/keyboard.c b/openbox/keyboard.c index c1151eb3..1509f69f 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -75,14 +75,6 @@ static gboolean chain_timeout(gpointer data) return FALSE; /* don't repeat */ } -static gboolean popup_show_timeout(gpointer data) -{ - gchar *text = data; - popup_show(popup, text); - - return FALSE; /* don't repeat */ -} - static void set_curpos(KeyBindingTree *newpos) { grab_keys(FALSE); @@ -103,19 +95,11 @@ static void set_curpos(KeyBindingTree *newpos) } popup_position(popup, NorthWestGravity, 10, 10); - if (popup->mapped) { - popup_show_timeout(text); - g_free(text); - } else { - ob_main_loop_timeout_remove(ob_main_loop, popup_show_timeout); - /* 1 second delay for the popup to show */ - ob_main_loop_timeout_add(ob_main_loop, G_USEC_PER_SEC, - popup_show_timeout, text, - g_direct_equal, g_free); - } + /* 1 second delay for the popup to show */ + popup_delay_show(popup, G_USEC_PER_SEC, text); + g_free(text); } else { popup_hide(popup); - ob_main_loop_timeout_remove(ob_main_loop, popup_show_timeout); } } @@ -362,7 +346,6 @@ void keyboard_shutdown(gboolean reconfig) interactive_states = NULL; ob_main_loop_timeout_remove(ob_main_loop, chain_timeout); - ob_main_loop_timeout_remove(ob_main_loop, popup_show_timeout); keyboard_unbind_all(); set_curpos(NULL); |
