diff --git a/src/atasks.cc b/src/atasks.cc index 7d847690c..23bd0a69f 100644 --- a/src/atasks.cc +++ b/src/atasks.cc @@ -331,8 +331,8 @@ void TaskButton::setFlash(bool flashing) { fFlashOn = true; fFlashStart = monotime(); fFlashTimer->setTimer(focusRequestFlashInterval, this, true); - } else { - //fFlashTimer->stopTimer(); + } else if (fFlashTimer) { + fFlashTimer->stopTimer(); } if (fShown == false) diff --git a/src/wmclient.cc b/src/wmclient.cc index 82ff8068b..8d58dd5c9 100644 --- a/src/wmclient.cc +++ b/src/wmclient.cc @@ -1284,6 +1284,13 @@ Pixmap YFrameClient::iconMaskHint() const { return wmHint(IconMaskHint) ? fHints->icon_mask : None; } +void YFrameClient::clearUrgency() { + if (urgencyHint()) { + fHints->flags &= ~XUrgencyHint; + XSetWMHints(xapp->display(), handle(), fHints); + } +} + bool YFrameClient::isDockApp() const { return isDockAppIcon() || isDockAppWindow(); } diff --git a/src/wmclient.h b/src/wmclient.h index c0c557c79..1cecdf20d 100644 --- a/src/wmclient.h +++ b/src/wmclient.h @@ -220,6 +220,7 @@ class YFrameClient: public YDndWindow Pixmap iconPixmapHint() const; Pixmap iconMaskHint() const; bool urgencyHint() const { return wmHint(XUrgencyHint); } + void clearUrgency(); bool isDockApp() const; bool isDockAppIcon() const; bool isDockAppWindow() const; diff --git a/src/wmframe.cc b/src/wmframe.cc index 127eb80bd..59125fd11 100644 --- a/src/wmframe.cc +++ b/src/wmframe.cc @@ -3825,9 +3825,9 @@ void YFrameWindow::updateNetWMFullscreenMonitors(int t, int b, int l, int r) { } } -void YFrameWindow::setWmUrgency(bool wmUrgency) { - if ( !frameOption(foIgnoreUrgent) || !wmUrgency) { - if (wmUrgency != hasState(WinStateUrgent)) { +void YFrameWindow::setWmUrgency(bool urgency) { + if ( !urgency || !frameOption(foIgnoreUrgent)) { + if (urgency != hasState(WinStateUrgent)) { fWinState ^= WinStateUrgent; client()->setStateHint(getState()); updateTaskBar(); diff --git a/src/wmmgr.cc b/src/wmmgr.cc index abd8ed8ea..e459dd0a8 100644 --- a/src/wmmgr.cc +++ b/src/wmmgr.cc @@ -1075,6 +1075,8 @@ void YWindowManager::setFocus(YFrameWindow *f, bool canWarp, bool reorder) { switchFocusTo(f, reorder); f->setWmUrgency(false); + if (c) + c->clearUrgency(); } #ifdef DEBUG if (w == desktop) {