aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/rfb_win32/WMWindowCopyRect.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/win/rfb_win32/WMWindowCopyRect.cxx b/win/rfb_win32/WMWindowCopyRect.cxx
index 63c1da2e..6ca8c353 100644
--- a/win/rfb_win32/WMWindowCopyRect.cxx
+++ b/win/rfb_win32/WMWindowCopyRect.cxx
@@ -42,11 +42,11 @@ rfb::win32::WMCopyRect::processEvent() {
Rect winrect(wrect.left, wrect.top, wrect.right, wrect.bottom);
if (fg_window == window) {
if (!fg_window_rect.tl.equals(winrect.tl) && ut) {
- // Window has moved - send a copyrect event to the client
- Point delta = Point(winrect.tl.x-fg_window_rect.tl.x, winrect.tl.y-fg_window_rect.tl.y);
- Region copy_dest = winrect;
- ut->add_copied(copy_dest, delta);
- ut->add_changed(Region(fg_window_rect).subtract(copy_dest));
+ // Window has moved - mark both the previous and new position as changed
+ // (we can't use add_copied() here because we aren't that properly synced
+ // with the actual state of the framebuffer)
+ ut->add_changed(Region(winrect));
+ ut->add_changed(Region(fg_window_rect));
}
}
fg_window = window;