diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-12-17 17:56:54 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-12-17 17:56:54 +0100 |
commit | 84508bdc1b47396f18a7d97c87b4d0527ba7268a (patch) | |
tree | 96d344cad36d26d3e3e0e8a32144056c32e467c5 | |
parent | 18793612505ebc38da0116176746bff569d52257 (diff) |
Lower priority of loading data from dmenu, so drawing is not delayed
-rw-r--r-- | source/dialogs/dmenu.c | 8 |
1 files 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 ) |