diff options
Diffstat (limited to 'common/glfw_view.cpp')
-rw-r--r-- | common/glfw_view.cpp | 9 |
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(); |