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>
@ -642,30 +643,20 @@ NtUserCloseDesktop(HDESK hDesktop)
BOOL STDCALL BOOL STDCALL
NtUserPaintDesktop(HDC hDC) NtUserPaintDesktop(HDC hDC)
{ {
HWND hwnd = IntGetDesktopWindow(); RECT Rect;
HBRUSH PreviousBrush;
/* IntGdiGetClipBox(hDC, &Rect);
* Check for an owning thread, otherwise don't paint anything
* (non-desktop mode)
*/
if (NtUserGetWindowThreadProcessId(hwnd, NULL)) /*
{ * Paint desktop background
RECT Rect; */
HBRUSH PreviousBrush;
NtUserGetClientRect(hwnd, &Rect); PreviousBrush = NtGdiSelectObject(hDC, NtGdiGetSysColorBrush(COLOR_BACKGROUND));
NtGdiPatBlt(hDC, Rect.left, Rect.top, Rect.right, Rect.bottom, PATCOPY);
NtGdiSelectObject(hDC, PreviousBrush);
/* return TRUE;
* Paint desktop background
*/
PreviousBrush = NtGdiSelectObject(hDC, NtGdiGetSysColorBrush(COLOR_BACKGROUND));
NtGdiPatBlt(hDC, Rect.left, Rect.top, Rect.right, Rect.bottom, PATCOPY);
NtGdiSelectObject(hDC, PreviousBrush);
}
return TRUE;
} }
/* /*