Drop static getStringProperty wrappers in Toplevel
The methods Toplevel::staticWmCommand and Toplevel::staticSessionId were both only used from one method and just wrapping an invocation to getStringProperty. REVIEW: 117474
This commit is contained in:
parent
f1f6d6eea8
commit
acdff6ea52
2 changed files with 4 additions and 22 deletions
24
toplevel.cpp
24
toplevel.cpp
|
@ -145,22 +145,6 @@ QRect Toplevel::visibleRect() const
|
||||||
return r.translated(geometry().topLeft());
|
return r.translated(geometry().topLeft());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
Returns SM_CLIENT_ID property for a given window.
|
|
||||||
*/
|
|
||||||
QByteArray Toplevel::staticSessionId(xcb_window_t w)
|
|
||||||
{
|
|
||||||
return getStringProperty(w, atoms->sm_client_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
Returns WM_COMMAND property for a given window.
|
|
||||||
*/
|
|
||||||
QByteArray Toplevel::staticWmCommand(xcb_window_t w)
|
|
||||||
{
|
|
||||||
return getStringProperty(w, XCB_ATOM_WM_COMMAND, ' ');
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns WM_CLIENT_LEADER property for a given window.
|
Returns WM_CLIENT_LEADER property for a given window.
|
||||||
*/
|
*/
|
||||||
|
@ -187,9 +171,9 @@ void Toplevel::getWmClientLeader()
|
||||||
*/
|
*/
|
||||||
QByteArray Toplevel::sessionId() const
|
QByteArray Toplevel::sessionId() const
|
||||||
{
|
{
|
||||||
QByteArray result = staticSessionId(window());
|
QByteArray result = getStringProperty(window(), atoms->sm_client_id);
|
||||||
if (result.isEmpty() && wmClientLeaderWin && wmClientLeaderWin != window())
|
if (result.isEmpty() && wmClientLeaderWin && wmClientLeaderWin != window())
|
||||||
result = staticSessionId(wmClientLeaderWin);
|
result = getStringProperty(wmClientLeaderWin, atoms->sm_client_id);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,9 +183,9 @@ QByteArray Toplevel::sessionId() const
|
||||||
*/
|
*/
|
||||||
QByteArray Toplevel::wmCommand()
|
QByteArray Toplevel::wmCommand()
|
||||||
{
|
{
|
||||||
QByteArray result = staticWmCommand(window());
|
QByteArray result = getStringProperty(window(), XCB_ATOM_WM_COMMAND, ' ');
|
||||||
if (result.isEmpty() && wmClientLeaderWin && wmClientLeaderWin != window())
|
if (result.isEmpty() && wmClientLeaderWin && wmClientLeaderWin != window())
|
||||||
result = staticWmCommand(wmClientLeaderWin);
|
result = getStringProperty(wmClientLeaderWin, XCB_ATOM_WM_COMMAND, ' ');
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -424,8 +424,6 @@ protected:
|
||||||
bool m_isDamaged;
|
bool m_isDamaged;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static QByteArray staticSessionId(xcb_window_t);
|
|
||||||
static QByteArray staticWmCommand(xcb_window_t);
|
|
||||||
static xcb_window_t staticWmClientLeader(xcb_window_t);
|
static xcb_window_t staticWmClientLeader(xcb_window_t);
|
||||||
// when adding new data members, check also copyToDeleted()
|
// when adding new data members, check also copyToDeleted()
|
||||||
Xcb::Window m_client;
|
Xcb::Window m_client;
|
||||||
|
|
Loading…
Reference in a new issue