diff --git a/src/wayland/xdgshell.cpp b/src/wayland/xdgshell.cpp index 2c5845fc67..afe54e54cb 100644 --- a/src/wayland/xdgshell.cpp +++ b/src/wayland/xdgshell.cpp @@ -378,8 +378,8 @@ void XdgToplevelInterfacePrivate::reset() windowTitle = QString(); windowClass = QString(); - minimumSize = QSize(); - maximumSize = QSize(); + minimumSize = QSize(0, 0); + maximumSize = QSize(0, 0); pending = XdgToplevelCommit{}; stashed.clear(); @@ -579,8 +579,7 @@ QString XdgToplevelInterface::windowClass() const QSize XdgToplevelInterface::minimumSize() const { - return QSize(d->minimumSize.width() > 0 ? d->minimumSize.width() : 0, - d->minimumSize.height() > 0 ? d->minimumSize.height() : 0); + return d->minimumSize; } QSize XdgToplevelInterface::maximumSize() const diff --git a/src/wayland/xdgshell_p.h b/src/wayland/xdgshell_p.h index 8e9329ae0a..5d90806354 100644 --- a/src/wayland/xdgshell_p.h +++ b/src/wayland/xdgshell_p.h @@ -148,8 +148,8 @@ public: XdgSurfaceInterface *xdgSurface; QString windowTitle; QString windowClass; - QSize minimumSize; - QSize maximumSize; + QSize minimumSize = QSize(0, 0); + QSize maximumSize = QSize(0, 0); protected: void xdg_toplevel_destroy_resource(Resource *resource) override;