[PATCH setup] Make sure that fatal error messages are visible
Ken Brown
kbrown@cornell.edu
Wed Dec 20 17:09:00 GMT 2017
On 12/20/2017 11:19 AM, Jon Turney wrote:
> On 19/12/2017 00:53, Ken Brown wrote:
>> The message box produced by TOPLEVEL_CATCH could be hidden by whatever
>> window was previously being displayed, so that setup appeared to hang.
>> Fix this by giving fatal error message boxes type MB_SETFOREGROUND.
>
> This is good as far as it goes, but is kind of working around the fact
> that fatal() is being called with an NULL owner HWND.
>
> This is not idea because I guess it means that propsheet window is still
> activate-able when this messagebox is displayed (MB_APPMODAL doesn't
> apply)?
It turns out that MB_SYSTEMMODAL did the job. I tried MB_APPLMODAL and
MB_TASKMODAL also, but both of those still allowed me to activate the
propsheet window.
Revised patch attached.
Ken
-------------- next part --------------
From 1f99ac4cc6c2b6c0b39aa84d80985cb21438a242 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Mon, 18 Dec 2017 19:53:00 -0500
Subject: [PATCH setup v2 1/2] Make sure that fatal error messages are visible
The message box produced by TOPLEVEL_CATCH could be hidden by whatever
window was previously being displayed, so that setup appeared to hang.
Fix this by giving fatal error message boxes type MB_SYSTEMMODAL.
This also prevents the user from activating the property sheet
window while the fatal message box is being displayed.
---
msg.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/msg.cc b/msg.cc
index 403e78a..92c9675 100644
--- a/msg.cc
+++ b/msg.cc
@@ -83,7 +83,7 @@ fatal (HWND owner, int id, ...)
{
va_list args;
va_start (args, id);
- mbox (owner, "fatal", 0, id, args);
+ mbox (owner, "fatal", MB_SYSTEMMODAL, id, args);
Logger ().exit (1);
}
--
2.15.1
More information about the Cygwin-apps
mailing list