10 seconds to deselect

All graphical and user interfaces problems
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: 10 seconds to deselect

Post by Josef Templ »

Setting HKEY_CURRENT_USER\Control Panel\Desktop\HungAppTimeout
to 10000, for example, doubles the default timeout of 5 seconds.
In my experiments this worked under Win 10.
Note: you have to create an new registry value because the default of 5 seconds is
usually not in the registry. You have to reboot Windows after setting this key.

It is of course not a perfect solution but as a workaround
it may be quite helpful.

BTW, in my latest experiments under Win 10 I also found situations where I did not
get the ghosting behavior after 10 seconds. So this is also not 100% reproducible
under Win 10.

You can get more info from https://blogs.msdn.microsoft.com/meason ... pptimeout/
and https://blogs.msdn.microsoft.com/meason ... for-hangs/.

- Josef
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: 10 seconds to deselect

Post by Josef Templ »

There is a function named DisableProcessWindowsGhosting in the Windows API (USER32.dll),
but not in WinApi.
This function is supposed to turn off the ghosting behavior until the end of the process.
There is no way to turn it on again, so it cannot be switched off for the
duration of a modal mouse tracking loop.
Thereby it also switches off the detection of endless loops or long-running commands
and it may be a case for a user preference setting.
Anyway, this is an option to get rid of the ghosting
without manipulating global registry settings.

In WinApi (or in another auxiliary interface module) add:
PROCEDURE DisableProcessWindowsGhosting* ["USER32.dll", ""];

MODULE Test;
IMPORT WinApi;
PROCEDURE NoGhosting*;
BEGIN WinApi.DisableProcessWindowsGhosting
END NoGhosting;
END Test.

- Josef
Post Reply