From a07500170495faa1cdaaa20a63bda7cba019c9db Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 9 Aug 2006 11:21:41 +0200 Subject: [PATCH] explorer: Never paint the desktop when using the X root window. --- programs/explorer/desktop.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index d4db46dbbff..e552599432c 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -28,6 +28,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(explorer); #define DESKTOP_CLASS_ATOM MAKEINTATOMW(32769) #define DESKTOP_ALL_ACCESS 0x01ff +static BOOL using_root; + /* window procedure for the desktop window */ static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPARAM lp ) { @@ -50,14 +52,14 @@ static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPAR return HTCLIENT; case WM_ERASEBKGND: - PaintDesktop( (HDC)wp ); + if (!using_root) PaintDesktop( (HDC)wp ); return TRUE; case WM_PAINT: { PAINTSTRUCT ps; BeginPaint( hwnd, &ps ); - if (ps.fErase) PaintDesktop( ps.hdc ); + if (!using_root && ps.fErase) PaintDesktop( ps.hdc ); EndPaint( hwnd, &ps ); } return 0; @@ -155,6 +157,7 @@ void manage_desktop( char *arg ) if (!xwin) /* using the root window */ { + using_root = TRUE; width = GetSystemMetrics(SM_CXSCREEN); height = GetSystemMetrics(SM_CYSCREEN); }