reactos/subsys/win32k/ntuser
diff -u -r1.242 -r1.243
--- window.c 3 Jul 2004 17:40:25 -0000 1.242
+++ window.c 9 Jul 2004 20:57:38 -0000 1.243
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: window.c,v 1.242 2004/07/03 17:40:25 navaraf Exp $
+/* $Id: window.c,v 1.243 2004/07/09 20:57:38 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -2381,7 +2381,7 @@
PWNDCLASS_OBJECT ClassObject = NULL;
BOOL ClassFound;
- Desktop = IntGetDesktopWindow();
+ Desktop = IntGetCurrentThreadDesktopWindow();
if(hwndParent == NULL)
hwndParent = Desktop;
reactos/subsys/win32k/ntuser
diff -u -r1.16 -r1.17
--- desktop.c 3 Jul 2004 13:55:36 -0000 1.16
+++ desktop.c 9 Jul 2004 20:57:38 -0000 1.17
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: desktop.c,v 1.16 2004/07/03 13:55:36 navaraf Exp $
+ * $Id: desktop.c,v 1.17 2004/07/09 20:57:38 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -206,6 +206,17 @@
return pdo->DesktopWindow;
}
+HWND FASTCALL IntGetCurrentThreadDesktopWindow(VOID)
+{
+ PDESKTOP_OBJECT pdo = PsGetWin32Thread()->Desktop;
+ if (NULL == pdo)
+ {
+ DPRINT1("Thread doesn't have a desktop\n");
+ return NULL;
+ }
+ return pdo->DesktopWindow;
+}
+
/* PUBLIC FUNCTIONS ***********************************************************/
NTSTATUS FASTCALL
reactos/subsys/win32k/include
diff -u -r1.7 -r1.8
--- desktop.h 8 May 2004 12:42:46 -0000 1.7
+++ desktop.h 9 Jul 2004 20:57:38 -0000 1.8
@@ -31,6 +31,9 @@
HWND FASTCALL
IntGetDesktopWindow (VOID);
+HWND FASTCALL
+IntGetCurrentThreadDesktopWindow(VOID);
+
PUSER_MESSAGE_QUEUE FASTCALL
IntGetFocusMessageQueue(VOID);