From 7dc7bf09e20048915f396be99a7f5e713811de7c Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 28 Sep 2017 12:41:19 -0300 Subject: [PATCH] Windows: fix last gray background when the main window is closed --- src/ui/manager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ui/manager.cpp b/src/ui/manager.cpp index 0dc133378..b7fd470ec 100644 --- a/src/ui/manager.cpp +++ b/src/ui/manager.cpp @@ -1098,6 +1098,14 @@ bool Manager::onProcessMessage(Message* msg) { switch (msg->type()) { + case kPaintMessage: + // Draw nothing (the manager should be invisible). On Windows, + // after closing the main window, the manager will not refresh + // the she::Display content, so we'll avoid a gray background + // (the last main window content is kept until the Display is + // finally closed.) + return true; + case kResizeDisplayMessage: onNewDisplayConfiguration(); break;