Fix rectangle computation in NtUserPaintDesktop() and remove Wine-ism

svn path=/trunk/; revision=7000
This commit is contained in:
Gé van Geldorp 2003-12-13 18:40:34 +00:00
parent 04d3cc439d
commit ff557884f4

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* $Id: desktop.c,v 1.4 2003/12/12 20:44:52 weiden Exp $ * $Id: desktop.c,v 1.5 2003/12/13 18:40:34 gvg Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -46,6 +46,7 @@
#include <include/mouse.h> #include <include/mouse.h>
#include <include/callback.h> #include <include/callback.h>
#include <include/guicheck.h> #include <include/guicheck.h>
#include <include/intgdi.h>
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
@ -641,20 +642,11 @@ NtUserCloseDesktop(HDESK hDesktop)
BOOL STDCALL BOOL STDCALL
NtUserPaintDesktop(HDC hDC) NtUserPaintDesktop(HDC hDC)
{
HWND hwnd = IntGetDesktopWindow();
/*
* Check for an owning thread, otherwise don't paint anything
* (non-desktop mode)
*/
if (NtUserGetWindowThreadProcessId(hwnd, NULL))
{ {
RECT Rect; RECT Rect;
HBRUSH PreviousBrush; HBRUSH PreviousBrush;
NtUserGetClientRect(hwnd, &Rect); IntGdiGetClipBox(hDC, &Rect);
/* /*
* Paint desktop background * Paint desktop background
@ -663,7 +655,6 @@ NtUserPaintDesktop(HDC hDC)
PreviousBrush = NtGdiSelectObject(hDC, NtGdiGetSysColorBrush(COLOR_BACKGROUND)); PreviousBrush = NtGdiSelectObject(hDC, NtGdiGetSysColorBrush(COLOR_BACKGROUND));
NtGdiPatBlt(hDC, Rect.left, Rect.top, Rect.right, Rect.bottom, PATCOPY); NtGdiPatBlt(hDC, Rect.left, Rect.top, Rect.right, Rect.bottom, PATCOPY);
NtGdiSelectObject(hDC, PreviousBrush); NtGdiSelectObject(hDC, PreviousBrush);
}
return TRUE; return TRUE;
} }