summaryrefslogtreecommitdiff
path: root/Servers
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-04 17:35:22 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-04 17:36:28 +0200
commit02b523f9cda1f5e68dadaf7fc1424cf88737824c (patch)
treeae4f629b88152c22ed94c58ff887c03944410454 /Servers
parent8f38c01600efe8cb65f69bca41214d015ede551b (diff)
downloadserenity-02b523f9cda1f5e68dadaf7fc1424cf88737824c.zip
WindowServer: Clip dirty cursor rects to the screen in compose().
Diffstat (limited to 'Servers')
-rw-r--r--Servers/WindowServer/WSWindowManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Servers/WindowServer/WSWindowManager.cpp b/Servers/WindowServer/WSWindowManager.cpp
index d9eb2f7285..3f7fd48df7 100644
--- a/Servers/WindowServer/WSWindowManager.cpp
+++ b/Servers/WindowServer/WSWindowManager.cpp
@@ -874,8 +874,8 @@ void WSWindowManager::process_mouse_event(const WSMouseEvent& event, WSWindow*&
void WSWindowManager::compose()
{
auto dirty_rects = move(m_dirty_rects);
- dirty_rects.add(m_last_cursor_rect);
- dirty_rects.add(current_cursor_rect());
+ dirty_rects.add(Rect::intersection(m_last_cursor_rect, m_screen_rect));
+ dirty_rects.add(Rect::intersection(current_cursor_rect(), m_screen_rect));
#ifdef DEBUG_COUNTERS
dbgprintf("[WM] compose #%u (%u rects)\n", ++m_compose_count, dirty_rects.rects().size());
#endif