diff --git a/manage.cpp b/manage.cpp index a8c12e515f..823ba5a95f 100644 --- a/manage.cpp +++ b/manage.cpp @@ -98,6 +98,7 @@ bool Client::manage(xcb_window_t w, bool isMapped) NET::WM2InitialMappingState; auto wmClientLeaderCookie = fetchWmClientLeader(); + auto skipCloseAnimationCookie = fetchSkipCloseAnimation(); info = new WinInfo(this, m_client, rootWindow(), properties, properties2); // If it's already mapped, ignore hint @@ -134,7 +135,7 @@ bool Client::manage(xcb_window_t w, bool isMapped) getWmNormalHints(); // Get xSizeHint getMotifHints(); getWmOpaqueRegion(); - getSkipCloseAnimation(); + readSkipCloseAnimation(skipCloseAnimationCookie); // TODO: Try to obey all state information from info->state() diff --git a/toplevel.cpp b/toplevel.cpp index 72e2dba877..3ab44129d7 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -438,10 +438,20 @@ xcb_window_t Toplevel::frameId() const return m_client; } +Xcb::Property Toplevel::fetchSkipCloseAnimation() const +{ + return Xcb::Property(false, window(), atoms->kde_skip_close_animation, XCB_ATOM_CARDINAL, 0, 1); +} + +void Toplevel::readSkipCloseAnimation(Xcb::Property &property) +{ + setSkipCloseAnimation(property.toBool()); +} + void Toplevel::getSkipCloseAnimation() { - Xcb::Property property(false, window(), atoms->kde_skip_close_animation, XCB_ATOM_CARDINAL, 0, 1); - setSkipCloseAnimation(property.toBool()); + Xcb::Property property = fetchSkipCloseAnimation(); + readSkipCloseAnimation(property); } bool Toplevel::skipsCloseAnimation() const diff --git a/toplevel.h b/toplevel.h index b400f9a389..9c0bd84cf8 100644 --- a/toplevel.h +++ b/toplevel.h @@ -430,6 +430,8 @@ protected: void getWmOpaqueRegion(); void getResourceClass(); + Xcb::Property fetchSkipCloseAnimation() const; + void readSkipCloseAnimation(Xcb::Property &prop); void getSkipCloseAnimation(); virtual void debug(QDebug& stream) const = 0; void copyToDeleted(Toplevel* c);