summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/x11/display_server_x11.cpp
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2023-10-04 19:20:01 +0200
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2024-02-05 23:30:15 +0100
commit2235a1cbd06440911c2679204dbc8b7d47b7e83f (patch)
tree5d8177bd57a670fe49d59f88847ebbf56d305ed1 /platform/linuxbsd/x11/display_server_x11.cpp
parentd3352813ea44447bfbf135efdec23acc4d1d3f89 (diff)
downloadredot-engine-2235a1cbd06440911c2679204dbc8b7d47b7e83f.tar.gz
Add screen-related attributes to mouse input events
Diffstat (limited to 'platform/linuxbsd/x11/display_server_x11.cpp')
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp
index 20e2e897f2..22f0a8b1db 100644
--- a/platform/linuxbsd/x11/display_server_x11.cpp
+++ b/platform/linuxbsd/x11/display_server_x11.cpp
@@ -4524,6 +4524,7 @@ void DisplayServerX11::process_events() {
sd->set_index(index);
sd->set_position(pos);
sd->set_relative(pos - curr_pos_elem->value);
+ sd->set_relative_screen_position(sd->get_relative());
Input::get_singleton()->parse_input_event(sd);
curr_pos_elem->value = pos;
@@ -4945,8 +4946,10 @@ void DisplayServerX11::process_events() {
mm->set_position(pos);
mm->set_global_position(pos);
mm->set_velocity(Input::get_singleton()->get_last_mouse_velocity());
+ mm->set_screen_velocity(mm->get_velocity());
mm->set_relative(rel);
+ mm->set_relative_screen_position(rel);
last_mouse_pos = pos;