JBR-4471 Linux: popup appears on wrong screen after desktop scale change

When screen scale changes, the cached screen bounds must be explicitly
updated. Call resetBoundsCache() whenever X11GraphicsDevice.scale has
changed.

(cherry picked from commit 1bb3b2fa32)
This commit is contained in:
Maxim Kartashev
2022-05-16 01:23:26 -07:00
committed by jbrbot
parent 3fc6063e0e
commit 6b3d1c9abf

View File

@@ -573,6 +573,7 @@ public final class X11GraphicsDevice extends GraphicsDevice
if (x11gd.isScaleFactorDefault.get() || !uiScaleEnabled) {
x11gd.scale = (int)Math.round(xftDpiScale * (uiScaleEnabled ? GDK_SCALE_MULTIPLIER : 1));
x11gd.isScaleFactorDefault.set(false);
if (X11GraphicsEnvironment.useBoundsCache()) x11gd.resetBoundsCache();
}
}
}