mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 21:09:52 +00:00
explorer: Move the check for the magic root desktop to the X11 driver.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5a58080a66
commit
9f8049105d
|
@ -173,12 +173,21 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height )
|
||||||
*/
|
*/
|
||||||
BOOL CDECL X11DRV_create_desktop( UINT width, UINT height )
|
BOOL CDECL X11DRV_create_desktop( UINT width, UINT height )
|
||||||
{
|
{
|
||||||
|
static const WCHAR rootW[] = {'r','o','o','t',0};
|
||||||
XSetWindowAttributes win_attr;
|
XSetWindowAttributes win_attr;
|
||||||
Window win;
|
Window win;
|
||||||
Display *display = thread_init_display();
|
Display *display = thread_init_display();
|
||||||
RECT rect;
|
RECT rect;
|
||||||
|
WCHAR name[MAX_PATH];
|
||||||
|
|
||||||
TRACE( "%u x %u\n", width, height );
|
if (!GetUserObjectInformationW( GetThreadDesktop( GetCurrentThreadId() ),
|
||||||
|
UOI_NAME, name, sizeof(name), NULL ))
|
||||||
|
name[0] = 0;
|
||||||
|
|
||||||
|
TRACE( "%s %ux%u\n", debugstr_w(name), width, height );
|
||||||
|
|
||||||
|
/* magic: desktop "root" means use the root window */
|
||||||
|
if (!lstrcmpiW( name, rootW )) return FALSE;
|
||||||
|
|
||||||
/* Create window */
|
/* Create window */
|
||||||
win_attr.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask | EnterWindowMask |
|
win_attr.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask | EnterWindowMask |
|
||||||
|
|
|
@ -670,12 +670,10 @@ static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPAR
|
||||||
/* 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 */
|
||||||
static BOOL create_desktop( HMODULE driver, const WCHAR *name, unsigned int width, unsigned int height )
|
static BOOL create_desktop( HMODULE driver, const WCHAR *name, unsigned int width, unsigned int height )
|
||||||
{
|
{
|
||||||
static const WCHAR rootW[] = {'r','o','o','t',0};
|
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
BOOL (CDECL *create_desktop_func)(unsigned int, unsigned int);
|
BOOL (CDECL *create_desktop_func)(unsigned int, unsigned int);
|
||||||
|
|
||||||
/* magic: desktop "root" means use the root window */
|
if (driver)
|
||||||
if (driver && strcmpiW( name, rootW ))
|
|
||||||
{
|
{
|
||||||
create_desktop_func = (void *)GetProcAddress( driver, "wine_create_desktop" );
|
create_desktop_func = (void *)GetProcAddress( driver, "wine_create_desktop" );
|
||||||
if (create_desktop_func) ret = create_desktop_func( width, height );
|
if (create_desktop_func) ret = create_desktop_func( width, height );
|
||||||
|
|
Loading…
Reference in a new issue