diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-04-06 13:08:42 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-06 13:08:42 -0300 |
commit | ce948ed63bb347cafd3ad0b0fd5e238acdbf7d33 (patch) | |
tree | f58b39797522146f371c1cf3ede508af6e5bf8b2 /platform | |
parent | 0ede0302ba15b672b4dc50d04f9eb737ff3b3dc3 (diff) |
Revert "8145 - Mouse Position is unknown until first mouse event on X11"
Diffstat (limited to 'platform')
-rw-r--r-- | platform/windows/os_windows.cpp | 3 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 9 |
2 files changed, 1 insertions, 11 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 992e50a2e6..cfc97d57da 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2193,9 +2193,6 @@ void OS_Windows::run() { if (!main_loop) return; - // Process all events before the main initialization so the cursor will get initialized properly - process_events(); // get rid of pending events - main_loop->init(); uint64_t last_ticks = get_ticks_usec(); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 4606a90835..6aeab21c7f 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1277,12 +1277,8 @@ void OS_X11::process_xevents() { case EnterNotify: { if (main_loop && !mouse_mode_grab) main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_ENTER); - if (input) { - // Update mouse position. It is triggered before mouse motion. - Point2i pos(event.xmotion.x, event.xmotion.y); - input->set_mouse_pos(pos); + if (input) input->set_mouse_in_window(true); - } } break; case FocusIn: minimized = false; @@ -1904,9 +1900,6 @@ void OS_X11::run() { if (!main_loop) return; - // Process all events before the main initialization so the cursor will get initialized properly - process_xevents(); // get rid of pending events - main_loop->init(); //uint64_t last_ticks=get_ticks_usec(); |