[Windows] Reject WM_POINTER(UP/DOWN) messages for non pen pointer type.

This commit is contained in:
bruvzg 2024-08-04 20:07:14 +03:00
parent 3978628c6c
commit e5efde9481
No known key found for this signature in database
GPG Key ID: 7960FCF39844EC38
1 changed files with 10 additions and 0 deletions

View File

@ -4250,6 +4250,16 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
break; break;
} }
uint32_t pointer_id = LOWORD(wParam);
POINTER_INPUT_TYPE pointer_type = PT_POINTER;
if (!win8p_GetPointerType(pointer_id, &pointer_type)) {
break;
}
if (pointer_type != PT_PEN) {
break;
}
Ref<InputEventMouseButton> mb; Ref<InputEventMouseButton> mb;
mb.instantiate(); mb.instantiate();
mb->set_window_id(window_id); mb->set_window_id(window_id);