Author: fireball Date: Sat Oct 24 20:37:56 2009 New Revision: 43720
URL: http://svn.reactos.org/svn/reactos?rev=43720&view=rev Log: - Assign "Default" desktop to processes who don't have a parent.
Modified: branches/arwinss/reactos/subsystems/win32/win32k/main/init.c branches/arwinss/reactos/subsystems/win32/win32k/wine/winstation.c
Modified: branches/arwinss/reactos/subsystems/win32/win32k/main/init.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32... ============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/main/init.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/main/init.c [iso-8859-1] Sat Oct 24 20:37:56 2009 @@ -125,7 +125,8 @@ } if (Type == PsW32ThreadCalloutInitialize) { - DPRINT("Creating W32 thread TID:%d at IRQ level: %lu. Win32Process %p\n", Thread->Tcb.Teb->ClientId.UniqueThread, KeGetCurrentIrql(), Win32Process); + DPRINT("Creating W32 thread TID:%d PID:%d at IRQ level: %lu. Win32Process %p, desktop %x\n", + Thread->Tcb.Teb->ClientId.UniqueThread, Thread->Tcb.Teb->ClientId.UniqueProcess, KeGetCurrentIrql(), Win32Process, Win32Process->desktop);
Win32Thread->process = Win32Process; Win32Thread->peThread = Thread;
Modified: branches/arwinss/reactos/subsystems/win32/win32k/wine/winstation.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32... ============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/wine/winstation.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/wine/winstation.c [iso-8859-1] Sat Oct 24 20:37:56 2009 @@ -439,17 +439,16 @@ process, 0, 0, DUP_HANDLE_SAME_ACCESS ); }
- if (handle) set_process_default_desktop( process, desktop, handle ); - -#if 0 - { - // set default desktop differently. Just always assign a "default" desktop +#if 1 + else + { + // Always assign a "default" desktop if there is no parent desktop WCHAR deskbuf[8]; struct unicode_str full_str, desktop_name; WCHAR *full_name;
desktop_name.str = deskbuf; - desktop_name.len = sizeof(deskbuf); + desktop_name.len = sizeof(deskbuf) - sizeof(WCHAR); wcscpy(deskbuf, L"Default");
if ((full_name = build_desktop_name( &desktop_name, winstation, &full_str ))) @@ -457,10 +456,12 @@ handle = open_object( winstation_namespace, &full_str, &desktop_ops, GENERIC_ALL, OBJ_CASE_INSENSITIVE ); ExFreePool( full_name ); - DPRINT1("handle %x\n", handle); + DPRINT("handle %x\n", handle); } } #endif + + if (handle) set_process_default_desktop( process, desktop, handle );
done: if (desktop) release_object( desktop );