summaryrefslogtreecommitdiff
path: root/platform/linuxbsd/display_server_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linuxbsd/display_server_x11.cpp')
-rw-r--r--platform/linuxbsd/display_server_x11.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index 68bd5e8421..318d014ee5 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -365,21 +365,6 @@ void DisplayServerX11::mouse_warp_to_position(const Point2i &p_to) {
}
Point2i DisplayServerX11::mouse_get_position() const {
- int root_x, root_y;
- int win_x, win_y;
- unsigned int mask_return;
- Window window_returned;
-
- Bool result = XQueryPointer(x11_display, RootWindow(x11_display, DefaultScreen(x11_display)), &window_returned,
- &window_returned, &root_x, &root_y, &win_x, &win_y,
- &mask_return);
- if (result == True) {
- return Point2i(root_x, root_y);
- }
- return Point2i();
-}
-
-Point2i DisplayServerX11::mouse_get_absolute_position() const {
int number_of_screens = XScreenCount(x11_display);
for (int i = 0; i < number_of_screens; i++) {
Window root, child;
@@ -3416,7 +3401,7 @@ void DisplayServerX11::process_events() {
if (mouse_mode_grab) {
for (const KeyValue<WindowID, WindowData> &E : windows) {
- //dear X11, I try, I really try, but you never work, you do whathever you want.
+ //dear X11, I try, I really try, but you never work, you do whatever you want.
if (mouse_mode == MOUSE_MODE_CAPTURED) {
// Show the cursor if we're in captured mode so it doesn't look weird.
XUndefineCursor(x11_display, E.value.x11_window);
@@ -3648,7 +3633,7 @@ void DisplayServerX11::process_events() {
mm->set_position(pos);
mm->set_global_position(pos);
Input::get_singleton()->set_mouse_position(pos);
- mm->set_speed(Input::get_singleton()->get_last_mouse_speed());
+ mm->set_velocity(Input::get_singleton()->get_last_mouse_velocity());
mm->set_relative(rel);
@@ -3678,7 +3663,7 @@ void DisplayServerX11::process_events() {
mm->set_window_id(E.key);
mm->set_position(pos_focused);
mm->set_global_position(pos_focused);
- mm->set_speed(Input::get_singleton()->get_last_mouse_speed());
+ mm->set_velocity(Input::get_singleton()->get_last_mouse_velocity());
Input::get_singleton()->parse_input_event(mm);
break;