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.
This commit is contained in:
Vlad Zahorodnii 2020-10-13 18:37:43 +03:00
parent 1e01b1334e
commit f369a3557c

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();
}