Is there any possibility to find out, if a user pressed on "change user"
and thus, the tcl shell is "suspended" ?
I tried all "wm protocol" variants, but nothing fired.
When a user loggs out, the command of "wm protocol WM_SAVE_YOURSELF" is called.
Thanks for any idea,
Harald
Am 30.11.2021 um 10:25 schrieb Harald Oehlmann:
Is there any possibility to find out, if a user pressed on "change
user" and thus, the tcl shell is "suspended" ?
I tried all "wm protocol" variants, but nothing fired.
When a user loggs out, the command of "wm protocol WM_SAVE_YOURSELF" is
called.
Thanks for any idea,
Harald
I have made some research.
The similar "wm protocol WM_SAVE_YOURSELF" is implemented in
win/tkWinWm.c and reacts on the Windows message "WM_QUERYENDSESSION".
A user change (Press Windows button, and then "change user") is
apparently reported by the windows message "WM_WTSSESSION_CHANGE"
But one must first activate this per Window calling WTSRegisterSessionNotification.:
Are there any opinion on:
- is it senseful to add this to the core? As this will be Tk 8.7, means
that the feature is available in 5 years or later ;-)
- may this be included in Tk 8.6 ? I am not sure, if the required
Windows API is supported by the minimum requirement for 8.6.
- is there a way to use twapi for this? Maybe, twapi has a framework to receive windows messages.
- or is it a good idea to create a custom DLL which creates a dummy
window just for this ? It is a large overhead, but probably the only
workable solution.
Any idea appreciated.
Thank you,
Harald
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 285 |
Nodes: | 16 (2 / 14) |
Uptime: | 23:37:03 |
Calls: | 6,448 |
Files: | 12,050 |
Messages: | 5,254,172 |