From 35730491ef90528be367b5c59261ec82984b50e0 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 17 Feb 2017 10:58:08 +0100 Subject: Add partial rendering support when rendering widgets to window pixel buffer and also when rendering window pixel buffer to native window. Win32 only partially implemented. --- plugingui/nativewindow_win32.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugingui/nativewindow_win32.cc') diff --git a/plugingui/nativewindow_win32.cc b/plugingui/nativewindow_win32.cc index 669ec13..dce14cc 100644 --- a/plugingui/nativewindow_win32.cc +++ b/plugingui/nativewindow_win32.cc @@ -384,12 +384,13 @@ void NativeWindowWin32::hide() ShowWindow(m_hwnd, SW_HIDE); } -void NativeWindowWin32::redraw() +void NativeWindowWin32::redraw(const Rect& dirty_rect) { // Send WM_PAINT message. Buffer transfering is handled in MessageHandler. if(parent_window == nullptr) { - RedrawWindow(m_hwnd, nullptr, nullptr, RDW_ERASE|RDW_INVALIDATE); + RECT rect = {dirty_rect.x1, dirty_rect.y1, dirty_rect.x2, dirty_rect.y2 }; + RedrawWindow(m_hwnd, &rect, nullptr, RDW_INVALIDATE); UpdateWindow(m_hwnd); } else -- cgit v1.2.3