Skip to content

Commit e5efde9

Browse files
committed
[Windows] Reject WM_POINTER(UP/DOWN) messages for non pen pointer type.
1 parent 3978628 commit e5efde9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

platform/windows/display_server_windows.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4250,6 +4250,16 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
42504250
break;
42514251
}
42524252

4253+
uint32_t pointer_id = LOWORD(wParam);
4254+
POINTER_INPUT_TYPE pointer_type = PT_POINTER;
4255+
if (!win8p_GetPointerType(pointer_id, &pointer_type)) {
4256+
break;
4257+
}
4258+
4259+
if (pointer_type != PT_PEN) {
4260+
break;
4261+
}
4262+
42534263
Ref<InputEventMouseButton> mb;
42544264
mb.instantiate();
42554265
mb->set_window_id(window_id);

0 commit comments

Comments
 (0)