diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-01-26 08:37:40 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-01-26 08:38:07 +0100 |
commit | eab4e1438f173e7a1052a0fd81163d8ea79fe1e5 (patch) | |
tree | 288a6d0d1eaa211a1cdca5fbbb67a45f68510e9b /source/dialogs | |
parent | 3da03c068de975ae44a3c02f932175f8cc95fd8d (diff) |
Make dmenu use glib mainloop.
Diffstat (limited to 'source/dialogs')
-rw-r--r-- | source/dialogs/dmenu.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/dialogs/dmenu.c b/source/dialogs/dmenu.c index 37749b67..025ed788 100644 --- a/source/dialogs/dmenu.c +++ b/source/dialogs/dmenu.c @@ -404,15 +404,12 @@ int dmenu_switcher_dialog ( void ) menu_state_set_selected_line ( state, pd->selected_line ); retv = FALSE; + menu_state_set_active ( state ); // Enter main loop. while ( !menu_state_get_completed ( state ) ) { - // Wait for event. - XEvent ev; - // Get next event. (might block) - XNextEvent ( display, &ev ); - TICK_N ( "X Event" ); - menu_state_itterrate ( state, &ev ); + g_main_context_iteration ( NULL, TRUE ); } + menu_state_set_active ( NULL ); g_free ( input ); input = g_strdup ( menu_state_get_user_input ( state ) ); pd->selected_line = menu_state_get_selected_line ( state );; |