diff --git a/src/decoration/qgnomeplatformdecoration.cpp b/src/decoration/qgnomeplatformdecoration.cpp
index 1129b4f..be4ac21 100644
--- a/src/decoration/qgnomeplatformdecoration.cpp
+++ b/src/decoration/qgnomeplatformdecoration.cpp
@@ -178,7 +178,7 @@ QMargins QGnomePlatformDecoration::margins(MarginsType marginsType) const
#else
QMargins QGnomePlatformDecoration::margins() const
{
- if ((window()->windowStates() & Qt::WindowMaximized)) {
+ if ((waylandWindow()->windowStates() & Qt::WindowMaximized)) {
return QMargins(0, TITLEBAR_HEIGHT, 0, 0);
}
@@ -371,7 +371,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
// * *
// ********************************
QPainterPath borderRect;
- if (!(window()->windowStates() & Qt::WindowMaximized)) {
+ if (!(waylandWindow()->windowStates() & Qt::WindowMaximized)) {
borderRect.addRoundedRect(0, 0, surfaceRect.width(), margins().top() + 8, 10, 10);
p.fillPath(borderRect.simplified(), borderColor);
}
@@ -389,7 +389,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
// * *
// ********************************
QPainterPath roundedRect;
- if ((window()->windowStates() & Qt::WindowMaximized)) {
+ if ((waylandWindow()->windowStates() & Qt::WindowMaximized)) {
roundedRect.addRect(0, 0, surfaceRect.width(), margins().top() + 8);
} else {
roundedRect.addRoundedRect(WINDOW_BORDER_WIDTH, WINDOW_BORDER_WIDTH, surfaceRect.width() - margins().left() - margins().right(), margins().top() + 8, 8, 8);
@@ -412,7 +412,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
// *| |*
// *------------------------------*
// ********************************
- if (!(window()->windowStates() & Qt::WindowMaximized)) {
+ if (!(waylandWindow()->windowStates() & Qt::WindowMaximized)) {
QPainterPath borderPath;
// Left
borderPath.addRect(0, margins().top(), margins().left(), surfaceRect.height() - margins().top() - WINDOW_BORDER_WIDTH);
@@ -522,7 +522,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
Adwaita::Renderer::renderFlatRoundedButtonFrame(styleOptions);
}
decorationButtonStyle.setRect(QRect(static_cast<int>(rect.x()) + (BUTTON_WIDTH / 4), static_cast<int>(rect.y()) + (BUTTON_WIDTH / 4), BUTTON_WIDTH / 2, BUTTON_WIDTH / 2));
- const Adwaita::ButtonType buttonType = (window()->windowStates() & Qt::WindowMaximized) ? Adwaita::ButtonType::ButtonRestore : Adwaita::ButtonType::ButtonMaximize;
+ const Adwaita::ButtonType buttonType = (waylandWindow()->windowStates() & Qt::WindowMaximized) ? Adwaita::ButtonType::ButtonRestore : Adwaita::ButtonType::ButtonMaximize;
Adwaita::Renderer::renderDecorationButton(decorationButtonStyle, buttonType);
}