summaryrefslogtreecommitdiff
path: root/common/glfw_view.cpp
diff options
context:
space:
mode:
authorMike Morris <michael.patrick.morris@gmail.com>2014-09-10 18:53:20 -0400
committerMike Morris <michael.patrick.morris@gmail.com>2014-09-10 18:53:20 -0400
commit15564b81a37e097b52d1751b99dc91d36d37d66e (patch)
tree521a1949a89e55e6dbfb0dd7080e5bcdab1aac95 /common/glfw_view.cpp
parent4316d2c40585e3d0dcdb25fa6f2341531025e20e (diff)
parent7a4c914d05cab81ca55ac3cde478997c6d32477e (diff)
downloadqtlocation-mapboxgl-15564b81a37e097b52d1751b99dc91d36d37d66e.tar.gz
Merge branch 'fix-context-shutdown-merge' into libuv-0.10-fix-context-shutdown
Conflicts: src/map/map.cpp
Diffstat (limited to 'common/glfw_view.cpp')
-rw-r--r--common/glfw_view.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/common/glfw_view.cpp b/common/glfw_view.cpp
index f53090a000..0908786bb6 100644
--- a/common/glfw_view.cpp
+++ b/common/glfw_view.cpp
@@ -8,7 +8,10 @@ GLFWView::GLFWView(bool fullscreen) : fullscreen(fullscreen) {
#endif
}
-GLFWView::~GLFWView() { glfwTerminate(); }
+GLFWView::~GLFWView() {
+ map->terminate();
+ glfwTerminate();
+}
void GLFWView::initialize(mbgl::Map *map) {
View::initialize(map);
@@ -192,6 +195,10 @@ void GLFWView::make_active() {
glfwMakeContextCurrent(window);
}
+void GLFWView::make_inactive() {
+ glfwMakeContextCurrent(nullptr);
+}
+
void GLFWView::swap() {
glfwPostEmptyEvent();