wayland: Switch to generic xdg_popup parent property
This commit is contained in:
parent
e900dc3b5e
commit
4b978bb403
1 changed files with 4 additions and 9 deletions
|
@ -1844,15 +1844,6 @@ XdgPopupClient::XdgPopupClient(XdgPopupInterface *shellSurface)
|
||||||
this, &XdgPopupClient::initialize);
|
this, &XdgPopupClient::initialize);
|
||||||
connect(shellSurface, &XdgPopupInterface::destroyed,
|
connect(shellSurface, &XdgPopupInterface::destroyed,
|
||||||
this, &XdgPopupClient::destroyClient);
|
this, &XdgPopupClient::destroyClient);
|
||||||
|
|
||||||
// The xdg-shell spec states that the parent xdg-surface may be null if it is specified
|
|
||||||
// via "some other protocol," but we don't support any such protocol yet. Notice that the
|
|
||||||
// xdg-foreign protocol is only for toplevel surfaces.
|
|
||||||
|
|
||||||
XdgSurfaceInterface *parentShellSurface = shellSurface->parentXdgSurface();
|
|
||||||
AbstractClient *parentClient = waylandServer()->findClient(parentShellSurface->surface());
|
|
||||||
parentClient->addTransient(this);
|
|
||||||
setTransientFor(parentClient);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
XdgPopupClient::~XdgPopupClient()
|
XdgPopupClient::~XdgPopupClient()
|
||||||
|
@ -2131,6 +2122,10 @@ void XdgPopupClient::handleGrabRequested(SeatInterface *seat, quint32 serial)
|
||||||
|
|
||||||
void XdgPopupClient::initialize()
|
void XdgPopupClient::initialize()
|
||||||
{
|
{
|
||||||
|
AbstractClient *parentClient = waylandServer()->findClient(m_shellSurface->parentSurface());
|
||||||
|
parentClient->addTransient(this);
|
||||||
|
setTransientFor(parentClient);
|
||||||
|
|
||||||
const QRect area = workspace()->clientArea(PlacementArea, Screens::self()->current(), desktop());
|
const QRect area = workspace()->clientArea(PlacementArea, Screens::self()->current(), desktop());
|
||||||
placeIn(area);
|
placeIn(area);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue