mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[UI, Wayland] IJPL-224767 Add a safety check for preferred popup sizes on Wayland
A follow-up to IJ-CR-188775: cover the case when the IDE window is too small. Space-RevId: 82df00189117da1d8d5731a2ab63d85846d41717 GitOrigin-RevId: 152c890de7bcffae29025d35a96943e8d1bb2361
This commit is contained in:
committed by
intellij-monorepo-bot
parent
959100f701
commit
217bdf00a4
@@ -374,6 +374,10 @@ public abstract class WizardPopup extends AbstractPopup implements ActionListene
|
||||
// The ultimate parent should be an IdeFrameImpl anyway.
|
||||
if (!(parent instanceof IdeFrameImpl window) || !window.isShowing()) return null;
|
||||
screenHeight = window.getHeight();
|
||||
// Check if the main window is too small.
|
||||
// Since the screen size on Wayland can't be trusted (JBR-9884), we can only fall back to the default size in this case.
|
||||
// This is a reasonable fallback, as even a tiny 14" MacBook screen with the maximum scaling is 665 px, so 600 should be safe.
|
||||
if (screenHeight < MAX_SIZE.height) return null;
|
||||
}
|
||||
else {
|
||||
Point locationOnScreen = null;
|
||||
|
||||
Reference in New Issue
Block a user