summaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2024-08-04 20:07:14 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2024-08-04 20:07:14 +0300
commite5efde9481217d65adf00c435abf52e8e75b9388 (patch)
tree6a5c70bacc7bc45bfdcb42452d39c797604b75b3 /platform
parent3978628c6cc1227250fc6ed45c8d854d24c30c30 (diff)
downloadredot-engine-e5efde9481217d65adf00c435abf52e8e75b9388.tar.gz
[Windows] Reject WM_POINTER(UP/DOWN) messages for non pen pointer type.
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/display_server_windows.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index 36f3f632d5..8ebb84f883 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -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);