summaryrefslogtreecommitdiff
path: root/platform/windows
diff options
context:
space:
mode:
authorSergey Pusnei <sergey.pusnei@gmail.com>2017-03-27 21:37:23 -0400
committerSergey Pusnei <sergey.pusnei@gmail.com>2017-03-28 19:18:40 -0400
commitc79e998d1f12b281530b15d3015e7128418c8a60 (patch)
treefe6d6505feb14da32efd69a104b27c372af8bfd9 /platform/windows
parentd4740a98537b1e7dcb6fb48176abdebe27eee83c (diff)
8145 - Mouse Position is unknown until first mouse event on X11 & Win
- X11 update input->pos on EnterNotify - X11 & Win call first-time events processing before main initialization
Diffstat (limited to 'platform/windows')
-rw-r--r--platform/windows/os_windows.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index f1a9ba5598..83a6aa6079 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -2167,6 +2167,9 @@ 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();