summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r--platform/x11/os_x11.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 4606a90835..d2650684c3 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -6,6 +6,7 @@
/* http://www.godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -1277,12 +1278,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 +1901,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();