Skip to content

Commit

Permalink
Merge pull request #95155 from bruvzg/win_pen_checks
Browse files Browse the repository at this point in the history
[Windows] Reject `WM_POINTER(UP/DOWN)` messages for non pen pointer type.
  • Loading branch information
akien-mga committed Aug 6, 2024
2 parents c81aa6e + e5efde9 commit e693ff8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions platform/windows/display_server_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4253,6 +4253,16 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
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;
mb.instantiate();
mb->set_window_id(window_id);
Expand Down

0 comments on commit e693ff8

Please sign in to comment.