diff --git a/include/window.hpp b/include/window.hpp index e0aaa382..0700a1d5 100644 --- a/include/window.hpp +++ b/include/window.hpp @@ -75,7 +75,7 @@ struct Window { std::map> imageCache; std::map> svgCache; - Window(); + Window(void* handle = NULL); ~Window(); void run(); /** Takes a screenshot of each module */ diff --git a/src/window.cpp b/src/window.cpp index 789c9614..42bb5700 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -214,7 +214,7 @@ static void errorCallback(int error, const char* description) { WARN("GLFW error %d: %s", error, description); } -Window::Window() { +Window::Window(void* handle) { internal = new Internal; int err; @@ -235,6 +235,9 @@ Window::Window() { glfwWindowHint(GLFW_COCOA_RETINA_FRAMEBUFFER, GLFW_TRUE); #endif + if (handle) + glfwWindowHintPointer(GLFW_NATIVE_PARENT_HANDLE, handle); + // Create window win = glfwCreateWindow(800, 600, "", NULL, NULL); if (!win) {