On Tue, 22 Oct 2024 09:59:22 GMT, Vlad Zahorodnii <[email protected]> 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 pull request has now been integrated.

Changeset: 4bc826ac
Author:    Vlad Zahorodnii <[email protected]>
Committer: Alexander Zvegintsev <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/4bc826ac1ea824113a07713f6973c06361c1392e
Stats:     22 lines in 1 file changed: 0 ins; 16 del; 6 mod

8342785: XWindowPeer::getNewLocation() adheres to ICCCM 4.1.5 only with some WMs

Reviewed-by: prr, azvegint

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

PR: https://git.openjdk.org/jdk/pull/21632

Reply via email to