1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

SharedGraphics: Make Painter clipping work with translated clip origin.

This commit is contained in:
Andreas Kling 2019-02-28 18:57:36 +01:00
parent 8eefdbdce8
commit fd428d6ed3
6 changed files with 20 additions and 9 deletions

View file

@ -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();