summaryrefslogtreecommitdiff
path: root/WindowServer/WSWindowManager.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-28 18:57:36 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-28 18:57:36 +0100
commitfd428d6ed33b9d42b4a347911ec8f7ff825f4407 (patch)
tree75f39b498c05ed76ade53dbb8bece6487f41a20b /WindowServer/WSWindowManager.cpp
parent8eefdbdce8030ecd242664b17ed3bd67d8eeed7d (diff)
downloadserenity-fd428d6ed33b9d42b4a347911ec8f7ff825f4407.zip
SharedGraphics: Make Painter clipping work with translated clip origin.
Diffstat (limited to 'WindowServer/WSWindowManager.cpp')
-rw-r--r--WindowServer/WSWindowManager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/WindowServer/WSWindowManager.cpp b/WindowServer/WSWindowManager.cpp
index 5805cc1f38..9fc48eaf6d 100644
--- a/WindowServer/WSWindowManager.cpp
+++ b/WindowServer/WSWindowManager.cpp
@@ -865,8 +865,10 @@ void WSWindowManager::compose()
m_back_painter->set_clip_rect(dirty_rect);
paint_window_frame(window);
Rect dirty_rect_in_window_coordinates = Rect::intersection(dirty_rect, window.rect());
- if (dirty_rect_in_window_coordinates.is_empty())
+ if (dirty_rect_in_window_coordinates.is_empty()) {
+ m_back_painter->clear_clip_rect();
continue;
+ }
dirty_rect_in_window_coordinates.set_x(dirty_rect_in_window_coordinates.x() - window.x());
dirty_rect_in_window_coordinates.set_y(dirty_rect_in_window_coordinates.y() - window.y());
auto dst = window.position();