From 8a4b66389034b9563d87431669b456481c50d611 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 29 Nov 2020 01:18:12 +0100 Subject: [PATCH] Prevent shortcuts from applying to closed windows --- source/window.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/window.cpp b/source/window.cpp index 7ad750109..a57168ba8 100644 --- a/source/window.cpp +++ b/source/window.cpp @@ -160,8 +160,10 @@ namespace hex { if (auto &[key, mods] = Window::s_currShortcut; key != -1) { for (auto &view : this->m_views) { - if (view->handleShortcut(key, mods)) - break; + if (view->getWindowOpenState()) { + if (view->handleShortcut(key, mods)) + break; + } } Window::s_currShortcut = { -1, -1 };