RFR: 8326497: Window.toFront() fails for iconified windows on Linux

Maxim Kartashev mkartashev at openjdk.org
Tue Mar 5 09:26:46 UTC 2024


On Fri, 23 Feb 2024 21:51:30 GMT, Phil Race <prr at openjdk.org> wrote:

>> XToolkit implements `toFront()` essentially by sending the  `_NET_ACTIVE_WINDOW` message to activate the window. This has no effect when the target window is in the iconified state. So the fix is to cancel that state prior to sending the message.
>> 
>> The test verifies that the fix works for maximized and undecorated frames as well out of abundance of caution; they do not represent a special case from the `toFront()` standpoint.
>> 
>> References
>> * `_NET_ACTIVE_WINDOW`: https://specifications.freedesktop.org/wm-spec/1.3/ar01s03.html
>> * [Inter-Client Communication Conventions Manual, 4.1.4. Changing Window State](https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.4)
>
> Looks reasonable to me. I'm a bit surprised this hasn't come up before.
> 
> On Mac I see that we already do this properly, I presume this is also the case on Windows, so the test will pass on all platforms ?
> 
> I think we should submit a test job ...

@prrace The fix was extended to Windows as well. MacOS works as it is except that the test needed some tweaking to allow for slower iconify/de-iconify effects.

Please, have a look at the updated version.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17985#issuecomment-1978306651


More information about the client-libs-dev mailing list