3 ms·
They say that one limitation on Wayland is that "AWT expects to be able to query and set the positions of all its own windows", but since AWT does an extremely
by ptx 3y ago
They say that one limitation on Wayland is that "AWT expects to be able to query and set the positions of all its own windows", but since AWT does an extremely poor job of this on X11, I hope this Wayland limitation will prevent the new implementation from trying.
For example, the first time you open a dialog window (or the main window in the SwingSet2 demo) you can usually see the contents drawn offset by a few pixels and then later redrawn correctly. I don't see that in the demo video, so maybe they fixed it, or maybe it's hidden by the opening animation. (It might also be harder to reproduce with certain window managers – I see it every time with Xfce but only sometimes with Openbox.)
Sometimes (although rarely) you can see Swing creating a window in the wrong location on screen, making it visible and then moving it to the correct location afterwards.
And on and off over the years, on both Linux and Windows, in different apps, I've seen Swing somehow manage to move focus to the wrong window when you switch too quickly with alt-tab.
So if AWT can't mess with the window position, that should hopefully improve things.