mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-16 05:21:42 +01:00
JBR-6920 Wayland: some IDEA popups positioned incorrectly
(cherry picked from commit e28d2bacc7)
This commit is contained in:
@@ -593,10 +593,10 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
try {
|
||||
return WLRobotPeer.getLocationOfWLSurface(wlSurfacePtr);
|
||||
} catch (UnsupportedOperationException ignore) {
|
||||
return new Point(0, 0);
|
||||
return new Point();
|
||||
}
|
||||
} else {
|
||||
throw new UnsupportedOperationException("getLocationOnScreen() not supported without wayland surface");
|
||||
return new Point();
|
||||
}
|
||||
}, Point::new);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,10 @@ public abstract class WLGraphicsConfig extends GraphicsConfiguration {
|
||||
|
||||
@Override
|
||||
public Rectangle getBounds() {
|
||||
return new Rectangle(width, height);
|
||||
// NB: despite the claims of GraphicsConfiguration.getBounds()'s javadoc,
|
||||
// the value returned is expected to be in user-space coordinates,
|
||||
// same as windows sizes, offsets, components' coordinates, etc.
|
||||
return new Rectangle((int) (width / effectiveScale), (int) (height / effectiveScale));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user