From dd38e238ed4d90956a2795840234c512dbaba34f Mon Sep 17 00:00:00 2001 From: Christian Kaiser Date: Fri, 1 Aug 2025 00:29:24 -0300 Subject: [PATCH] Activate the native window when asking the user to save sprite changes --- laf | 2 +- src/app/ui/doc_view.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/laf b/laf index 8ec4b553f..2af2af1d1 160000 --- a/laf +++ b/laf @@ -1 +1 @@ -Subproject commit 8ec4b553f1618f7a4b47cdcf4cfc2663266111ac +Subproject commit 2af2af1d1e32fe044bfafa90fcbbbced6cdcff43 diff --git a/src/app/ui/doc_view.cpp b/src/app/ui/doc_view.cpp index 549b7136c..49e16d2f7 100644 --- a/src/app/ui/doc_view.cpp +++ b/src/app/ui/doc_view.cpp @@ -42,6 +42,7 @@ #include "doc/sprite.h" #include "fmt/format.h" #include "ui/alert.h" +#include "ui/display.h" #include "ui/menu.h" #include "ui/message.h" #include "ui/shortcut.h" @@ -306,6 +307,11 @@ bool DocView::onCloseView(Workspace* workspace, bool quitting) // See if the sprite has changes while (m_document->isModified()) { + if (quitting) { + // Make sure the window is active so we can see the message when we close the app. + display()->nativeWindow()->activate(); + } + // ask what want to do the user with the changes in the sprite int ret = Alert::show(Strings::alerts_save_sprite_changes( m_document->name(),