-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2014-10-16 00:46, schrieb Matteo Bruni:
I also tried to copy the d3d9 test from "wined3d: Set the device window size on focus window activation." to d3d9ex and it looks like it always passes for me. Was that the test you were mostly interested in? It fails about 50% of the time on my Vista machine (Geforce 7400). Most of the time the WM_SIZE message is missing, but I've had some really rare runs where the entire WM_DISPLAYCHANGING/WM_DISPLAYCHANGED part is missing.
The really interesting thing is the test in the last patch labeled "unfinished". It's not the hidden window part that's tricky - this is consistent - but the fact that the test adds a second focus loss / focus restore cycle. I've had difficulties convincing d3d9ex that it has the focus back. This works now. In my past patchset I did not manage to convince native d3d9ex that it had lost focus the second time. I don't know yet if the device window hiding and showing fixes that. Focus changes are reliable in d3d9ex for my test applications when I press alt-tab, but not when I use SetForegroundWindow. I even tried to set the foreground window to the window of a different process and back from there, but this does not help either. User alt-tab is reliable though. I have not seen a difference in the messages passed to the device and focus windows, so I suspect there is some back channel talk going on between d3d9, user32 and explorer.exe (or some other central component involved with focus handling). Any ideas would be welcome. There is one difference in the messages I spotted: On reactivation with SetForegroundWindow the WM_NCACTIVATE message instructs the window to paint an inactive title bar. The window does receive focus though. I believe that this is a symptom rather than the cause. No d3d involvement is needed to see this behavior. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJUP6xEAAoJEN0/YqbEcdMwi/QP/3+vkDQxZQGg4xooDclA7ELr 5Gp+MmmoKkc1AkZWa+KyP9JpPw15CZUtzZgusj3icneV3Vq1u6e53bLvyQtHmWAT GXylkzE1eQf0abPu3Lfd/VoA+sO/Q24SOjt9bQzhNp2Z/Sf/pm4fIplLD94lvAUB 5NJRFVfn0ISkM7eGi6tltyQEjC9sLZWLNKMxwZmWz9UDcAhhnASWNonwsYPmL35m L0NOBKq+VZ+sv7CLogCEUlruLzsSL3WYnuAuPtD4wIdDxAVgg56Cqx9Qzz2L1YJU VLMiIkAP7Kn0WsOq1PfM/bYY1B1wQMw44GShhvjeD+h0FrYlOpFv30j/RhmHw5yP dEsTsAoozbpjhZ5wjGW1Yon468KPnxWFh9C8lLkFntGftKZUJlKI81vI9LCIu4Oi euUuH9uLG/E8S5sPwnN8gkPDyNs3fBXLA4uG/hH9flqyQeIiLIIt9eq7oPXyK+bP UAEt1v4XM3EYoJWrl9DgXfgiAGlhtYn9g7ZsbxQ/oyArjaH4EiJ+5XdJqueYH4+x Wy1u+W+NvArWUzTBdJdQppfly6RDAoqfK4ppRDP0GK7wjObgFHzMec0tJCX9O95Y VQiakOe1jXs3nRKA7yBsMDRocSfHsDhkfdGiRk3wbqlVW78S09iSdK+MN3HZAEoc FBwm3Q9wzB6tTXRbe1mp =cO7l -----END PGP SIGNATURE-----