minor optimization
This commit is contained in:
parent
f726168051
commit
44f2af5c10
1 changed files with 2 additions and 2 deletions
|
@ -312,7 +312,7 @@ void WinButton::clear() {
|
|||
FbTk::Button::clear();
|
||||
|
||||
// ensure the m_listen_to has actually a client
|
||||
if (m_type == MENUICON && m_listen_to.numClients() && (
|
||||
if (m_type == MENUICON && !m_listen_to.empty() && (
|
||||
!m_icon_pixmap.drawable() ||
|
||||
(m_icon_pixmap.width() != width() - 4 ||
|
||||
m_icon_pixmap.height() != height() - 4))) {
|
||||
|
@ -347,7 +347,7 @@ void WinButton::clear() {
|
|||
void WinButton::update(FbTk::Subject *subj) {
|
||||
|
||||
// just checking, if we the app provides a pixmap.
|
||||
if (m_type == MENUICON && m_listen_to.numClients()) {
|
||||
if (m_type == MENUICON && !m_listen_to.empty()) {
|
||||
XWMHints* hints = XGetWMHints(m_listen_to.fbWindow().display(),
|
||||
m_listen_to.winClient().window());
|
||||
if (hints == 0) {
|
||||
|
|
Loading…
Reference in a new issue