Revert "8145 - Mouse Position is unknown until first mouse event on X11 & Win"

This reverts commit e5d63aaece.
Same reasoning as #8291.
This commit is contained in:
Rémi Verschelde 2017-04-08 11:28:25 +02:00
parent 2491754de7
commit 7f32db5ac9
2 changed files with 1 additions and 11 deletions

View File

@ -2177,9 +2177,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();

View File

@ -1283,12 +1283,8 @@ void OS_X11::process_xevents() {
if (main_loop && mouse_mode != MOUSE_MODE_CAPTURED)
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;
@ -1898,9 +1894,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();