summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/headless_view.cpp4
-rw-r--r--src/map/map.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/common/headless_view.cpp b/common/headless_view.cpp
index e52bbf8b96..61531bfd65 100644
--- a/common/headless_view.cpp
+++ b/common/headless_view.cpp
@@ -107,13 +107,13 @@ void HeadlessView::resize(uint16_t width, uint16_t height, float pixelRatio) {
}
return;
}
+
+ make_inactive();
#endif
#if MBGL_USE_GLX
x_pixmap = XCreatePixmap(x_display, DefaultRootWindow(x_display), width, height, 32);
glx_pixmap = glXCreateGLXPixmap(x_display, x_info, x_pixmap);
-
- make_active();
#endif
}
diff --git a/src/map/map.cpp b/src/map/map.cpp
index 6db6fa2808..ad8749ff08 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -186,7 +186,9 @@ void Map::terminate(uv_async_t *async, int status) {
#pragma mark - Setup
void Map::setup() {
+ view.make_active();
painter.setup();
+ view.make_inactive();
}
void Map::setStyleURL(const std::string &url) {