Moved a few remaining 16-bit window functions to wnd16.c and moved it
to the C_SRCS16 sources.
diff --git a/dlls/user/Makefile.in b/dlls/user/Makefile.in
index 157371b..4a7db41 100644
--- a/dlls/user/Makefile.in
+++ b/dlls/user/Makefile.in
@@ -73,13 +73,13 @@
resource.c \
text.c \
user_main.c \
- wnd16.c \
wsprintf.c
C_SRCS16 = \
bidi16.c \
network.c \
- user16.c
+ user16.c \
+ wnd16.c
RC_SRCS = resources/user32.rc
diff --git a/dlls/user/msg16.c b/dlls/user/msg16.c
index 0333498..935b53b 100644
--- a/dlls/user/msg16.c
+++ b/dlls/user/msg16.c
@@ -280,15 +280,15 @@
}
}
- if (!(wndPtr = WIN_GetPtr( HWND_32(msg->hwnd) )))
+ if (!(wndPtr = WIN_GetPtr( hwnd )))
{
if (msg->hwnd) SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return 0;
}
if (wndPtr == WND_OTHER_PROCESS)
{
- if (IsWindow16( msg->hwnd ))
- ERR( "cannot dispatch msg to other process window %x\n", msg->hwnd );
+ if (IsWindow( hwnd ))
+ ERR( "cannot dispatch msg to other process window %x\n", hwnd );
SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return 0;
}
@@ -313,7 +313,7 @@
WIN_ReleasePtr( wndPtr );
if (validate)
{
- ERR( "BeginPaint not called on WM_PAINT for hwnd %04x!\n", msg->hwnd );
+ ERR( "BeginPaint not called on WM_PAINT for hwnd %x!\n", hwnd );
/* Validate the update region to avoid infinite WM_PAINT loop */
RedrawWindow( hwnd, NULL, 0,
RDW_NOFRAME | RDW_VALIDATE | RDW_NOCHILDREN | RDW_NOINTERNALPAINT );
diff --git a/dlls/user/wnd16.c b/dlls/user/wnd16.c
index dd9b283..7ff45a2 100644
--- a/dlls/user/wnd16.c
+++ b/dlls/user/wnd16.c
@@ -333,7 +333,7 @@
{
CURRENT_STACK16->es = USER_HeapSel;
/* don't use WIN_Handle32 here, we don't care about the full handle */
- return IsWindow( WIN_Handle32(hwnd) );
+ return IsWindow( HWND_32(hwnd) );
}
@@ -1494,6 +1494,20 @@
}
+/***********************************************************************
+ * GetInternalWindowPos (USER.460)
+ */
+UINT16 WINAPI GetInternalWindowPos16( HWND16 hwnd, LPRECT16 rectWnd, LPPOINT16 ptIcon )
+{
+ WINDOWPLACEMENT16 wndpl;
+
+ if (!GetWindowPlacement16( hwnd, &wndpl )) return 0;
+ if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
+ if (ptIcon) *ptIcon = wndpl.ptMinPosition;
+ return wndpl.showCmd;
+}
+
+
/**************************************************************************
* SetInternalWindowPos (USER.461)
*/
diff --git a/windows/hook.c b/windows/hook.c
index 4ee2a0d..1517e91 100644
--- a/windows/hook.c
+++ b/windows/hook.c
@@ -1064,7 +1064,6 @@
*/
BOOL16 WINAPI CallMsgFilter16( SEGPTR msg, INT16 code )
{
- if (GetSysModalWindow16()) return FALSE;
if (HOOK_CallHooks16( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) return TRUE;
return HOOK_CallHooks16( WH_MSGFILTER, code, 0, (LPARAM)msg );
}
@@ -1120,7 +1119,6 @@
*/
BOOL WINAPI CallMsgFilterA( LPMSG msg, INT code )
{
- if (GetSysModalWindow16()) return FALSE; /* ??? */
if (HOOK_CallHooksA( WH_SYSMSGFILTER, code, 0, (LPARAM)msg ))
return TRUE;
return HOOK_CallHooksA( WH_MSGFILTER, code, 0, (LPARAM)msg );
@@ -1132,7 +1130,6 @@
*/
BOOL WINAPI CallMsgFilterW( LPMSG msg, INT code )
{
- if (GetSysModalWindow16()) return FALSE; /* ??? */
if (HOOK_CallHooksW( WH_SYSMSGFILTER, code, 0, (LPARAM)msg ))
return TRUE;
return HOOK_CallHooksW( WH_MSGFILTER, code, 0, (LPARAM)msg );
diff --git a/windows/spy.c b/windows/spy.c
index d3be284..881b3e1 100644
--- a/windows/spy.c
+++ b/windows/spy.c
@@ -26,8 +26,6 @@
#include "wingdi.h"
#include "winreg.h"
#include "wownt32.h"
-#include "wine/winuser16.h"
-#include "wine/winbase16.h"
#include "wine/unicode.h"
#include "win.h"
#include "wine/debug.h"
@@ -2272,16 +2270,11 @@
case SPY_SENDMESSAGE16:
case SPY_SENDMESSAGE:
{
- char taskName[30];
- HTASK16 hTask = GetWindowTask16( HWND_16(hWnd) );
+ char taskName[20];
+ DWORD tid = GetWindowThreadProcessId( hWnd, NULL );
- if (hTask == GetCurrentTask()) strcpy( taskName, "self" );
- else if (!hTask) strcpy( taskName, "Wine" );
- else
- {
- sprintf( taskName, "task %04x ???", hTask );
- GetModuleName16( hTask, taskName + 10, sizeof(taskName) - 10 );
- }
+ if (tid == GetCurrentThreadId()) strcpy( taskName, "self" );
+ else sprintf( taskName, "tid %08lx", GetCurrentThreadId() );
if (iFlag == SPY_SENDMESSAGE16)
TRACE("%*s(%04x) %-16s message [%04x] %s sent from %s wp=%04x lp=%08lx\n",
diff --git a/windows/win.c b/windows/win.c
index f8ba77a..714b1ff 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -3144,7 +3144,7 @@
static BOOL16 DRAG_QueryUpdate16( HWND hQueryWnd, SEGPTR spDragInfo )
{
BOOL16 wParam, bResult = 0;
- POINT pt;
+ POINT pt, client_pt;
LPDRAGINFO16 ptrDragInfo = MapSL(spDragInfo);
RECT tempRect;
@@ -3191,8 +3191,10 @@
}
else wParam = 1;
- ScreenToClient16(HWND_16(hQueryWnd),&ptrDragInfo->pt);
-
+ client_pt = pt;
+ ScreenToClient( hQueryWnd, &client_pt );
+ ptrDragInfo->pt.x = client_pt.x;
+ ptrDragInfo->pt.y = client_pt.y;
ptrDragInfo->hScope = HWND_16(hQueryWnd);
bResult = SendMessage16( HWND_16(hQueryWnd), WM_QUERYDROPOBJECT, (WPARAM16)wParam, spDragInfo );
diff --git a/windows/winpos.c b/windows/winpos.c
index cc26357..344a3eb 100644
--- a/windows/winpos.c
+++ b/windows/winpos.c
@@ -29,7 +29,6 @@
#include "controls.h"
#include "user.h"
#include "win.h"
-#include "hook.h"
#include "message.h"
#include "queue.h"
#include "winpos.h"
@@ -856,23 +855,6 @@
/***********************************************************************
- * GetInternalWindowPos (USER.460)
- */
-UINT16 WINAPI GetInternalWindowPos16( HWND16 hwnd, LPRECT16 rectWnd,
- LPPOINT16 ptIcon )
-{
- WINDOWPLACEMENT16 wndpl;
- if (GetWindowPlacement16( hwnd, &wndpl ))
- {
- if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
- if (ptIcon) *ptIcon = wndpl.ptMinPosition;
- return wndpl.showCmd;
- }
- return 0;
-}
-
-
-/***********************************************************************
* GetInternalWindowPos (USER32.@)
*/
UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd,
diff --git a/windows/winproc.c b/windows/winproc.c
index 173143f..58b1d92 100644
--- a/windows/winproc.c
+++ b/windows/winproc.c
@@ -209,7 +209,7 @@
memset(&context, '\0', sizeof(context));
context.SegDs = context.SegEs = SELECTOROF(teb->cur_stack);
- if (!(context.Eax = GetWindowWord16( hwnd, GWL_HINSTANCE ))) context.Eax = context.SegDs;
+ if (!(context.Eax = GetWindowWord( HWND_32(hwnd), GWL_HINSTANCE ))) context.Eax = context.SegDs;
context.SegCs = SELECTOROF(proc);
context.Eip = OFFSETOF(proc);
context.Ebp = OFFSETOF(teb->cur_stack)