[Bug 51130] user32:win test_SetActiveWindow() has 2 failures on Vista to Windows 8.1
WineHQ Bugzilla
wine-bugs at winehq.org
Mon Jan 31 16:16:53 CST 2022
https://bugs.winehq.org/show_bug.cgi?id=51130
Rémi Bernon <rbernon at codeweavers.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rbernon at codeweavers.com
Fixed by SHA1| |ebe3cea01d127de612171b6276c
| |473a2b455266d
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Rémi Bernon <rbernon at codeweavers.com> ---
I think the problem was coming from SetActiveWindow(0) calls, which were done
on various occasion, trying to de-activate the active window. The problem is
that on older (< Win10), SetActiveWindow(0) succeeds but tries to give the
foreground to another applications (or requests it back on the second call),
possibly losing it.
I'm not completely sure if this was a bug or a feature, and I'm a bit surprised
that you could get the foreground back as easily (although I haven't tried what
an user action could change). But this has clearly been removed since Win10.
The call now returns 0 (which should be understood as a failure I guess,
although it doesn't change last error).
I added proper testing of this behavior, and removed the calls where they were
done as it's a bit unpredictable. I believe the failure should not happen
anymore after ebe3cea01d127de612171b6276c473a2b455266d (although there may
still be GetActiveWindow failures elsewhere for other reasons).
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list