From 217bdf00a4af96f45861fbd8475ccf62e8941500 Mon Sep 17 00:00:00 2001 From: Sergei Tachenov Date: Thu, 22 Jan 2026 15:47:48 +0200 Subject: [PATCH] [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 --- .../platform-impl/src/com/intellij/ui/popup/WizardPopup.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/platform-impl/src/com/intellij/ui/popup/WizardPopup.java b/platform/platform-impl/src/com/intellij/ui/popup/WizardPopup.java index eaade092ab17..16668fb2fad0 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/WizardPopup.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/WizardPopup.java @@ -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;