mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
- Repaint the parent window in the non-paintself case.
- Updates since DceGetVisRgn returns a region which is in screen(?) coordinates.- Hacks to allow repainting of the desktop. svn path=/trunk/; revision=5390
This commit is contained in:
parent
6cb3436154
commit
786dbef8e2
4 changed files with 34 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: vis.h,v 1.1 2003/07/17 07:49:15 gvg Exp $
|
||||
/* $Id: vis.h,v 1.2 2003/08/02 19:56:19 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Win32k subsystem
|
||||
|
@ -22,6 +22,8 @@ VIS_ComputeVisibleRegion(PDESKTOP_OBJECT Desktop, PWINDOW_OBJECT Window,
|
|||
VOID FASTCALL
|
||||
VIS_WindowLayoutChanged(PDESKTOP_OBJECT Desktop, PWINDOW_OBJECT Window,
|
||||
HRGN UncoveredRgn);
|
||||
VOID FASTCALL
|
||||
VIS_RepaintDesktop(HWND Desktop, HRGN RepaintRgn);
|
||||
|
||||
#endif /* ! defined(_WIN32K_VIS_H) */
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: painting.c,v 1.20 2003/08/01 14:38:51 dwelch Exp $
|
||||
/* $Id: painting.c,v 1.21 2003/08/02 19:56:19 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -42,7 +42,7 @@
|
|||
#include <include/rect.h>
|
||||
#include <win32k/coord.h>
|
||||
#include <win32k/region.h>
|
||||
|
||||
#include <include/vis.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
@ -75,7 +75,14 @@ PaintDoPaint(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags, ULONG ExFlags)
|
|||
{
|
||||
if (NULL != Window->UpdateRegion)
|
||||
{
|
||||
NtUserSendMessage(hWnd, bIcon ? WM_PAINTICON : WM_PAINT, bIcon, 0);
|
||||
if (W32kIsDesktopWindow(Window))
|
||||
{
|
||||
VIS_RepaintDesktop(Window->Self, Window->UpdateRegion);
|
||||
}
|
||||
else
|
||||
{
|
||||
NtUserSendMessage(hWnd, bIcon ? WM_PAINTICON : WM_PAINT, bIcon, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Flags & RDW_ERASENOW || ExFlags & RDW_EX_TOPFRAME)
|
||||
|
@ -121,10 +128,19 @@ PaintDoPaint(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags, ULONG ExFlags)
|
|||
}
|
||||
if (NULL != (hDC = NtUserGetDCEx(hWnd, hRgnRet, Dcx)))
|
||||
{
|
||||
if (0 != NtUserSendMessage(hWnd, bIcon ? WM_ICONERASEBKGND :
|
||||
WM_ERASEBKGND, (WPARAM)hDC, 0))
|
||||
if (W32kIsDesktopWindow(Window))
|
||||
{
|
||||
Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBACKGRD;
|
||||
VIS_RepaintDesktop(Window->Self, Window->UpdateRegion);
|
||||
W32kDeleteObject(Window->UpdateRegion);
|
||||
Window->UpdateRegion = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (0 != NtUserSendMessage(hWnd, bIcon ? WM_ICONERASEBKGND :
|
||||
WM_ERASEBKGND, (WPARAM)hDC, 0))
|
||||
{
|
||||
Window->Flags &= ~WINDOWOBJECT_NEED_ERASEBACKGRD;
|
||||
}
|
||||
}
|
||||
NtUserReleaseDC(hWnd, hDC);
|
||||
}
|
||||
|
@ -284,7 +300,8 @@ PaintUpdateRgns(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags,
|
|||
hRgn = Window->UpdateRegion; /* this is a trick that depends on code in PaintRedrawWindow() */
|
||||
}
|
||||
|
||||
if (! HadOne && 0 == (Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT))
|
||||
if (! HadOne && 0 == (Window->Flags & WINDOWOBJECT_NEED_INTERNALPAINT) &&
|
||||
!W32kIsDesktopWindow(Window))
|
||||
{
|
||||
MsqIncPaintCountQueue(Window->MessageQueue);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: vis.c,v 1.2 2003/07/18 20:55:21 gvg Exp $
|
||||
* $Id: vis.c,v 1.3 2003/08/02 19:56:19 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -199,7 +199,7 @@ VIS_ComputeVisibleRegion(PDESKTOP_OBJECT Desktop, PWINDOW_OBJECT Window,
|
|||
}
|
||||
|
||||
/* FIXME: to be replaced by a normal window proc in CSRSS */
|
||||
VOID STATIC FASTCALL
|
||||
VOID FASTCALL
|
||||
VIS_RepaintDesktop(HWND Desktop, HRGN RepaintRgn)
|
||||
{
|
||||
HDC dc = NtUserGetDC(Desktop);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: winpos.c,v 1.19 2003/08/02 16:32:18 gdalsnes Exp $
|
||||
/* $Id: winpos.c,v 1.20 2003/08/02 19:56:19 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -520,6 +520,7 @@ static UINT WinPosCopyValidBits( PWINDOW_OBJECT Wnd, HRGN* pVisRgn,
|
|||
uFlags |= SWP_EX_NOCOPY; /* whole window is invalid, nothing to copy */
|
||||
|
||||
newVisRgn = DceGetVisRgn( Wnd->Self, DCX_WINDOW | DCX_CLIPSIBLINGS, 0, 0);
|
||||
W32kOffsetRgn(newVisRgn, -Wnd->WindowRect.left, -Wnd->WindowRect.top);
|
||||
dirtyRgn = W32kCreateRectRgn( 0, 0, 0, 0 );
|
||||
|
||||
if( !(uFlags & SWP_EX_NOCOPY) ) /* make sure dst region covers only valid bits */
|
||||
|
@ -797,6 +798,7 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
|
|||
{
|
||||
VisRgn = DceGetVisRgn(Wnd, DCX_WINDOW, 0, 0);
|
||||
}
|
||||
W32kOffsetRgn(VisRgn, -Window->WindowRect.left, -Window->WindowRect.top);
|
||||
}
|
||||
|
||||
WvrFlags = WinPosDoNCCALCSize(Window, &WinPos, &NewWindowRect,
|
||||
|
@ -880,7 +882,7 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
|
|||
}
|
||||
else
|
||||
{
|
||||
PaintRedrawWindow(Window->Self, NULL,
|
||||
PaintRedrawWindow(Window->Parent->Self, NULL,
|
||||
(VisRgn == (HRGN) 1) ? 0 : VisRgn,
|
||||
RDW_ERASE | RDW_INVALIDATE | RDW_ALLCHILDREN |
|
||||
RDW_ERASENOW,
|
||||
|
@ -888,7 +890,7 @@ WinPosSetWindowPos(HWND Wnd, HWND WndInsertAfter, INT x, INT y, INT cx,
|
|||
}
|
||||
/* FIXME: Redraw the window parent. */
|
||||
}
|
||||
/* FIXME: Delete VisRgn */
|
||||
W32kDeleteObject(VisRgn);
|
||||
}
|
||||
|
||||
if (!(flags & SWP_NOACTIVATE))
|
||||
|
|
Loading…
Reference in a new issue