mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-349390 Wayland: git push dialog dropdown option misplaced
GitOrigin-RevId: 6154e17269bcc606dae83fa9974ca92e666504cf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cf666d61ff
commit
4fc2b005a0
@@ -1212,6 +1212,15 @@ public class AbstractPopup implements JBPopup, ScreenAreaConsumer, AlignedPopup
|
||||
popupOwner = root.getRootPane();
|
||||
LOG.debug("popup owner fixed for JDK cache");
|
||||
}
|
||||
if (StartupUiUtil.isWaylandToolkit()) {
|
||||
// targetBounds are "screen" coordinates, which in Wayland means that they
|
||||
// are relative to the nearest toplevel (Window).
|
||||
// But popups in Wayland are expected to be relative to popup's "owner";
|
||||
// let's re-set the owner to be that window.
|
||||
popupOwner = popupOwner instanceof Window
|
||||
? popupOwner
|
||||
: SwingUtilities.getWindowAncestor(popupOwner);
|
||||
}
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("expected preferred size: " + myContent.getPreferredSize());
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.openapi.util.SystemInfoRt
|
||||
import com.intellij.ui.scale.JBUIScale.sysScale
|
||||
import com.intellij.ui.scale.isHiDPIEnabledAndApplicable
|
||||
import com.intellij.util.ui.StartupUiUtil
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import java.awt.Graphics2D
|
||||
import java.awt.GraphicsConfiguration
|
||||
@@ -37,7 +38,7 @@ object JreHiDpiUtil {
|
||||
|
||||
@JvmStatic
|
||||
fun isJreHiDPIEnabled(): Boolean {
|
||||
if (SystemInfoRt.isMac) {
|
||||
if (SystemInfoRt.isMac || StartupUiUtil.isWaylandToolkit()) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user