diff options
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r-- | platform/linuxbsd/wayland/SCsub | 8 | ||||
-rw-r--r-- | platform/linuxbsd/wayland/wayland_thread.cpp | 4 | ||||
-rw-r--r-- | platform/linuxbsd/x11/display_server_x11.cpp | 3 |
3 files changed, 11 insertions, 4 deletions
diff --git a/platform/linuxbsd/wayland/SCsub b/platform/linuxbsd/wayland/SCsub index 99b7349dbe..910ac29b5e 100644 --- a/platform/linuxbsd/wayland/SCsub +++ b/platform/linuxbsd/wayland/SCsub @@ -11,14 +11,14 @@ if env["use_sowrap"]: WAYLAND_BUILDERS_SOWRAP = { "WAYLAND_API_HEADER": Builder( action=Action( - "wayland-scanner -c client-header < ${SOURCE} | sed 's:wayland-client-core\.h:../dynwrappers/wayland-client-core-so_wrap\.h:' > ${TARGET}", + r"wayland-scanner -c client-header < ${SOURCE} | sed 's:wayland-client-core\.h:../dynwrappers/wayland-client-core-so_wrap\.h:' > ${TARGET}", 'Generating Wayland client header: "${TARGET}"', ), single_source=True, ), "WAYLAND_API_CODE": Builder( action=Action( - "wayland-scanner -c private-code < ${SOURCE} | sed 's:wayland-util\.h:../dynwrappers/wayland-client-core-so_wrap\.h:' > ${TARGET}", + r"wayland-scanner -c private-code < ${SOURCE} | sed 's:wayland-util\.h:../dynwrappers/wayland-client-core-so_wrap\.h:' > ${TARGET}", 'Generating Wayland protocol marshaling code: "${TARGET}"', ), single_source=True, @@ -29,14 +29,14 @@ else: WAYLAND_BUILDERS = { "WAYLAND_API_HEADER": Builder( action=Action( - "wayland-scanner -c client-header < ${SOURCE} > ${TARGET}", + r"wayland-scanner -c client-header < ${SOURCE} > ${TARGET}", 'Generating Wayland client header: "${TARGET}"', ), single_source=True, ), "WAYLAND_API_CODE": Builder( action=Action( - "wayland-scanner -c private-code < ${SOURCE} > ${TARGET}", + r"wayland-scanner -c private-code < ${SOURCE} > ${TARGET}", 'Generating Wayland protocol marshaling code: "${TARGET}"', ), single_source=True, diff --git a/platform/linuxbsd/wayland/wayland_thread.cpp b/platform/linuxbsd/wayland/wayland_thread.cpp index 0e9c3fb776..ae1d96a3b1 100644 --- a/platform/linuxbsd/wayland/wayland_thread.cpp +++ b/platform/linuxbsd/wayland/wayland_thread.cpp @@ -1514,6 +1514,8 @@ void WaylandThread::_wl_pointer_on_frame(void *data, struct wl_pointer *wl_point mm->set_relative(pd.position - old_pd.position); mm->set_velocity((Vector2)pos_delta / time_delta); } + mm->set_relative_screen_position(mm->get_relative()); + mm->set_screen_velocity(mm->get_velocity()); Ref<InputEventMessage> msg; msg.instantiate(); @@ -2411,11 +2413,13 @@ void WaylandThread::_wp_tablet_tool_on_frame(void *data, struct zwp_tablet_tool_ mm->set_pen_inverted(td.is_eraser); mm->set_relative(td.position - old_td.position); + mm->set_relative_screen_position(mm->get_relative()); // FIXME: Stop doing this to calculate speed. // FIXME2: It has been done, port this from the pointer logic once this works again. Input::get_singleton()->set_mouse_position(td.position); mm->set_velocity(Input::get_singleton()->get_last_mouse_velocity()); + mm->set_screen_velocity(mm->get_velocity()); Ref<InputEventMessage> inputev_msg; inputev_msg.instantiate(); diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index 93d528bab6..c0937b6d4f 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; |