fix infinite loop caused by deiconify command
markt markt
3 files changed,
9 insertions(+),
3 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -1,5 +1,8 @@
(Format: Year/Month/Day) Changes for 1.0.0: +*07/05/04: + * Fixed infinite loop caused by deiconify command (Mark) + FbCommands.cc *07/04/24: * Fixed a bug in parsing cli (Mathias, thanks to Steven Kah Hien Wong <steven at zensaki dot com> for pointing out the issue)
M
src/FbCommands.cc
→
src/FbCommands.cc
@@ -394,8 +394,11 @@ BScreen *screen = Fluxbox::instance()->mouseScreen();
if (screen == 0) return; - BScreen::Icons::reverse_iterator it= screen->iconList().rbegin(); - BScreen::Icons::reverse_iterator itend= screen->iconList().rend(); + // we need to make a copy of the list of icons, or else our iterator can + // become invalid + BScreen::Icons icon_list = screen->iconList(); + BScreen::Icons::iterator it = icon_list.begin(); + BScreen::Icons::iterator itend= icon_list.end(); unsigned int workspace_num= screen->currentWorkspaceID(); unsigned int old_workspace_num;
M
src/Window.cc
→
src/Window.cc
@@ -458,7 +458,7 @@ grabButtons();
restoreAttributes(); - if (m_workspace_number < 0 || m_workspace_number >= screen().numberOfWorkspaces()) + if (m_workspace_number >= screen().numberOfWorkspaces()) m_workspace_number = screen().currentWorkspaceID(); bool place_window = (m_old_pos_x == static_cast<signed>(m_screen.width()));