minor optimization

This commit is contained in:
mathias 2005-05-11 08:57:53 +00:00
parent f726168051
commit 44f2af5c10

View file

@ -312,7 +312,7 @@ void WinButton::clear() {
FbTk::Button::clear(); FbTk::Button::clear();
// ensure the m_listen_to has actually a client // 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.drawable() ||
(m_icon_pixmap.width() != width() - 4 || (m_icon_pixmap.width() != width() - 4 ||
m_icon_pixmap.height() != height() - 4))) { m_icon_pixmap.height() != height() - 4))) {
@ -347,7 +347,7 @@ void WinButton::clear() {
void WinButton::update(FbTk::Subject *subj) { void WinButton::update(FbTk::Subject *subj) {
// just checking, if we the app provides a pixmap. // 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(), XWMHints* hints = XGetWMHints(m_listen_to.fbWindow().display(),
m_listen_to.winClient().window()); m_listen_to.winClient().window());
if (hints == 0) { if (hints == 0) {