From 75097c4739dadf8f8a323246b1097666850c581e Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Mon, 24 May 2021 06:49:56 +0900 Subject: [PATCH] monitor: Don't rearrange clients if monitor doesn't need redrawing The monitor_redraw() function unconditionally rearranges the visible clients when it is called. However, if redrawing was not explicitly requested, this is not necessary. This commit changes the monitor_redraw() function not to rearrange clients if a redraw is not necessary, so that only the status bar and indicators will be redrawn. --- monitor.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/monitor.c b/monitor.c index 475b757..fa773e7 100644 --- a/monitor.c +++ b/monitor.c @@ -543,12 +543,9 @@ static int _redraw_statusbar(struct monitor *monitor) int monitor_redraw(struct monitor *monitor) { - monitor_arrange_clients(monitor); - if(monitor->needs_redraw) { + monitor_arrange_clients(monitor); monitor_draw_clients(monitor); - /* monitor_draw(monitor); */ - /* monitor_draw_bar() */ monitor->needs_redraw = 0; } @@ -556,8 +553,6 @@ int monitor_redraw(struct monitor *monitor) _redraw_statusbar(monitor); monitor_redraw_indicators(monitor); - XSync(mwm_get_display(monitor->mwm), False); - return(0); } -- 2.47.3