summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@blame.services>2022-08-18 00:19:42 +0200
committerDave Davenport <qball@blame.services>2022-08-18 00:19:42 +0200
commit65b48aae4faf946fdd94b6f04bf61047c76339b4 (patch)
tree945bb0c567bbf4982324a98943eb56e6f7aeb272
parent6b96928ebb4b7a82208a049e778a39c0c3bd8bb2 (diff)
[View] Reduce idle delay as tradeof for cpu usage.
Issue: #1678
-rw-r--r--source/view.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/view.c b/source/view.c
index 3ce4d582..700848ac 100644
--- a/source/view.c
+++ b/source/view.c
@@ -275,6 +275,7 @@ static gboolean rofi_view_repaint(G_GNUC_UNUSED void *data) {
// After a resize the edit_pixmap surface might not contain anything
// anymore. If we already re-painted, this does nothing.
+ TICK_N("Update start");
rofi_view_update(current_active_menu, FALSE);
g_debug("expose event");
TICK_N("Expose");
@@ -528,7 +529,7 @@ void rofi_view_reload(void) {
// @TODO add check if current view is equal to the callee
if (CacheState.idle_timeout == 0) {
CacheState.idle_timeout =
- g_timeout_add(1000 / 10, rofi_view_reload_idle, NULL);
+ g_timeout_add(1000 / 100, rofi_view_reload_idle, NULL);
}
}
void rofi_view_queue_redraw(void) {
@@ -1781,6 +1782,8 @@ void rofi_view_temp_click_to_exit(RofiViewState *state, xcb_window_t target) {
void rofi_view_frame_callback(void) {
if (CacheState.repaint_source == 0) {
+ CacheState.count++;
+ g_debug("redraw %llu", CacheState.count);
CacheState.repaint_source =
g_idle_add_full(G_PRIORITY_HIGH_IDLE, rofi_view_repaint, NULL, NULL);
}