explorer: Wrap the desktop window procedure instead of replacing it.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3cd66cf7b1
commit
fc14753dc0
|
@ -599,6 +599,8 @@ static BOOL start_screensaver( void )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static WNDPROC desktop_orig_wndproc;
|
||||||
|
|
||||||
/* window procedure for the desktop window */
|
/* window procedure for the desktop window */
|
||||||
static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
|
static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
|
||||||
{
|
{
|
||||||
|
@ -660,10 +662,9 @@ static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPAR
|
||||||
EndPaint( hwnd, &ps );
|
EndPaint( hwnd, &ps );
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
|
||||||
return DefWindowProcW( hwnd, message, wp, lp );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return desktop_orig_wndproc( hwnd, message, wp, lp );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create the desktop and the associated driver window, and make it the current desktop */
|
/* create the desktop and the associated driver window, and make it the current desktop */
|
||||||
|
@ -978,7 +979,8 @@ void manage_desktop( WCHAR *arg )
|
||||||
CreateWindowExW( 0, messageW, NULL, WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
|
CreateWindowExW( 0, messageW, NULL, WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
|
||||||
0, 0, 100, 100, 0, 0, 0, NULL );
|
0, 0, 100, 100, 0, 0, 0, NULL );
|
||||||
|
|
||||||
SetWindowLongPtrW( hwnd, GWLP_WNDPROC, (LONG_PTR)desktop_wnd_proc );
|
desktop_orig_wndproc = (WNDPROC)SetWindowLongPtrW( hwnd, GWLP_WNDPROC,
|
||||||
|
(LONG_PTR)desktop_wnd_proc );
|
||||||
using_root = !desktop || !create_desktop( graphics_driver, name, width, height );
|
using_root = !desktop || !create_desktop( graphics_driver, name, width, height );
|
||||||
SendMessageW( hwnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIconW( 0, MAKEINTRESOURCEW(OIC_WINLOGO)));
|
SendMessageW( hwnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIconW( 0, MAKEINTRESOURCEW(OIC_WINLOGO)));
|
||||||
if (name) set_desktop_window_title( hwnd, name );
|
if (name) set_desktop_window_title( hwnd, name );
|
||||||
|
|
Loading…
Reference in New Issue