Split Client::detectGtkFrameExtents into two parts
This commit is contained in:
parent
770c723c61
commit
24688f8dae
3 changed files with 16 additions and 3 deletions
14
client.cpp
14
client.cpp
|
@ -659,13 +659,23 @@ void Client::updateFrameExtents()
|
|||
info->setFrameExtents(strut);
|
||||
}
|
||||
|
||||
void Client::detectGtkFrameExtents()
|
||||
Xcb::Property Client::fetchGtkFrameExtents() const
|
||||
{
|
||||
return Xcb::Property(false, m_client, atoms->gtk_frame_extents, XCB_ATOM_CARDINAL, 0, 4);
|
||||
}
|
||||
|
||||
void Client::readGtkFrameExtents(Xcb::Property &prop)
|
||||
{
|
||||
Xcb::Property prop(false, m_client, atoms->gtk_frame_extents, XCB_ATOM_CARDINAL, 0, 4);
|
||||
m_clientSideDecorated = !prop.isNull() && prop->type != 0;
|
||||
emit clientSideDecoratedChanged();
|
||||
}
|
||||
|
||||
void Client::detectGtkFrameExtents()
|
||||
{
|
||||
Xcb::Property prop = fetchGtkFrameExtents();
|
||||
readGtkFrameExtents(prop);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resizes the decoration, and makes sure the decoration widget gets resize event
|
||||
* even if the size hasn't changed. This is needed to make sure the decoration
|
||||
|
|
2
client.h
2
client.h
|
@ -864,6 +864,8 @@ private:
|
|||
|
||||
void embedClient(xcb_window_t w, xcb_visualid_t visualid, xcb_colormap_t colormap, uint8_t depth);
|
||||
void detectNoBorder();
|
||||
Xcb::Property fetchGtkFrameExtents() const;
|
||||
void readGtkFrameExtents(Xcb::Property &prop);
|
||||
void detectGtkFrameExtents();
|
||||
void destroyDecoration();
|
||||
void updateFrameExtents();
|
||||
|
|
|
@ -99,6 +99,7 @@ bool Client::manage(xcb_window_t w, bool isMapped)
|
|||
|
||||
auto wmClientLeaderCookie = fetchWmClientLeader();
|
||||
auto skipCloseAnimationCookie = fetchSkipCloseAnimation();
|
||||
auto gtkFrameExtentsCookie = fetchGtkFrameExtents();
|
||||
info = new WinInfo(this, m_client, rootWindow(), properties, properties2);
|
||||
|
||||
// If it's already mapped, ignore hint
|
||||
|
@ -120,7 +121,7 @@ bool Client::manage(xcb_window_t w, bool isMapped)
|
|||
if (Xcb::Extensions::self()->isShapeAvailable())
|
||||
xcb_shape_select_input(connection(), window(), true);
|
||||
detectShape(window());
|
||||
detectGtkFrameExtents();
|
||||
readGtkFrameExtents(gtkFrameExtentsCookie);
|
||||
detectNoBorder();
|
||||
fetchIconicName();
|
||||
|
||||
|
|
Loading…
Reference in a new issue