-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b25
-
x86_64
-
linux
A DESCRIPTION OF THE PROBLEM :
According to https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.5, when a client receives a real ConfigureNotify event as result of resizing, the client should use the TranslateCoordinates() request to get the real global coordinates of its window. However, AWT does it only with some window managers, see https://github.com/openjdk/jdk/blob/5a4b180965048027094adcebcd35d0f9a2a2c601/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java#L771
Ideally, that code should run with all window managers. If I understand correctly, based on https://github.com/openjdk/jdk/blame/cb35692923cb394bdf04e93ee156d175ac4031eb/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java, AWT used to assume that synthetic ConfigureNotify events are always sent but it had not been the case with all WMs so the special cases were added (perhaps just to be careful or as an optimization to avoid roundtrips to the X server). In general though, it's not guaranteed that synthetic ConfigureNotify events always follow the real ones.
According to https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.5, when a client receives a real ConfigureNotify event as result of resizing, the client should use the TranslateCoordinates() request to get the real global coordinates of its window. However, AWT does it only with some window managers, see https://github.com/openjdk/jdk/blob/5a4b180965048027094adcebcd35d0f9a2a2c601/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java#L771
Ideally, that code should run with all window managers. If I understand correctly, based on https://github.com/openjdk/jdk/blame/cb35692923cb394bdf04e93ee156d175ac4031eb/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java, AWT used to assume that synthetic ConfigureNotify events are always sent but it had not been the case with all WMs so the special cases were added (perhaps just to be careful or as an optimization to avoid roundtrips to the X server). In general though, it's not guaranteed that synthetic ConfigureNotify events always follow the real ones.
- links to
-
Commit(master) openjdk/jdk/4bc826ac
-
Review(master) openjdk/jdk/21632