mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:34:09 +00:00
explorer: Don't call driver create_desktop if desktop name is "root".
This commit is contained in:
parent
dbb63987f0
commit
0edc848bee
|
@ -359,21 +359,10 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height )
|
|||
*/
|
||||
NTSTATUS x11drv_create_desktop( void *arg )
|
||||
{
|
||||
static const WCHAR rootW[] = {'r','o','o','t',0};
|
||||
const struct create_desktop_params *params = arg;
|
||||
XSetWindowAttributes win_attr;
|
||||
Window win;
|
||||
Display *display = thread_init_display();
|
||||
WCHAR name[MAX_PATH];
|
||||
|
||||
if (!NtUserGetObjectInformation( NtUserGetThreadDesktop( GetCurrentThreadId() ),
|
||||
UOI_NAME, name, sizeof(name), NULL ))
|
||||
name[0] = 0;
|
||||
|
||||
TRACE( "%s %ux%u\n", debugstr_w(name), params->width, params->height );
|
||||
|
||||
/* magic: desktop "root" means use the root window */
|
||||
if (!wcsicmp( name, rootW )) return FALSE;
|
||||
|
||||
/* Create window */
|
||||
win_attr.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask | EnterWindowMask |
|
||||
|
|
|
@ -42,7 +42,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(explorer);
|
|||
|
||||
static const WCHAR default_driver[] = {'m','a','c',',','x','1','1',0};
|
||||
|
||||
static BOOL using_root;
|
||||
static BOOL using_root = TRUE;
|
||||
|
||||
struct launcher
|
||||
{
|
||||
|
@ -1089,6 +1089,8 @@ void manage_desktop( WCHAR *arg )
|
|||
|
||||
if (name && width && height)
|
||||
{
|
||||
/* magic: desktop "root" means use the root window */
|
||||
using_root = !wcsicmp( name, L"root" );
|
||||
if (!(desktop = CreateDesktopW( name, NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL )))
|
||||
{
|
||||
WINE_ERR( "failed to create desktop %s error %ld\n", wine_dbgstr_w(name), GetLastError() );
|
||||
|
@ -1109,7 +1111,7 @@ void manage_desktop( WCHAR *arg )
|
|||
|
||||
desktop_orig_wndproc = (WNDPROC)SetWindowLongPtrW( hwnd, GWLP_WNDPROC,
|
||||
(LONG_PTR)desktop_wnd_proc );
|
||||
using_root = !desktop || !create_desktop( graphics_driver, name, width, height );
|
||||
if (!using_root) using_root = !create_desktop( graphics_driver, name, width, height );
|
||||
SendMessageW( hwnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIconW( 0, MAKEINTRESOURCEW(OIC_WINLOGO)));
|
||||
if (name) set_desktop_window_title( hwnd, name );
|
||||
SetWindowPos( hwnd, 0, GetSystemMetrics(SM_XVIRTUALSCREEN), GetSystemMetrics(SM_YVIRTUALSCREEN),
|
||||
|
|
Loading…
Reference in a new issue