From b48b0c1296eb2874771ecee455cb6f8515202d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 24 Jun 2018 02:21:17 +0200 Subject: [PATCH] Platform: properly redraw GlfwApplication restored from minimize. Lots of things unfinished here. --- src/Magnum/Platform/GlfwApplication.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Magnum/Platform/GlfwApplication.cpp b/src/Magnum/Platform/GlfwApplication.cpp index fcfd93e5a..f3f99c413 100644 --- a/src/Magnum/Platform/GlfwApplication.cpp +++ b/src/Magnum/Platform/GlfwApplication.cpp @@ -344,6 +344,10 @@ bool GlfwApplication::tryCreate(const Configuration& configuration, const GLConf void GlfwApplication::setupCallbacks() { glfwSetWindowUserPointer(_window, this); + glfwSetWindowRefreshCallback(_window, [](GLFWwindow* const window){ + /* Properly redraw after the window is restored from minimized state */ + static_cast(glfwGetWindowUserPointer(window))->drawEvent(); + }); glfwSetFramebufferSizeCallback(_window, [](GLFWwindow* const window, const int w, const int h) { static_cast(glfwGetWindowUserPointer(window))->viewportEvent({w, h}); });