Background window not receiving close event (Windows 10) Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Background window not receiving close event (Windows 10)

Post by fishnet37222 »

I'm writing an app on Windows 10 using Visual C++ 2017 and wxWidgets 3.1.0. I've noticed that if my app doesn't currently have focus and I try to use the close button on the window's taskbar thumbnail, the close event doesn't get processed until I make that window active.

In the screenshot below, the white title bar color and greyed out text means the window does not currently have focus.

If I do the same thing with apps like Notepad or Command Prompt, the windows close as expected.
2017-05-23_6-41-09.png
2017-05-23_6-41-09.png (73.69 KiB) Viewed 1335 times
Dave F.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Background window not receiving close event (Windows 10)

Post by ONEEYEMAN »

Hi,
Do you observe the same behavior running minimal sample?

Thank you.
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Re: Background window not receiving close event (Windows 10)

Post by fishnet37222 »

Yes, I do observe the same behavior with the Minimal sample. I can, however, confirm that the issue does not occur on Windows 7.

Here is the exact version of Windows 10 that I'm using:
2017-05-23_20-34-54.png
2017-05-23_20-34-54.png (8.49 KiB) Viewed 1309 times
Dave F.
ttn
Earned a small fee
Earned a small fee
Posts: 22
Joined: Fri Jun 07, 2013 12:53 pm

Re: Background window not receiving close event (Windows 10)

Post by ttn »

Hi.

Is it the same as

viewtopic.php?f=1&t=42432&p=172068#p172068

In the on-close event handler I did a work-around by

Code: Select all

if (!IsActive()) wxQueueEvent(this, new wxActivateEvent());
/Torben.
Post Reply