Skip to content

Commit e693ff8

Browse files
committed
Merge pull request #95155 from bruvzg/win_pen_checks
[Windows] Reject `WM_POINTER(UP/DOWN)` messages for non pen pointer type.
2 parents c81aa6e + e5efde9 commit e693ff8

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
@@ -4253,6 +4253,16 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
42534253
break;
42544254
}
42554255

4256+
uint32_t pointer_id = LOWORD(wParam);
4257+
POINTER_INPUT_TYPE pointer_type = PT_POINTER;
4258+
if (!win8p_GetPointerType(pointer_id, &pointer_type)) {
4259+
break;
4260+
}
4261+
4262+
if (pointer_type != PT_PEN) {
4263+
break;
4264+
}
4265+
42564266
Ref<InputEventMouseButton> mb;
42574267
mb.instantiate();
42584268
mb->set_window_id(window_id);

0 commit comments

Comments
 (0)