Windows version does not respect close requests
issueid=2535 12-08-2013 04:12 PM
Junior Member
Number of reported issues by Mason Wheeler: 2
Windows version does not respect close requests
Standard Windows requests to close the program should be handled apropriately

Any well-behaved Windows program must follow the platform's conventions. ADOM, unfortunately, has a few problems here. Most noticeably, when the user hits ALT-F4 or selects other methods of closing the program, (X button in title bar, Close menu command,) nothing happens. ADOM should treat these actions as a close request and respond appropriately.

Note that this does not necessarily mean immediately terminating the program. But completely ignoring the request is never the right thing for a program to do.
Issue Details
Issue Number 2535
Project ADOM (Ancient Domains Of Mystery)
Category Windows 7
Status Fixed
Priority Unknown
Affected Version ADOM 1.2.0 pre 21
Fixed Version ADOM 2.3.1
Milestone "Ease of Use" UI
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users jt
Tags (none)




12-08-2013 08:04 PM
Ancient Member
Considering the horror stories I've read of PCs ready to take on the endgame being lost to clicking 'X' (under Sage or DOS), I very much like the current behavior and would like it to remain.

12-08-2013 08:06 PM
Senior Member
I was able to reproduce this in Windows 7, p20 Windows NotEye version. I had adom_home set to a directory that did not exist, so Adom gave up an error on startup, but after the error message was displayed, I was totally unable to close the Adom window, and had to terminate the process from task manager.

12-08-2013 08:21 PM
Junior Member
Quote Originally Posted by anon123
Considering the horror stories I've read of PCs ready to take on the endgame being lost to clicking 'X' (under Sage or DOS), I very much like the current behavior and would like it to remain.
As I said, this does not necessarily mean immediately terminating the program. Most programs where the possibility of unsaved data loss exists respond to a close request by prompting the user to save. That's an appropriate thing to do. But the current behavior--ignoring the user's close request entirely--is not.

06-23-2017 09:40 PM
Ancient Member
Added the function handlecloseevent() in adom.noe which gets called when the close window event is received. Currently this sends the "escape" keypress to ADOM, but a better handling needs to be done on the ADOM side.

09-11-2017 08:11 AM
jt jt is online now
Administrator
This is fixed for all releases using NotEye. The native ports still require some work.

09-12-2017 03:32 PM
Senior Member
If possible, I think the best way to handle this event would be to save and exit the game without further prompting the user. There are only a few circumstances I can think of where I'd want to exit the game in a non-standard way, and they are:

1) I want to close as quickly as possible.
2) For whatever reason, I can no longer interact with the game.

Neither are situations where I would want another prompt in-game.

09-13-2017 12:52 PM
jt jt is online now
Administrator
The current implementation is this:

- if no game is loaded ADOM just quits
- if a game is loaded and ADOM waits for a command from the player, the game is saved (without a prompt) and ADOM quits
- if a game is loaded and a detail view (e.g. the inventory) is open or ADOM waits for a specific answer to a question, ADOM shows a popup window and informs the user that he has to either close the detail view or answer the question first

09-15-2017 02:11 PM
jt jt is online now
Administrator
Also implemented for the native macOS version.

09-17-2017 01:10 PM
jt jt is online now
Administrator
And finally implemented for the native Windows version.

+ Reply