Commit 2faf2cf9 authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Perform 16/32A/32W message mapping for posted messages.

parent 7b7e2d43
......@@ -2609,7 +2609,7 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
/* we have to keep the message in the queue until it's
* clear that menu loop is not over yet. */
if (!MSG_InternalGetMessage( &msg, msg.hwnd, mt.hOwnerWnd,
if (!MSG_InternalGetMessage( QMSG_WIN32A, &msg, msg.hwnd, mt.hOwnerWnd,
MSGF_MENU, PM_NOREMOVE, !enterIdleSent, &enterIdleSent )) break;
TranslateMessage( &msg );
......
......@@ -13,9 +13,9 @@
extern DWORD MSG_WineStartTicks; /* Ticks at Wine startup */
/* message.c */
extern BOOL MSG_InternalGetMessage( MSG *msg, HWND hwnd,
HWND hwndOwner, WPARAM code,
WORD flags, BOOL sendIdle, BOOL* idleSent );
extern BOOL MSG_InternalGetMessage( int type, MSG *msg, HWND hwnd,
HWND hwndOwner, WPARAM code,
WORD flags, BOOL sendIdle, BOOL* idleSent );
/* timer.c */
extern BOOL TIMER_Init( void );
......
......@@ -15,13 +15,19 @@
/* Message as stored in the queue (contains the extraInfo field) */
typedef struct tagQMSG
{
int type;
MSG msg;
DWORD extraInfo; /* Only in 3.1 */
DWORD extraInfo; /* Only in 3.1 */
struct tagQMSG *nextMsg;
struct tagQMSG *prevMsg;
} QMSG;
#define QMSG_WIN16 0
#define QMSG_WIN32A 1
#define QMSG_WIN32W 2
#define QMSG_HARDWARE 3
typedef struct tagSMSG
{
......@@ -160,7 +166,7 @@ extern void QUEUE_DecTimerCount( HQUEUE16 hQueue );
extern BOOL QUEUE_CreateSysMsgQueue( int size );
extern BOOL QUEUE_DeleteMsgQueue( HQUEUE16 hQueue );
extern HTASK16 QUEUE_GetQueueTask( HQUEUE16 hQueue );
extern BOOL QUEUE_AddMsg( HQUEUE16 hQueue, MSG * msg, DWORD extraInfo );
extern BOOL QUEUE_AddMsg( HQUEUE16 hQueue, int type, MSG * msg, DWORD extraInfo );
extern QMSG* QUEUE_FindMsg( MESSAGEQUEUE * msgQueue, HWND hwnd,
int first, int last );
extern void QUEUE_RemoveMsg( MESSAGEQUEUE * msgQueue, QMSG *qmsg );
......
......@@ -945,7 +945,7 @@ INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
{
EnableWindow( owner, FALSE );
ShowWindow( hwnd, SW_SHOW );
while (MSG_InternalGetMessage(&msg, hwnd, owner, MSGF_DIALOGBOX,
while (MSG_InternalGetMessage(QMSG_WIN32A, &msg, hwnd, owner, MSGF_DIALOGBOX,
PM_REMOVE, !(wndPtr->dwStyle & DS_NOIDLEMSG), NULL ))
{
if (!IsDialogMessageA( hwnd, &msg))
......
......@@ -2045,7 +2045,7 @@ static LONG NC_StartSizeMove( WND* wndPtr, WPARAM16 wParam,
{
while(!hittest)
{
MSG_InternalGetMessage( &msg, 0, 0, MSGF_SIZE, PM_REMOVE, FALSE, NULL );
MSG_InternalGetMessage( QMSG_WIN32A, &msg, 0, 0, MSGF_SIZE, PM_REMOVE, FALSE, NULL );
switch(msg.message)
{
case WM_MOUSEMOVE:
......@@ -2206,7 +2206,7 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam )
{
int dx = 0, dy = 0;
MSG_InternalGetMessage( &msg, 0, 0, MSGF_SIZE, PM_REMOVE, FALSE, NULL );
MSG_InternalGetMessage( QMSG_WIN32A, &msg, 0, 0, MSGF_SIZE, PM_REMOVE, FALSE, NULL );
/* Exit on button-up, Return, or Esc */
if ((msg.message == WM_LBUTTONUP) ||
......@@ -2395,7 +2395,7 @@ static void NC_TrackMinMaxBox95( HWND hwnd, WORD wParam )
do
{
BOOL oldstate = pressed;
MSG_InternalGetMessage( &msg, 0, 0, 0, PM_REMOVE, FALSE, NULL );
MSG_InternalGetMessage( QMSG_WIN32A, &msg, 0, 0, 0, PM_REMOVE, FALSE, NULL );
CONV_POINT32TO16( &msg.pt, &pt16 );
pressed = (NC_HandleNCHitTest( hwnd, pt16 ) == wParam);
......@@ -2445,7 +2445,7 @@ static void NC_TrackMinMaxBox( HWND hwnd, WORD wParam )
do
{
BOOL oldstate = pressed;
MSG_InternalGetMessage( &msg, 0, 0, 0, PM_REMOVE, FALSE, NULL );
MSG_InternalGetMessage( QMSG_WIN32A, &msg, 0, 0, 0, PM_REMOVE, FALSE, NULL );
CONV_POINT32TO16( &msg.pt, &pt16 );
pressed = (NC_HandleNCHitTest( hwnd, pt16 ) == wParam);
......@@ -2501,7 +2501,7 @@ NC_TrackCloseButton95 (HWND hwnd, WORD wParam)
do
{
BOOL oldstate = pressed;
MSG_InternalGetMessage( &msg, 0, 0, 0, PM_REMOVE, FALSE, NULL );
MSG_InternalGetMessage( QMSG_WIN32A, &msg, 0, 0, 0, PM_REMOVE, FALSE, NULL );
CONV_POINT32TO16( &msg.pt, &pt16 );
pressed = (NC_HandleNCHitTest( hwnd, pt16 ) == wParam);
......
......@@ -973,7 +973,7 @@ void QUEUE_ReceiveMessage( MESSAGEQUEUE *queue )
*
* Add a message to the queue. Return FALSE if queue is full.
*/
BOOL QUEUE_AddMsg( HQUEUE16 hQueue, MSG *msg, DWORD extraInfo )
BOOL QUEUE_AddMsg( HQUEUE16 hQueue, int type, MSG *msg, DWORD extraInfo )
{
MESSAGEQUEUE *msgQueue;
QMSG *qmsg;
......@@ -991,6 +991,7 @@ BOOL QUEUE_AddMsg( HQUEUE16 hQueue, MSG *msg, DWORD extraInfo )
EnterCriticalSection( &msgQueue->cSection );
/* Store message */
qmsg->type = type;
qmsg->msg = *msg;
qmsg->extraInfo = extraInfo;
......@@ -1228,6 +1229,7 @@ void hardware_event( UINT message, WPARAM wParam, LPARAM lParam,
msg->pt.x = xPos;
msg->pt.y = yPos;
qmsg->extraInfo = extraInfo;
qmsg->type = QMSG_HARDWARE;
LeaveCriticalSection( &sysMsgQueue->cSection );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment