Skip to content

Commit

Permalink
[Windows] Reject WM_POINTER(UP/DOWN) messages for non pen pointer type.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruvzg committed Aug 4, 2024
1 parent 3978628 commit e5efde9
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 @@ -4250,6 +4250,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 e5efde9

Please sign in to comment.