[Wine-patches] [eter-2.1] winex11: Don't call ExcludeUpdateRgn for a window with WS_CLIPCHILDREN style. (eterbug #10584)

Dmitry Timoshkov dtimoshkov на etersoft.ru
Ср Июл 1 17:21:50 MSK 2015


(cherry picked from commit bd24842eba26573a4587d751adfbb8344eeac9b6)
---
 dlls/winex11.drv/window.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index aa232a9..22554a6 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -1501,7 +1501,13 @@ static void move_window_bits( HWND hwnd, Window window, const RECT *old_rect, co
     rgn = CreateRectRgnIndirect( &dst_rect );
     SelectClipRgn( hdc_dst, rgn );
     DeleteObject( rgn );
-    ExcludeUpdateRgn( hdc_dst, hwnd );
+    /* WS_CLIPCHILDREN doesn't exclude children from the window update
+     * region, and ExcludeUpdateRgn call may inappropriately clip valid
+     * child window contents from the copied parent window bits, but we
+     * still want to avoid copying invalid window bits when possible.
+     */
+    if (!(GetWindowLongW( hwnd, GWL_STYLE ) & WS_CLIPCHILDREN ))
+        ExcludeUpdateRgn( hdc_dst, hwnd );
 
     code = X11DRV_START_EXPOSURES;
     ExtEscape( hdc_dst, X11DRV_ESCAPE, sizeof(code), (LPSTR)&code, 0, NULL );
-- 
2.4.5



Подробная информация о списке рассылки Wine-patches