diff --git a/dgl/src/WindowPrivateData.cpp b/dgl/src/WindowPrivateData.cpp index 5ed30ba6..302d3ac4 100644 --- a/dgl/src/WindowPrivateData.cpp +++ b/dgl/src/WindowPrivateData.cpp @@ -303,6 +303,7 @@ void Window::PrivateData::hide() void Window::PrivateData::close() { DGL_DBG("Window close\n"); + // DGL_DBGp("Window close DBG %i %i %p\n", isEmbed, isClosed, appData); if (isEmbed || isClosed) return; @@ -531,6 +532,9 @@ void Window::PrivateData::onPuglFocus(const bool focus, const CrossingMode mode) { DGL_DBGp("onPuglFocus : %i %i\n", focus, mode); + if (isClosed) + return; + if (modal.child != nullptr) return modal.child->focus(); diff --git a/tests/Makefile b/tests/Makefile index 7c6e2d30..66d5f84e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -33,7 +33,7 @@ ifeq ($(HAVE_STUB),true) UNIT_TESTS += Window.stub endif ifeq ($(HAVE_VULKAN),true) -UNIT_TESTS += Window.vulkan +UNIT_TESTS += Window.vulkan endif MANUAL_TARGETS = $(MANUAL_TESTS:%=../build/tests/%$(APP_EXT)) @@ -144,5 +144,9 @@ clean: -include ../build/tests/Demo.cpp.cairo.d -include ../build/tests/Demo.cpp.opengl.d -include ../build/tests/Demo.cpp.vulkan.d +-include ../build/tests/Window.cpp.cairo.d +-include ../build/tests/Window.cpp.opengl.d +-include ../build/tests/Window.cpp.stub.d +-include ../build/tests/Window.cpp.vulkan.d # --------------------------------------------------------------------------------------------------------------------- diff --git a/tests/tests.hpp b/tests/tests.hpp index c9b8b0cc..334dd1fe 100644 --- a/tests/tests.hpp +++ b/tests/tests.hpp @@ -49,6 +49,7 @@ private: void run() override { d_sleep(numSecondsToWait); + d_stdout("About to quit now..."); app.quit(); } };