When trying to install The Longest Journey (an adventure game), I ran into a problem with modal message boxes.
The installer displays at some point a task modal message box, but for some reason the box disapears almost instantly, and I'm stuck with a focused installshield screen on which I can't do anything as the task modal msgbox is invisible and unfocused.
I'd like to implement the modal message boxes to fix my problem, but I don't know where to start. Could someone give me a few indication about what would be required to achieve a proper behaviour or modal message boxes ?
Thanks.
Laurent Pinchart
Laurent Pinchart wrote:
When trying to install The Longest Journey (an adventure game), I ran into a problem with modal message boxes.
The installer displays at some point a task modal message box, but for some reason the box disapears almost instantly, and I'm stuck with a focused installshield screen on which I can't do anything as the task modal msgbox is invisible and unfocused.
That sounds like a problem I have with the history window of Microsoft Sourcesafe with a Wine build from CVS from about two months ago (I haven't updated since then).
Looking forward to trying your upcoming fix. - Dan
That sounds like a problem I have with the history window of Microsoft Sourcesafe with a Wine build from CVS from about two months ago (I haven't updated since then).
Looking forward to trying your upcoming fix.
There will be no upcoming fix until I get some help... I'm willing to write support for MB_TASKMODAL, but have no idea about how to do so.
It seems that I need to EnumThreadWindows, get the state enable state of all windows, disable them, and restore their enable state when the dialog box is closed. If I'm right, my problem is how/where to store the enable state of all the thread windows. I've been thinking about the window extra data, but I haven't been able to find where the MSGBOX class is registered so that I can allocate more space for extra data (cbWndExtra).
Any help will be appreciated.
Laurent Pinchart
On Mon, 24 Dec 2001, Laurent Pinchart wrote:
The installer displays at some point a task modal message box, but for some reason the box disapears almost instantly, and I'm stuck with a focused installshield screen on which I can't do anything as the task modal msgbox is invisible and unfocused.
This has been discussed before, most recently on wine-users, I think... Are you running in managed mode? Then try this patch: http://www.winehq.com/hypermail/wine-patches/2001/11/0126.html
(Hey, Alexandre, is there a reason you haven't applied that yet, anyway?)
Ove Kaaven ovehk@ping.uio.no writes:
This has been discussed before, most recently on wine-users, I think... Are you running in managed mode? Then try this patch: http://www.winehq.com/hypermail/wine-patches/2001/11/0126.html
(Hey, Alexandre, is there a reason you haven't applied that yet, anyway?)
Was I supposed to? it doesn't really looks to be ready to commit; at least the #ifdefs should be replaced by a run-time option. And I'm not convinced making menus and similar windows managed is really a good idea, so it probably needs more intelligence in this area.
This has been discussed before, most recently on wine-users, I think... Are you running in managed mode? Then try this patch: http://www.winehq.com/hypermail/wine-patches/2001/11/0126.html
(Hey, Alexandre, is there a reason you haven't applied that yet, anyway?)
I applied the patch succesfuly, but it doesn't help, either in managed or non-managed mode. The message box still pops up for a second and then disappears.
I was wondering why message boxes are allowed to be APPLMODAL, TASKMODAL and SYSTEMMODAL, while other dialog boxes aren't. I feel it would have been simpler and cleaner to implement TASK/SYSTEM/APPL modality in windows/dialog.c instead of windows/msgbox.c, as dialog.c already disables the root ancestor of the dialog parent.
I still haven't found out how to increase the extra memory of the MSGBOX class. Any info will be appreciated.
Laurent Pinchart
I found a way to store some information in the window extra memory, and I now disable all the root windows of the current thread, but the message box still pops up for a second and then disappears.
What could I try next ?
Laurent Pinchart
Sorry for all of those who were looking forward for MB_TASKMODAL support, but I fixed my problem without having to implement that.
The problem came from SetWindowPos@dlls/x11drv/winpos.c which didn't react properly to the SWP_NOACTIVATE flag.
I attached a patch to this e-mail, comments are welcome.
Laurent Pinchart
I'd like to implement the modal message boxes to fix my problem, but I don't know where to start. Could someone give me a few indication about what would be required to achieve a proper behaviour or modal message boxes ?
After some investigation, I've come up with 2 methods to achieve the desired result. The first one would be to disable all the task top-level windows (like simple modal dialog boxes disable their owner window). The second one would be to modify the focus policy to ensure that a modal dialog box will never beocme hidden by a non-modal window.
I suppose that the first method is the best one. Could anyone help me to get a list of all the top-level windows of a task ? I also would like to know where I should store all the handles to those windows in order to re-enable them when the dialog box gets destroyed.
Thanks.
Laurent Pinchart