Page 1 of 1

BeginInvoke / ResumeForegroundAsync seem to hang if the application is not active

Posted: 31 Mar 2020, 14:17
by darthmaule2
I've seen this is two scenarios.

1.) We have a countdown timer that runs when I hit "shutdown" in a menu. The timer counts down from 5 to 0 and then the application closes.
--> We have seen that, during this countdown, if we switch to another application the countdown stops. All it takes is a MouseOver on the original application to resume the countdown.

2.) I just created a second application called JoystickEmulator that sends positions to our main application. The message are received and then a BeginInvoke call is made in the main application to update some elements positions. They don't update until MouseOver on the original application.

Any ideas on this one?

Thanks!

Re: BeginInvoke / ResumeForegroundAsync seem to hang if the application is not active

Posted: 31 Mar 2020, 15:06
by darthmaule2
Just did some more testing and noticed that while this occurs in Windows x64, it does not in Linux x64.

Re: BeginInvoke / ResumeForegroundAsync seem to hang if the application is not active

Posted: 03 Apr 2020, 14:12
by sfernandez
Our Dispatcher queue is only processed when the application is being updated.

I've seen that our Win32Display by default sleeps waiting for messages (calls GetMessage instead of PeekMessage) when the window is not active, and there is no way to change this behavior from the application. XDisplay implementation updates always no matter if the window is active or not.

Could you please add this problem to our bugtracker, we will fix it as soon as possible.