Add support for xdg_toplevel.configure_bounds()
xdg_toplevel.configure_bounds() allows to indicate the client the maximum surface size bounds. wayland-protocols: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/41
This commit is contained in:
parent
17fc13f100
commit
9e25fd0468
2 changed files with 14 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
|||
|
||||
namespace KWaylandServer
|
||||
{
|
||||
static const int s_version = 3;
|
||||
static const int s_version = 4;
|
||||
|
||||
XdgShellInterfacePrivate::XdgShellInterfacePrivate(XdgShellInterface *shell)
|
||||
: q(shell)
|
||||
|
@ -599,6 +599,13 @@ void XdgToplevelInterface::sendClose()
|
|||
d->send_close();
|
||||
}
|
||||
|
||||
void XdgToplevelInterface::sendConfigureBounds(const QSize &size)
|
||||
{
|
||||
if (d->resource()->version() >= XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION) {
|
||||
d->send_configure_bounds(size.width(), size.height());
|
||||
}
|
||||
}
|
||||
|
||||
XdgToplevelInterface *XdgToplevelInterface::get(::wl_resource *resource)
|
||||
{
|
||||
if (auto toplevelPrivate = resource_cast<XdgToplevelInterfacePrivate *>(resource)) {
|
||||
|
|
|
@ -290,6 +290,12 @@ public:
|
|||
*/
|
||||
void sendClose();
|
||||
|
||||
/**
|
||||
* Sends an event to the client specifying the maximum bounds for the surface size. Must be
|
||||
* called before sendConfigure().
|
||||
*/
|
||||
void sendConfigureBounds(const QSize &size);
|
||||
|
||||
/**
|
||||
* Returns the XdgToplevelInterface for the specified wayland resource object \a resource.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue