all repos — fluxbox @ db2904e1445bfe09c7ea55e2d67f4e51aeca292f

custom fork of the fluxbox windowmanager

fix infinite loop caused by deiconify command
markt markt
commit

db2904e1445bfe09c7ea55e2d67f4e51aeca292f

parent

5eb658a51fbe8fdb4efdc9379f1bc5bffe86931c

3 files changed, 9 insertions(+), 3 deletions(-)

jump to
M ChangeLogChangeLog

@@ -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.ccsrc/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.ccsrc/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()));