Author: fireball
Date: Thu Apr 8 11:09:26 2010
New Revision: 46778
URL:
http://svn.reactos.org/svn/reactos?rev=46778&view=rev
Log:
- Copy whole window bits when moving a window, SWM's job. Fixes "repainting"
issues when moving a window.
Modified:
branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c
Modified: branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] Thu Apr 8
11:09:26 2010
@@ -83,6 +83,23 @@
else RedrawWindow( data->hwnd, NULL, rgn, RDW_INVALIDATE | RDW_ERASE |
RDW_ALLCHILDREN );
DeleteObject( rgn );
}
+}
+
+void swm_move_whole_window( struct ntdrv_win_data *data, const RECT *old_rect )
+{
+ HDC hdc_src, hdc_dst;
+ HWND parent;
+
+ parent = GetAncestor( data->hwnd, GA_PARENT );
+ hdc_src = GetDCEx( parent, 0, DCX_CACHE );
+ hdc_dst = GetDCEx( data->hwnd, 0, DCX_CACHE | DCX_WINDOW );
+
+ BitBlt( hdc_dst, 0, 0,
+ data->whole_rect.right - data->whole_rect.left, data->whole_rect.bottom
- data->whole_rect.top,
+ hdc_src, old_rect->left, old_rect->top, SRCCOPY );
+
+ ReleaseDC( data->hwnd, hdc_dst );
+ ReleaseDC( parent, hdc_src );
}
HKL CDECL RosDrv_ActivateKeyboardLayout( HKL layout, UINT flags )
@@ -936,7 +953,12 @@
/* Sync position change */
if (!(swp_flags & SWP_NOREDRAW)) // HACK: When removing this, explorer's
start menu starts to appear partially. Investigate!
+ {
SwmPosChanged(hwnd, &data->whole_rect, &old_whole_rect, insert_after,
swp_flags);
+
+ /* SWM: Move whole window bits */
+ swm_move_whole_window( data, &old_whole_rect );
+ }
/* Pass show/hide information to the window manager */
if (swp_flags & SWP_SHOWWINDOW)