Blame SOURCES/qgnomeplatform-use-more-updated-window-states-value.patch

a290ac
diff --git a/src/decoration/qgnomeplatformdecoration.cpp b/src/decoration/qgnomeplatformdecoration.cpp
3bd1ff
index a719cb3..1346a01 100644
a290ac
--- a/src/decoration/qgnomeplatformdecoration.cpp
a290ac
+++ b/src/decoration/qgnomeplatformdecoration.cpp
3bd1ff
@@ -180,7 +180,7 @@ QMargins QGnomePlatformDecoration::margins(MarginsType marginsType) const
a290ac
 #else
a290ac
 QMargins QGnomePlatformDecoration::margins() const
a290ac
 {
a290ac
-    if ((window()->windowStates() & Qt::WindowMaximized)) {
a290ac
+    if ((waylandWindow()->windowStates() & Qt::WindowMaximized)) {
a290ac
         return QMargins(0, TITLEBAR_HEIGHT, 0, 0);
a290ac
     }
3bd1ff
3bd1ff
@@ -373,7 +373,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
a290ac
     // *                              *
a290ac
     // ********************************
a290ac
     QPainterPath borderRect;
a290ac
-    if (!(window()->windowStates() & Qt::WindowMaximized)) {
a290ac
+    if (!(waylandWindow()->windowStates() & Qt::WindowMaximized)) {
a290ac
         borderRect.addRoundedRect(0, 0, surfaceRect.width(), margins().top() + 8, 10, 10);
a290ac
         p.fillPath(borderRect.simplified(), borderColor);
a290ac
     }
3bd1ff
@@ -391,7 +391,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
a290ac
     // *                              *
a290ac
     // ********************************
a290ac
     QPainterPath roundedRect;
a290ac
-    if ((window()->windowStates() & Qt::WindowMaximized)) {
a290ac
+    if ((waylandWindow()->windowStates() & Qt::WindowMaximized)) {
a290ac
         roundedRect.addRect(0, 0, surfaceRect.width(), margins().top() + 8);
a290ac
     } else {
a290ac
         roundedRect.addRoundedRect(WINDOW_BORDER_WIDTH, WINDOW_BORDER_WIDTH, surfaceRect.width() - margins().left() - margins().right(), margins().top() + 8, 8, 8);
3bd1ff
@@ -414,7 +414,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
a290ac
     // *|                            |*
a290ac
     // *------------------------------*
a290ac
     // ********************************
a290ac
-    if (!(window()->windowStates() & Qt::WindowMaximized)) {
a290ac
+    if (!(waylandWindow()->windowStates() & Qt::WindowMaximized)) {
a290ac
         QPainterPath borderPath;
a290ac
         // Left
a290ac
         borderPath.addRect(0, margins().top(), margins().left(), surfaceRect.height() - margins().top() - WINDOW_BORDER_WIDTH);
3bd1ff
@@ -498,7 +498,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
3bd1ff
3bd1ff
     // Maximize button
3bd1ff
     if (GnomeSettings::titlebarButtons().testFlag(GnomeSettings::MaximizeButton)) {
3bd1ff
-        renderButton(&p, maximizeButtonRect(), (window()->windowStates() & Qt::WindowMaximized) ? Adwaita::ButtonType::ButtonRestore : Adwaita::ButtonType::ButtonMaximize,
3bd1ff
+        renderButton(&p, maximizeButtonRect(), (waylandWindow()->windowStates() & Qt::WindowMaximized) ? Adwaita::ButtonType::ButtonRestore : Adwaita::ButtonType::ButtonMaximize,
3bd1ff
                      m_maximizeButtonHovered && active, m_clicking == Button::Maximize || m_clicking == Button::Restore);
a290ac
     }
3bd1ff