summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/window.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 24683d0a6..0ffbf8bf1 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -942,7 +942,7 @@ void DrawOverlappedWindowForAll(int left, int top, int right, int bottom)
left < w->left + w->width &&
top < w->top + w->height) {
/* Window w intersects with the rectangle => needs repaint */
- DrawOverlappedWindow(w, left, top, right, bottom);
+ DrawOverlappedWindow(w, max(left, w->left), max(top, w->top), min(right, w->left + w->width), min(bottom, w->top + w->height));
}
}
}