summaryrefslogtreecommitdiff
path: root/common/glfw_view.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-09-17 15:29:24 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-09-24 16:14:10 +0200
commitba18c08524cffd3fa03adf49f680f3a80390d61d (patch)
treea97cbbc9a83bc2ad72c63259eaee78572526bfc6 /common/glfw_view.cpp
parent89cd310cf6117586701b1e72fe7c2bf0fbd760db (diff)
downloadqtlocation-mapboxgl-ba18c08524cffd3fa03adf49f680f3a80390d61d.tar.gz
add a callback to stop() to allow running the current thread's event loop
Diffstat (limited to 'common/glfw_view.cpp')
-rw-r--r--common/glfw_view.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/glfw_view.cpp b/common/glfw_view.cpp
index f53090a000..fb54d55f39 100644
--- a/common/glfw_view.cpp
+++ b/common/glfw_view.cpp
@@ -183,7 +183,7 @@ int GLFWView::run() {
glfwWaitEvents();
}
- map->stop();
+ map->stop(glfwWaitEvents);
return 0;
}
@@ -192,6 +192,10 @@ void GLFWView::make_active() {
glfwMakeContextCurrent(window);
}
+void GLFWView::notify() {
+ glfwPostEmptyEvent();
+}
+
void GLFWView::swap() {
glfwPostEmptyEvent();