Added support for xbuttons.

This commit is contained in:
Alexandre Julliard 2005-03-24 19:16:54 +00:00
parent f4767f1424
commit cb7aa8753c
3 changed files with 31 additions and 16 deletions

View File

@ -39,7 +39,7 @@
#include "user.h" #include "user.h"
#define WM_NCMOUSEFIRST WM_NCMOUSEMOVE #define WM_NCMOUSEFIRST WM_NCMOUSEMOVE
#define WM_NCMOUSELAST WM_NCMBUTTONDBLCLK #define WM_NCMOUSELAST (WM_NCMOUSEFIRST+(WM_MOUSELAST-WM_MOUSEFIRST))
enum message_kind { SEND_MESSAGE, POST_MESSAGE }; enum message_kind { SEND_MESSAGE, POST_MESSAGE };
#define NB_MSG_KINDS (POST_MESSAGE+1) #define NB_MSG_KINDS (POST_MESSAGE+1)
@ -1032,6 +1032,13 @@ static void update_input_key_state( struct thread_input *input, const struct mes
case WM_RBUTTONUP: case WM_RBUTTONUP:
set_input_key_state( input, VK_RBUTTON, down ); set_input_key_state( input, VK_RBUTTON, down );
break; break;
case WM_XBUTTONDOWN:
down = 1;
/* fall through */
case WM_XBUTTONUP:
if (msg->wparam == XBUTTON1) set_input_key_state( input, VK_XBUTTON1, down );
else if (msg->wparam == XBUTTON2) set_input_key_state( input, VK_XBUTTON2, down );
break;
case WM_KEYDOWN: case WM_KEYDOWN:
case WM_SYSKEYDOWN: case WM_SYSKEYDOWN:
down = 1; down = 1;

View File

@ -1132,7 +1132,7 @@ LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam )
{ {
WORD msg = HIWORD( lParam ); WORD msg = HIWORD( lParam );
if ((msg == WM_LBUTTONDOWN) || (msg == WM_MBUTTONDOWN) || if ((msg == WM_LBUTTONDOWN) || (msg == WM_MBUTTONDOWN) ||
(msg == WM_RBUTTONDOWN)) (msg == WM_RBUTTONDOWN) || (msg == WM_XBUTTONDOWN))
MessageBeep(0); MessageBeep(0);
} }
break; break;

View File

@ -160,17 +160,22 @@ static const char * const MessageTypeNames[SPY_MAX_MSGNUM + 1] =
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* 0x00A0 */ /* 0x00A0 */
"WM_NCMOUSEMOVE", /* 0x00A0 */ "WM_NCMOUSEMOVE", /* 0x00a0 */
"WM_NCLBUTTONDOWN", /* 0x00A1 */ "WM_NCLBUTTONDOWN", /* 0x00a1 */
"WM_NCLBUTTONUP", /* 0x00A2 */ "WM_NCLBUTTONUP", /* 0x00a2 */
"WM_NCLBUTTONDBLCLK", /* 0x00A3 */ "WM_NCLBUTTONDBLCLK", /* 0x00a3 */
"WM_NCRBUTTONDOWN", /* 0x00A4 */ "WM_NCRBUTTONDOWN", /* 0x00a4 */
"WM_NCRBUTTONUP", /* 0x00A5 */ "WM_NCRBUTTONUP", /* 0x00a5 */
"WM_NCRBUTTONDBLCLK", /* 0x00A6 */ "WM_NCRBUTTONDBLCLK", /* 0x00a6 */
"WM_NCMBUTTONDOWN", /* 0x00A7 */ "WM_NCMBUTTONDOWN", /* 0x00a7 */
"WM_NCMBUTTONUP", /* 0x00A8 */ "WM_NCMBUTTONUP", /* 0x00a8 */
"WM_NCMBUTTONDBLCLK", /* 0x00A9 */ "WM_NCMBUTTONDBLCLK", /* 0x00a9 */
NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x00aa */
"WM_NCXBUTTONDOWN", /* 0x00ab */
"WM_NCXBUTTONUP", /* 0x00ac */
"WM_NCXBUTTONDBLCLK", /* 0x00ad */
NULL, /* 0x00ae */
NULL, /* 0x00af */
/* 0x00B0 - Win32 Edit controls */ /* 0x00B0 - Win32 Edit controls */
"EM_GETSEL", /* 0x00b0 */ "EM_GETSEL", /* 0x00b0 */
@ -422,7 +427,10 @@ static const char * const MessageTypeNames[SPY_MAX_MSGNUM + 1] =
"WM_MBUTTONUP", /* 0x0208 */ "WM_MBUTTONUP", /* 0x0208 */
"WM_MBUTTONDBLCLK", /* 0x0209 */ "WM_MBUTTONDBLCLK", /* 0x0209 */
"WM_MOUSEWHEEL", /* 0x020A */ "WM_MOUSEWHEEL", /* 0x020A */
NULL, NULL, NULL, NULL, NULL, "WM_XBUTTONDOWN", /* 0x020B */
"WM_XBUTTONUP", /* 0x020C */
"WM_XBUTTONDBLCLK", /* 0x020D */
NULL, NULL,
"WM_PARENTNOTIFY", /* 0x0210 */ "WM_PARENTNOTIFY", /* 0x0210 */
"WM_ENTERMENULOOP", /* 0x0211 */ "WM_ENTERMENULOOP", /* 0x0211 */
@ -1047,8 +1055,8 @@ static const char * const VK_KeyNames[SPY_MAX_VKKEYSNUM + 1] =
"VK_RBUTTON", /* 0x02 */ "VK_RBUTTON", /* 0x02 */
"VK_CANCEL", /* 0x03 */ "VK_CANCEL", /* 0x03 */
"VK_MBUTTON", /* 0x04 */ "VK_MBUTTON", /* 0x04 */
NULL, /* 0x05 */ "VK_XBUTTON1", /* 0x05 */
NULL, /* 0x06 */ "VK_XBUTTON2", /* 0x06 */
NULL, /* 0x07 */ NULL, /* 0x07 */
"VK_BACK", /* 0x08 */ "VK_BACK", /* 0x08 */
"VK_TAB", /* 0x09 */ "VK_TAB", /* 0x09 */