Hacker News new | ask | show | jobs
by kazinator 1038 days ago
OK, so I now know of three instances in different software of a similar issue on Windows: a window coming up in the background.

One is in Qt (as manifested by this MuseScore behavior with the dialog).

The other is a long-standing thing in GTK+, visible for instance in the Windows version of GIMP.

Then there is this funny issue I fixed in something called the Cygnal project (a fork of the Cygwin DLL):

https://www.kylheku.com/cgit/cygnal/commit/?id=5d50aea73aace...

When a program that has never serviced its Windows message pump runs another program via CreateProcess, and that program creates a window, that program's window fails to come to the foreground.

This goes away with a dummy call to TranslateMessage.

I have a vague feeling this could all be related.

1 comments

I just assumed it was because the window owner wasn't set properly (but it's a long time since I did windows desktop app development). Strangely I can't reproduce the problem now - you can certainly send the dialog behind the parent, but it comes up above it initially as expected.