diff --git a/src/client/xdgshell.h b/src/client/xdgshell.h --- a/src/client/xdgshell.h +++ b/src/client/xdgshell.h @@ -586,6 +586,16 @@ */ void requestGrab(Seat *seat, quint32 serial); + /** + * When a configure event is received, if a client commits the + * Surface in response to the configure event, then the client + * must make an ackConfigure request sometime before the commit + * request, passing along the @p serial of the configure event. + * @see configureRequested + * @since 5.56 + **/ + void ackConfigure(quint32 serial); + operator xdg_surface*(); operator xdg_surface*() const; operator xdg_popup*(); diff --git a/src/client/xdgshell.cpp b/src/client/xdgshell.cpp --- a/src/client/xdgshell.cpp +++ b/src/client/xdgshell.cpp @@ -360,6 +360,11 @@ d->requestGrab(seat, serial); } +void XdgShellPopup::ackConfigure(quint32 serial) +{ + d->ackConfigure(serial); +} + XdgShellPopup::operator xdg_surface*() { return *(d.data()); } diff --git a/src/client/xdgshell_p.h b/src/client/xdgshell_p.h --- a/src/client/xdgshell_p.h +++ b/src/client/xdgshell_p.h @@ -268,6 +268,10 @@ Q_UNUSED(seat); Q_UNUSED(serial); }; + virtual void ackConfigure(quint32 serial) { + Q_UNUSED(serial); + } + virtual operator xdg_surface*() { return nullptr; } diff --git a/src/client/xdgshell_stable.cpp b/src/client/xdgshell_stable.cpp --- a/src/client/xdgshell_stable.cpp +++ b/src/client/xdgshell_stable.cpp @@ -498,6 +498,7 @@ void destroy() override; bool isValid() const override; void requestGrab(Seat *seat, quint32 serial) override; + void ackConfigure(quint32 serial) override; using XdgShellPopup::Private::operator zxdg_popup_v6*; using XdgShellPopup::Private::operator zxdg_surface_v6*; @@ -595,6 +596,10 @@ xdg_popup_grab(xdgpopup, *seat, serial); } +void XdgShellPopupStable::Private::ackConfigure(quint32 serial) +{ + xdg_surface_ack_configure(xdgsurface, serial); +} XdgShellPopupStable::XdgShellPopupStable(QObject *parent) : XdgShellPopup(new Private(this), parent) diff --git a/src/client/xdgshell_v6.cpp b/src/client/xdgshell_v6.cpp --- a/src/client/xdgshell_v6.cpp +++ b/src/client/xdgshell_v6.cpp @@ -483,6 +483,7 @@ void destroy() override; bool isValid() const override; void requestGrab(Seat *seat, quint32 serial) override; + void ackConfigure(quint32 serial) override; using XdgShellPopup::Private::operator xdg_popup*; using XdgShellPopup::Private::operator xdg_surface*; @@ -580,6 +581,10 @@ zxdg_popup_v6_grab(xdgpopupv6, *seat, serial); } +void XdgShellPopupUnstableV6::Private::ackConfigure(quint32 serial) +{ + zxdg_surface_v6_ack_configure(xdgsurfacev6, serial); +} XdgShellPopupUnstableV6::XdgShellPopupUnstableV6(QObject *parent) : XdgShellPopup(new Private(this), parent)