From: Matthias Kruk Date: Sun, 23 May 2021 21:49:56 +0000 (+0900) Subject: monitor: Don't rearrange clients if monitor doesn't need redrawing X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=75097c4739dadf8f8a323246b1097666850c581e;p=mwm 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. --- 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); }