From 84508bdc1b47396f18a7d97c87b4d0527ba7268a Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Sat, 17 Dec 2016 17:56:54 +0100 Subject: [PATCH] Lower priority of loading data from dmenu, so drawing is not delayed --- source/dialogs/dmenu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/dialogs/dmenu.c b/source/dialogs/dmenu.c index 7c953ea1..fa9fb28a 100644 --- a/source/dialogs/dmenu.c +++ b/source/dialogs/dmenu.c @@ -135,14 +135,14 @@ static void async_read_callback ( GObject *source_object, GAsyncResult *res, gpo g_free ( data ); rofi_view_reload (); - g_data_input_stream_read_upto_async ( pd->data_input_stream, &( pd->separator ), 1, G_PRIORITY_DEFAULT, pd->cancel, + g_data_input_stream_read_upto_async ( pd->data_input_stream, &( pd->separator ), 1, G_PRIORITY_LOW, pd->cancel, async_read_callback, pd ); return; } if ( !g_cancellable_is_cancelled ( pd->cancel ) ) { // Hack, don't use get active. rofi_view_set_overlay ( rofi_view_get_active (), NULL ); - g_input_stream_close_async ( G_INPUT_STREAM ( stream ), G_PRIORITY_DEFAULT, pd->cancel, async_close_callback, pd ); + g_input_stream_close_async ( G_INPUT_STREAM ( stream ), G_PRIORITY_LOW, pd->cancel, async_close_callback, pd ); } } @@ -153,7 +153,7 @@ static void async_read_cancel ( G_GNUC_UNUSED GCancellable *cancel, G_GNUC_UNUSE static void get_dmenu_async ( DmenuModePrivateData *pd ) { - g_data_input_stream_read_upto_async ( pd->data_input_stream, &( pd->separator ), 1, G_PRIORITY_DEFAULT, pd->cancel, + g_data_input_stream_read_upto_async ( pd->data_input_stream, &( pd->separator ), 1, G_PRIORITY_LOW, pd->cancel, async_read_callback, pd ); } static void get_dmenu_sync ( DmenuModePrivateData *pd ) @@ -168,7 +168,7 @@ static void get_dmenu_sync ( DmenuModePrivateData *pd ) read_add ( pd, data, len ); g_free ( data ); } - g_input_stream_close_async ( G_INPUT_STREAM ( pd->input_stream ), G_PRIORITY_DEFAULT, pd->cancel, async_close_callback, pd ); + g_input_stream_close_async ( G_INPUT_STREAM ( pd->input_stream ), G_PRIORITY_LOW, pd->cancel, async_close_callback, pd ); } static unsigned int dmenu_mode_get_num_entries ( const Mode *sw )