target: fix geometry for x11 floats
This commit is contained in:
parent
fbf67ef050
commit
c60b3cb2ed
2 changed files with 8 additions and 4 deletions
|
|
@ -88,7 +88,9 @@ void CDefaultFloatingAlgorithm::newTarget(SP<ITarget> target) {
|
|||
if (!posOverridden && (!DESIRED_GEOM || !DESIRED_GEOM->pos))
|
||||
windowGeometry = CBox{WORK_AREA.middle() - windowGeometry.size() / 2.F, windowGeometry.size()};
|
||||
|
||||
if (posOverridden || WORK_AREA.containsPoint(windowGeometry.middle()))
|
||||
if (posOverridden // pos is overridden by a rule
|
||||
|| (DESIRED_GEOM && DESIRED_GEOM->pos && target->window() && target->window()->m_isX11) // X11 window with a geom
|
||||
|| WORK_AREA.containsPoint(windowGeometry.middle())) // geometry within work area
|
||||
target->setPositionGlobal(windowGeometry);
|
||||
else {
|
||||
const auto POS = WORK_AREA.middle() - windowGeometry.size() / 2.f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue