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

Tejesh R tr at openjdk.org
Tue Mar 5 10:47:46 UTC 2024


On Tue, 5 Mar 2024 10:16:58 GMT, Maxim Kartashev <mkartashev 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)
>
> Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Made the test to waitForIdle()

test/jdk/java/awt/Frame/Iconify/IconifiedToFront.java line 41:

> 39: 
> 40: public class IconifiedToFront {
> 41:     private static final int PAUSE_MS = 1500;

1.5 sec is minimum delay, can we reduced it ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17985#discussion_r1512612075


More information about the client-libs-dev mailing list