Opened 6 years ago
Last modified 11 months ago
#53 accepted defect
When opened from a system modal application, NewView opens in background
Reported by: | Lewis Rosenthal | Owned by: | ataylor |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | NewView | Version: | 2.19 |
Keywords: | Cc: | ataylor, stevenhl |
Description
When an application is launched as system modal and help is requested, if NewView is configured as the default help viewer, it is opened behind the modal application. It cannot be brought to the foreground, and the only way to share the screen between the main program window and NewView is to resize them to fit tiled on screen.
In contrast, the IBM help viewer, when launched from the same modal application (assuming that is the default help viewer) properly opens in front of the system modal application, and the user may switch between the main program and the help at will.
Attachments (1)
Change History (14)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Cc: | added |
---|
comment:3 by , 6 years ago
FTR, this issue very probably lies in the replacement HELPMGR.DLL, not in the NewView application per se.
comment:4 by , 6 years ago
Actually, it probably has to be addressed in both places.
Aaron's development notes include this:
In original helpmgr, the help window is set to be owned by EITHER a) the active top-level window when help requested (by whatever means) OR, if set: b) the "relative window" set by a HM_SET_ACTIVE_WINDOW message. In NewView I've currently disabled the ownership; because it's usually more annoying than helpful.
and the HELPMGR code (viewer.c) has this note on launching NewView:
// set up viewer parameters: // <helpfilename> /hm:<helpwindow> // currently not used: /owner:<ownerwindow>
At a guess, I'd suspect what needs to happen is:
- HELPMGR should be updated to pass the owner window to NewView
- Either HELPMGR or NewView should determine whether the owner is system-modal.
- If NewView is passed an owner, and it's system modal, NewView should be forced to the top of window z-order (either by setting SYSMODAL or possibly by using WS_TOPMOST if that is sufficient). I'm not sure if this logic needs to be in NewView or HELPMGR; quite possibly either place would work.
follow-up: 7 comment:5 by , 6 years ago
Another place where similar behavior may be observed is within NewView itself. For example, start NewView wihtout passing it a file spec (thus, its own help file is displayed), and access Tools | Search all Help Files... In the dialog which is presented in front of the main program window, select Help.
Result: The focus changes to the main program window behind the Search all files dialog, but the Search all files dialog is left blocking the view. However, in this case, the dialog may be moved out of the way, and the main application is fully responsive (the dialog does not block).
Separate ticket/issue?
comment:6 by , 13 months ago
I had a eureka moment and realized it didn't need to be that complicated.
All NewView needs to do is check on launch whether _any_ system modal window exists. There can only be one system modal window at a time, after all.
Now, if there's a system modal window at the moment the NewView window opens, NewView remembers that window's handle, then sets itself system modal. On exit, it sets the original window back to system modal.
Implemented in build 2.19.8b (attached to ticket #49).
comment:7 by , 13 months ago
Replying to Lewis Rosenthal:
Another place where similar behavior may be observed is within NewView itself. For example, start NewView wihtout passing it a file spec (thus, its own help file is displayed), and access Tools | Search all Help Files... In the dialog which is presented in front of the main program window, select Help.
Result: The focus changes to the main program window behind the Search all files dialog, but the Search all files dialog is left blocking the view. However, in this case, the dialog may be moved out of the way, and the main application is fully responsive (the dialog does not block).
Separate ticket/issue?
Totally unrelated issue. This is normal non-modal dialog behaviour, and IMO it's the correct behaviour in this case. (It's the same a Find/Replace dialog works in most text editors, for example.)
Basically, WAD.
comment:8 by , 13 months ago
I need a little more time to set up a custom ArcaOS ISO with NewView for the installer vs View. I thought I could shortcut the process, but the build system isn't cooperating. Expect a definitive response from me tomorrow at some point.
comment:9 by , 11 months ago
Owner: | set to |
---|---|
Status: | new → accepted |
comment:10 by , 11 months ago
You can test using the 5.1.99 version of MiniLVM (or later) by running "minilvm /modal" and then opening help from there. (Note that this will not work with earlier versions of MiniLVM.)
In any event, there seems to be a problem opening secondary dialogs when NewView is running system modal. It seems Sibyl itself just isn't designed for this. I'm likely going to have to add special processing to all of NewView's secondary dialogs (although I may just disable some of them, like printing, which are unlikely to be useful in this mode).
by , 11 months ago
Attachment: | newview_2.19.8d.zip added |
---|
comment:11 by , 11 months ago
Try the attached (dubbed build 2.19.8d). I've tried adding my system-modal interception logic into the TForm class itself. Quick testing here looks promising.
comment:12 by , 11 months ago
It seems this approach, too, has limitations. Specifically, opening a dialog from within a dialog (such as a font setting under Options) still causes problems.
I'm thinking at this point the best approach is to simply turn off system modality entirely while NewView is open, and restore it on close if appropriate.
comment:13 by , 11 months ago
I am not seeing any issues with 2.19.8e when opening a secondary dialog from within the application when NewView is started from minilvm /modal (MiniLVM 2.54). Specifically, if I launch help from MiniLVM and then access Tools | Options | Fonts and then click Select... for Normal font, I get a font selection dialog which itself is modal (as expected).
The true test for me will be to swap NewView into the ArcaOS installation environment, as that is what actually prompted this ticket. So far, however, the latest build seems to have addressed the issue quite admirably.
To illustrate the issue, start ArcaOS' MiniLVM with the /modal command line switch.