mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-9739 Wayland: AssertionError in WLComponentPeer.moveToOverlap()
This commit is contained in:
@@ -309,16 +309,16 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
|
|
||||||
static void moveToOverlap(Rectangle what, Rectangle where) {
|
static void moveToOverlap(Rectangle what, Rectangle where) {
|
||||||
if (what.getMaxX() <= where.getMinX()) {
|
if (what.getMaxX() <= where.getMinX()) {
|
||||||
what.x += where.getMaxX() - what.getMaxX();
|
what.x += where.getMaxX() - what.getMaxX() + 1;
|
||||||
}
|
}
|
||||||
if (what.getMinX() >= where.getMaxX()) {
|
if (what.getMinX() >= where.getMaxX()) {
|
||||||
what.x -= what.getMinX() - where.getMaxX();
|
what.x -= what.getMinX() - where.getMaxX() + 1;
|
||||||
}
|
}
|
||||||
if (what.getMaxY() <= where.getMinY()) {
|
if (what.getMaxY() <= where.getMinY()) {
|
||||||
what.y += where.getMaxY() - what.getMaxY();
|
what.y += where.getMaxY() - what.getMaxY() + 1;
|
||||||
}
|
}
|
||||||
if (what.getMinY() >= where.getMaxY()) {
|
if (what.getMinY() >= where.getMaxY()) {
|
||||||
what.y -= what.getMinY() - where.getMaxY();
|
what.y -= what.getMinY() - where.getMaxY() + 1;
|
||||||
}
|
}
|
||||||
assert what.intersects(where) : String.format("Failed to move %s to overlap %s", what, where);
|
assert what.intersects(where) : String.format("Failed to move %s to overlap %s", what, where);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user