special hande extra input messages in desktop procedure

This commit is contained in:
Vincent Wei
2019-06-13 18:35:56 +08:00
parent a9d7effc11
commit cf2ae944b7
3 changed files with 55 additions and 1 deletions
+41
View File
@@ -1863,8 +1863,49 @@ extern DWORD __mg_interval_time;
*/
#define MSG_EXIN_TABLET_PAD_STRIP 0x0096
/**
* \def MSG_EXIN_USER_BEGIN
* \brief Indicates that the beginning of a user-defined extra input event.
*
* \code
* MSG_EXIN_USER_BEGIN
* WPARAM wParam;
* LPARAM lParam;
* \endcode
*
* \param wParam The first parameter of this message.
* \param lParam The second parameter of this message.
*/
#define MSG_EXIN_USER_BEGIN 0x009A
/**
* \def MSG_EXIN_USER_UPDATE
* \brief Indicates that the update of a user-defined extra input event.
*
* \code
* MSG_EXIN_USER_UPDATE
* WPARAM wParam;
* LPARAM lParam;
* \endcode
*
* \param wParam The first parameter of this message.
* \param lParam The second parameter of this message.
*/
#define MSG_EXIN_USER_UPDATE 0x009B
/**
* \def MSG_EXIN_USER_END
* \brief Indicates that the end of a user-defined extra input event.
*
* \code
* MSG_EXIN_USER_END
* WPARAM wParam;
* LPARAM lParam;
* \endcode
*
* \param wParam The first parameter of this message.
* \param lParam The second parameter of this message.
*/
#define MSG_EXIN_USER_END 0x009C
#define MSG_LASTEXTRAINPUTMSG 0x009F
+4
View File
@@ -2000,6 +2000,10 @@ LRESULT DesktopWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if (message == MSG_CHAR && active_mainwnd) {
PostMessage ((HWND)active_mainwnd, message, wParam, lParam);
}
// VW: Since 4.0.0 for extra input messages.
else if (message >= MSG_FIRSTEXTRAINPUTMSG && message <= MSG_LASTEXTRAINPUTMSG) {
PostMessage ((HWND)active_mainwnd, message, wParam, lParam);
}
else if (message >= MSG_FIRSTKEYMSG && message <= MSG_LASTKEYMSG) {
if (do_drag_drop_window (message, 0, 0))
+10 -1
View File
@@ -3501,7 +3501,6 @@ static int srvSesseionMessageHandler (int message, WPARAM wParam, LPARAM lParam)
return 0;
}
LRESULT DesktopWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int flags, x, y;
@@ -3509,6 +3508,16 @@ LRESULT DesktopWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if (message >= MSG_FIRSTWINDOWMSG && message <= MSG_LASTWINDOWMSG) {
return dskWindowMessageHandler (message, (PMAINWIN)wParam, lParam);
}
// VW: Since 4.0.0 for extra input messages.
else if (message >= MSG_FIRSTEXTRAINPUTMSG && message <= MSG_LASTEXTRAINPUTMSG) {
if (mgIsServer && __mg_zorder_info->active_win) {
__mg_post_msg_by_znode (__mg_zorder_info,
__mg_zorder_info->active_win, message,
wParam, lParam);
}
PostMessage ((HWND)active_mainwnd, message, wParam, lParam);
}
else if (message >= MSG_FIRSTKEYMSG && message <= MSG_LASTKEYMSG) {
if (mgIsServer) {
if (wParam == SCANCODE_PRINTSCREEN && message == MSG_KEYDOWN) {