Split Toplevel::getSkipCloseAnimation into two parts

icc-effect-5.14.5
Martin Gräßlin 2015-01-15 15:19:04 +01:00
parent b27d3d20e7
commit 770c723c61
3 changed files with 16 additions and 3 deletions

View File

@ -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()

View File

@ -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

View File

@ -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);