summaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-08-06 12:32:02 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-08-06 12:32:02 +0200
commite693ff814aacadd876f54a5ef5a18d3f6ce85bc8 (patch)
tree908c989eb9102332be052b124a32f9696eabab98 /platform
parentc81aa6e1fc8d22889e5630bfa8d0d577ff4486a0 (diff)
parente5efde9481217d65adf00c435abf52e8e75b9388 (diff)
downloadredot-engine-e693ff814aacadd876f54a5ef5a18d3f6ce85bc8.tar.gz
Merge pull request #95155 from bruvzg/win_pen_checks
[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 0a7f3157f3..7e368b4c1e 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -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);