This commit is contained in:
Vincent Wei
2020-02-25 19:07:45 +08:00
parent 91246c8771
commit f59fe557f3
3 changed files with 15 additions and 9 deletions

View File

@@ -147,4 +147,6 @@ tab2space() {
# sed -i 's/\<GetMainVirtWindowById\>/GetHostedById/g' `grep '\<GetMainVirtWindowById\>' -rl include/ src/`
sed -i 's/\<__mg_os_start_time_ms\>/__mg_os_start_time/g' `grep '\<__mg_os_start_time_ms\>' -rl include/ src/`
exit 0

View File

@@ -152,6 +152,8 @@ int GUIAPI GetSockFD2Server (void)
return conn_fd;
}
#include "debug.h"
static void process_socket_message (MSG *msg)
{
if (msg->message == MSG_UPDATECLIWIN &&
@@ -161,8 +163,9 @@ static void process_socket_message (MSG *msg)
LOSWORD(msg->lParam), HISWORD(msg->lParam));
}
else {
if (msg->hwnd == 0) {
if (msg->hwnd == HWND_NULL) {
msg->hwnd = HWND_DESKTOP;
//dump_message (msg, __func__);
QueueDeskMessage (msg);
}
else if (__mg_client_check_hwnd (msg->hwnd, __mg_client_id)) {
@@ -468,8 +471,9 @@ BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
msg.lParam = MAKELONG(mouse_x, mouse_y);
kernel_QueueMessage (msg_queue, &msg);
n++;
}
//dump_message (&msg, __func__);
}
}
/* Since 5.0.0: always check timer */
@@ -499,7 +503,7 @@ BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
else { /* process event from server */
if (OnTrylockClientReq && OnUnlockClientReq)
OnUnlockClientReq();
process_socket_message(&Msg);
process_socket_message (&Msg);
}
}

View File

@@ -3462,7 +3462,7 @@ static int srvPreMouseMessageHandler (UINT message, WPARAM flags, int x, int y)
if (Msg.message == MSG_MOUSEMOVE) {
LOCK_MOUSEMOVE_SEM();
SHAREDRES_MOUSEMOVECLIENT = target_client;
++ SHAREDRES_MOUSEMOVESERIAL;
SHAREDRES_MOUSEMOVESERIAL++;
UNLOCK_MOUSEMOVE_SEM();
}
else {
@@ -4540,8 +4540,11 @@ static LRESULT DesktopWinProc (HWND hWnd, UINT message,
dskMouseMessageHandler (message, flags, x, y);
}
#ifdef _MGHAVE_MENU
else if (sg_ptmi)
PopupMenuTrackProc (sg_ptmi, message, x, y);
else if (sg_ptmi) {
if (PopupMenuTrackProc (sg_ptmi, message, x, y) == 0)
return 0;
dskMouseMessageHandler (message, flags, x, y);
}
#endif
else
dskMouseMessageHandler (message, flags, x, y);
@@ -4707,9 +4710,6 @@ static LRESULT DesktopWinProc (HWND hWnd, UINT message,
}
#endif /* deprecated code */
_WRN_PRINTF ("got MSG_TIMER message for desktop (%lu)\n",
__mg_tick_counter);
dskOnTimer ();
break;
}