mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-5605 ignore empty client area when syncing bounds in XDecoratedPeer.
(cherry picked from commit d2301edbd0de04747817a2d382f587056d954627)
This commit is contained in:
@@ -495,10 +495,11 @@ abstract class XDecoratedPeer extends XWindowPeer {
|
||||
}
|
||||
WindowDimensions newDimensions = new WindowDimensions(dimensions);
|
||||
newDimensions.setInsets(getRealInsets());
|
||||
Rectangle client = dimensions.getClientRect();
|
||||
dimensions = newDimensions;
|
||||
insets_corrected = true;
|
||||
|
||||
if (isMaximized()) {
|
||||
if (isMaximized() || client.width <= 0 || client.height <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1439,12 +1440,16 @@ abstract class XDecoratedPeer extends XWindowPeer {
|
||||
@Override
|
||||
void syncBounds() {
|
||||
Rectangle r = target.getBounds();
|
||||
Insets ins = getRealInsets();
|
||||
if (r.width <= ins.left + ins.right || r.height <= ins.top + ins.bottom) {
|
||||
return;
|
||||
}
|
||||
if (syncSizeOnly && dimensions != null) {
|
||||
dimensions.setSize(r.width, r.height);
|
||||
dimensions.setInsets(getRealInsets());
|
||||
dimensions.setInsets(ins);
|
||||
xSetSize(r.width, r.height);
|
||||
} else {
|
||||
dimensions = new WindowDimensions(r, getRealInsets(), false);
|
||||
dimensions = new WindowDimensions(r, ins, false);
|
||||
xSetBounds(r.x, r.y, r.width, r.height);
|
||||
}
|
||||
reconfigureContentWindow(dimensions);
|
||||
|
||||
Reference in New Issue
Block a user