Split Client::updateFirstInTabBox into two parts

icc-effect-5.14.5
Martin Gräßlin 2015-01-15 16:14:28 +01:00
parent 327dd406e6
commit 584bdbce71
3 changed files with 17 additions and 4 deletions

View File

@ -2291,12 +2291,22 @@ Client::Position Client::titlebarPosition() const
return PositionTop;
}
Xcb::Property Client::fetchFirstInTabBox() const
{
return Xcb::Property(false, m_client, atoms->kde_first_in_window_list,
atoms->kde_first_in_window_list, 0, 1);
}
void Client::readFirstInTabBox(Xcb::Property &property)
{
setFirstInTabBox(property.toBool(32, atoms->kde_first_in_window_list));
}
void Client::updateFirstInTabBox()
{
// TODO: move into KWindowInfo
Xcb::Property property(false, m_client, atoms->kde_first_in_window_list,
atoms->kde_first_in_window_list, 0, 1);
setFirstInTabBox(property.toBool(32, atoms->kde_first_in_window_list));
Xcb::Property property = fetchFirstInTabBox();
readFirstInTabBox(property);
}
Xcb::StringProperty Client::fetchColorScheme() const

View File

@ -654,6 +654,8 @@ public:
void setFirstInTabBox(bool enable) {
m_firstInTabBox = enable;
}
Xcb::Property fetchFirstInTabBox() const;
void readFirstInTabBox(Xcb::Property &property);
void updateFirstInTabBox();
Xcb::StringProperty fetchColorScheme() const;
void readColorScheme(Xcb::StringProperty &property);

View File

@ -102,6 +102,7 @@ bool Client::manage(xcb_window_t w, bool isMapped)
auto gtkFrameExtentsCookie = fetchGtkFrameExtents();
auto showOnScreenEdgeCookie = fetchShowOnScreenEdge();
auto colorSchemeCookie = fetchColorScheme();
auto firstInTabBoxCookie = fetchFirstInTabBox();
info = new WinInfo(this, m_client, rootWindow(), properties, properties2);
// If it's already mapped, ignore hint
@ -144,7 +145,7 @@ bool Client::manage(xcb_window_t w, bool isMapped)
original_skip_taskbar = skip_taskbar = (info->state() & NET::SkipTaskbar) != 0;
skip_pager = (info->state() & NET::SkipPager) != 0;
updateFirstInTabBox();
readFirstInTabBox(firstInTabBoxCookie);
setupCompositing();