wayland: Block geometry updates while placing popups

Placement::placeTransient() checks the frame geometry right after
setting it. That is a problem because geometry updates for
XdgPopupClient are made in async fashion. We need to block geometry
updates in order to ensure that window placement code sees correct
geometry.
icc-effect-5.26.4
Vlad Zahorodnii 2020-10-13 18:37:43 +03:00
parent 1e01b1334e
commit f369a3557c
1 changed files with 2 additions and 0 deletions

View File

@ -1979,8 +1979,10 @@ void XdgPopupClient::initialize()
parentClient->addTransient(this);
setTransientFor(parentClient);
blockGeometryUpdates(true);
const QRect area = workspace()->clientArea(PlacementArea, Screens::self()->current(), desktop());
placeIn(area);
blockGeometryUpdates(false);
scheduleConfigure();
}