RFR: 8342785: XWindowPeer::getNewLocation() adheres to ICCCM 4.1.5 only with some WMs
Phil Race
prr at openjdk.org
Tue Nov 19 17:56:51 UTC 2024
On Tue, 22 Oct 2024 09:59:22 GMT, Vlad Zahorodnii <duke at openjdk.org> wrote:
> It is not guaranteed that the WM will always send a synthetic ConfigureNotify event after changing the geometry. As ICCCM 4.1.5 suggests, the WM may not send a synthetic configure notify event if the window is resized for real. In that case, the client needs to use the TranslateCoordinates() request in order to determine the position of its window in the global coordinate space.
>
> However, it does so only with certain WMs. Some digging in the JDK history shows that AWT used to assume that synthetic configure notify events are always sent, however it was not the case with WMs such as Metacity so the switch statement was added. I don't know exactly why the new code path had been enabled only with handful of WMs, perhaps it was done to play safe or as an optimization. But, in general, as the TODO comment and the ICCCM spec say, this code needs to be enabled regardless of the WM.
This looks quite reasonable to me.
But I would like @azvegint to review as well.
-------------
Marked as reviewed by prr (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21632#pullrequestreview-2446208422
More information about the client-libs-dev
mailing list