Blob Blame History Raw
diff --git a/src/decoration/qgnomeplatformdecoration.cpp b/src/decoration/qgnomeplatformdecoration.cpp
index a719cb3..1346a01 100644
--- a/src/decoration/qgnomeplatformdecoration.cpp
+++ b/src/decoration/qgnomeplatformdecoration.cpp
@@ -180,7 +180,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);
     }

@@ -373,7 +373,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);
     }
@@ -391,7 +391,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);
@@ -414,7 +414,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);
@@ -498,7 +498,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)

     // Maximize button
     if (GnomeSettings::titlebarButtons().testFlag(GnomeSettings::MaximizeButton)) {
-        renderButton(&p, maximizeButtonRect(), (window()->windowStates() & Qt::WindowMaximized) ? Adwaita::ButtonType::ButtonRestore : Adwaita::ButtonType::ButtonMaximize,
+        renderButton(&p, maximizeButtonRect(), (waylandWindow()->windowStates() & Qt::WindowMaximized) ? Adwaita::ButtonType::ButtonRestore : Adwaita::ButtonType::ButtonMaximize,
                      m_maximizeButtonHovered && active, m_clicking == Button::Maximize || m_clicking == Button::Restore);
     }