Fix floating window position when dragging with constraints
When the detach starts we might make the window smaller so it respects the max-size constraint. The quirk was that in that case the window was no longer under the mouse cursor, so looked weird while dragging, although it worked
This commit is contained in:
@@ -273,7 +273,7 @@ void DockWidgetBase::setFloating(bool floats)
|
||||
auto lastGeo = lastPositions().lastFloatingGeometry();
|
||||
if (lastGeo.isValid()) {
|
||||
if (auto fw = floatingWindow())
|
||||
fw->setSuggestedGeometry(lastGeo);
|
||||
fw->setSuggestedGeometry(lastGeo, /*preserveCenter=*/true);
|
||||
}
|
||||
} else {
|
||||
saveLastFloatingGeometry();
|
||||
|
||||
Reference in New Issue
Block a user