[目次] (https://qiita.com/Yutaka_Aoki/items/9d38ea98406f4096435b)
Inside Wine; WM_MOUSEMOVE メッセージの生成
通常時、WM_MOUSEMOVE がキューへ追加される時の実行経路
X11DRV_MsgWaitForMultipleObjectsEx()
--> process_events()
---> call_event_handler( Display *display, XEvent *event )
---> handlers[event->type]( hwnd, event );
event->type = MotionNotify (6)
---> X11DRV_MotionNotify( HWND hwnd, XEvent *xev )
XMotionEvent *event = &xev->xmotion;
INPUT input;
---> send_mouse_input( hwnd, event->window, event->state, &input );
---> __wine_send_input( HWND hwnd, const INPUT *input )
---> send_hardware_message( hwnd, input, 0 );
SERVER_START_REQ( send_hardware_message ) {
switch (input->type)
case INPUT_MOUSE:
}
---> wine_server_call( req );
---> DECL_HANDLER(send_hardware_message)
(send a hardware message to a thread queue)
---> queue_mouse_message( desktop, req->win, &req->input, req->flags, sender );
messages[MOUSEEVENTF_MOVE (1)] = WM_MOUSEMOVE
---> queue_hardware_message() : WM_MOUSEMOVE
list_add_tail( &input->msg_list, &msg->entry );
set_queue_bits( thread->queue, get_hardware_msg_bit(msg) );
--->
if (!always_queue || merge_message( input, msg )) free_message( msg );
else {
msg->unique_id = 0; /* will be set once we return it to the app */
list_add_tail( &input->msg_list, &msg->entry );
set_queue_bits( thread->queue, get_hardware_msg_bit(msg) );
}
WM_NCMOUSEMOVE は WM_MOUSEMOVE から修正される
PeekMessageW() または GetMessageW() の中で、hittest が HTCLIENT 以外
の場合は、WM_MOUSEMOVE が WM_NCMOUSEMOVE に修正される :
PeekMessageW() または、GetMessageW()
---> peek_message()
---> switch(info.type)
case MSG_HARDWARE :
---> process_hardware_message()
---> process_mouse_message() {
if (hittest != HTCLIENT) {
message += WM_NCMOUSEMOVE - WM_MOUSEMOVE;
wparam = hittest;
}
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ
aaa
あああ