Don't try to create zxdg_popup_v6s with incomplete positioners

A positioner without a size is considered incomplete, and creating a popup with
an incomplete positioner is a protocol error.

Change-Id: I5efdba0edfe6edc5f7b0a4908c1e43b93d35eea8
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Johan Klokkhammer Helsing 2017-04-12 10:13:07 +02:00 committed by Johan Helsing
parent 9ef82c4dae
commit b0f57f5e31

View File

@ -199,6 +199,7 @@ void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice
positioner->set_anchor_rect(transientPos.x(), transientPos.y(), 1, 1);
positioner->set_anchor(QtWayland::zxdg_positioner_v6::anchor_top | QtWayland::zxdg_positioner_v6::anchor_left);
positioner->set_gravity(QtWayland::zxdg_positioner_v6::gravity_bottom | QtWayland::zxdg_positioner_v6::gravity_right);
positioner->set_size(m_window->geometry().width(), m_window->geometry().height());
m_popup = new Popup(this, parentXdgSurface, positioner);
positioner->destroy();
delete positioner;