Fix removing windows from icon list
std::remove_if() removes an item from a container and returns a past-the-end iterator ... which equals m_icon_list.end(). As a result the check if (erase_it != m_icon_list.end()) { iconList().erase(erase_it); iconListSig().emit(*this); } will never succeed and thus the iconListSig() will never be emitted.
This commit is contained in:
parent
1ec4fb6b6c
commit
5428edf3da
1 changed files with 3 additions and 3 deletions
|
@ -797,9 +797,9 @@ void BScreen::removeIcon(FluxboxWindow *w) {
|
|||
if (w == 0)
|
||||
return;
|
||||
|
||||
Icons::iterator erase_it = remove_if(iconList().begin(),
|
||||
iconList().end(),
|
||||
bind2nd(equal_to<FluxboxWindow *>(), w));
|
||||
Icons::iterator erase_it = find_if(iconList().begin(),
|
||||
iconList().end(),
|
||||
bind2nd(equal_to<FluxboxWindow *>(), w));
|
||||
// no need to send iconlist signal if we didn't
|
||||
// change the iconlist
|
||||
if (erase_it != m_icon_list.end()) {
|
||||
|
|
Loading…
Reference in a new issue