From 1334b38ee11b9500145581a511854b5b51fbe195 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 29 Mar 2023 12:53:21 +0300 Subject: [PATCH] Move X11-specific "skip close animation" handling to X11Window --- src/window.cpp | 16 ---------------- src/window.h | 3 --- src/x11window.cpp | 16 ++++++++++++++++ src/x11window.h | 3 +++ 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/window.cpp b/src/window.cpp index 9ad7ac18a5..e75b06f0d5 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -354,22 +354,6 @@ xcb_window_t Window::frameId() const return m_client; } -Xcb::Property Window::fetchSkipCloseAnimation() const -{ - return Xcb::Property(false, window(), atoms->kde_skip_close_animation, XCB_ATOM_CARDINAL, 0, 1); -} - -void Window::readSkipCloseAnimation(Xcb::Property &property) -{ - setSkipCloseAnimation(property.toBool()); -} - -void Window::getSkipCloseAnimation() -{ - Xcb::Property property = fetchSkipCloseAnimation(); - readSkipCloseAnimation(property); -} - bool Window::skipsCloseAnimation() const { return m_skipCloseAnimation; diff --git a/src/window.h b/src/window.h index 82105f49c1..c2629e9452 100644 --- a/src/window.h +++ b/src/window.h @@ -1476,9 +1476,6 @@ protected: virtual std::unique_ptr createItem(Scene *scene) = 0; void setResourceClass(const QString &name, const QString &className = QString()); - Xcb::Property fetchSkipCloseAnimation() const; - void readSkipCloseAnimation(Xcb::Property &prop); - void getSkipCloseAnimation(); Output *m_output = nullptr; QRectF m_frameGeometry; diff --git a/src/x11window.cpp b/src/x11window.cpp index 95d0b94e6d..19a7bb5bf9 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -5178,4 +5178,20 @@ void X11Window::getWmClientMachine() clientMachine()->resolve(window(), wmClientLeader()); } +Xcb::Property X11Window::fetchSkipCloseAnimation() const +{ + return Xcb::Property(false, window(), atoms->kde_skip_close_animation, XCB_ATOM_CARDINAL, 0, 1); +} + +void X11Window::readSkipCloseAnimation(Xcb::Property &property) +{ + setSkipCloseAnimation(property.toBool()); +} + +void X11Window::getSkipCloseAnimation() +{ + Xcb::Property property = fetchSkipCloseAnimation(); + readSkipCloseAnimation(property); +} + } // namespace diff --git a/src/x11window.h b/src/x11window.h index 6d8b50bbd4..5fbf579559 100644 --- a/src/x11window.h +++ b/src/x11window.h @@ -381,6 +381,9 @@ private: Xcb::Property fetchWmClientLeader() const; void readWmClientLeader(Xcb::Property &p); void getWmClientLeader(); + Xcb::Property fetchSkipCloseAnimation() const; + void readSkipCloseAnimation(Xcb::Property &prop); + void getSkipCloseAnimation(); void configureRequest(int value_mask, qreal rx, qreal ry, qreal rw, qreal rh, int gravity, bool from_tool); NETExtendedStrut strut() const;