summaryrefslogtreecommitdiff
path: root/macosx
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-02-21 12:05:27 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-02-21 12:05:27 +0100
commitbd2d865fc474f752b48b88b4b8fd2c8eb307f301 (patch)
treeec0578b45305f72796b5557204ac6a37bfd6f371 /macosx
parent66a2c994ac66d937aa7e5f5674f772ca9db551a2 (diff)
downloadqtlocation-mapboxgl-bd2d865fc474f752b48b88b4b8fd2c8eb307f301.tar.gz
trigger a bogus mouse move event to interrupt glfwWaitEvents()
see https://github.com/glfw/glfw/issues/218
Diffstat (limited to 'macosx')
-rw-r--r--macosx/main.mm3
1 files changed, 3 insertions, 0 deletions
diff --git a/macosx/main.mm b/macosx/main.mm
index 7c2f0cc1ec..18229f9f4f 100644
--- a/macosx/main.mm
+++ b/macosx/main.mm
@@ -227,6 +227,9 @@ namespace platform {
void restart(void *) {
mapView->dirty = true;
+ CGEventRef event = CGEventCreate(NULL);
+ CGEventSetType(event, kCGEventMouseMoved);
+ [[NSApplication sharedApplication] postEvent: [NSEvent eventWithCGEvent:event] atStart:NO];
}
void request_http(std::string url, std::function<void(Response&)> background_function, std::function<void()> foreground_callback) {