diff options
author | Pierre Ossman <ossman@cendio.se> | 2017-11-24 12:34:28 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2017-11-24 12:34:28 +0100 |
commit | cf647a33718f5dfffb4f4df3a7ae4235e83a4065 (patch) | |
tree | 2a15bdcd08660fb3c825b9b50951d888bd48d44e /win/rfb_win32/WMWindowCopyRect.cxx | |
parent | ac90e95db4b224b013e538d423fbd565dd90c339 (diff) | |
download | tigervnc-cf647a33718f5dfffb4f4df3a7ae4235e83a4065.tar.gz tigervnc-cf647a33718f5dfffb4f4df3a7ae4235e83a4065.zip |
Stop using CopyRect in WinVNC
It cannot keep itself in sync with the actual screen contents well
enough for CopyRect to work accurately. Graphical glitches could
be seen in some cases.
Diffstat (limited to 'win/rfb_win32/WMWindowCopyRect.cxx')
-rw-r--r-- | win/rfb_win32/WMWindowCopyRect.cxx | 10 |
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; |