diff options
author | markt <markt> | 2007-05-04 17:13:50 (GMT) |
---|---|---|
committer | markt <markt> | 2007-05-04 17:13:50 (GMT) |
commit | db2904e1445bfe09c7ea55e2d67f4e51aeca292f (patch) | |
tree | d58b0fd966562b083ef8e50bf48c9cf936b2ddfb | |
parent | 5eb658a51fbe8fdb4efdc9379f1bc5bffe86931c (diff) | |
download | fluxbox_pavel-db2904e1445bfe09c7ea55e2d67f4e51aeca292f.zip fluxbox_pavel-db2904e1445bfe09c7ea55e2d67f4e51aeca292f.tar.bz2 |
fix infinite loop caused by deiconify command
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/FbCommands.cc | 7 | ||||
-rw-r--r-- | src/Window.cc | 2 |
3 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0.0: | 2 | Changes for 1.0.0: |
3 | *07/05/04: | ||
4 | * Fixed infinite loop caused by deiconify command (Mark) | ||
5 | FbCommands.cc | ||
3 | *07/04/24: | 6 | *07/04/24: |
4 | * Fixed a bug in parsing cli (Mathias, thanks to Steven Kah Hien Wong <steven at | 7 | * Fixed a bug in parsing cli (Mathias, thanks to Steven Kah Hien Wong <steven at |
5 | zensaki dot com> for pointing out the issue) | 8 | zensaki dot com> for pointing out the issue) |
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 060f4d3..afa7984 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -394,8 +394,11 @@ void DeiconifyCmd::execute() { | |||
394 | if (screen == 0) | 394 | if (screen == 0) |
395 | return; | 395 | return; |
396 | 396 | ||
397 | BScreen::Icons::reverse_iterator it= screen->iconList().rbegin(); | 397 | // we need to make a copy of the list of icons, or else our iterator can |
398 | BScreen::Icons::reverse_iterator itend= screen->iconList().rend(); | 398 | // become invalid |
399 | BScreen::Icons icon_list = screen->iconList(); | ||
400 | BScreen::Icons::iterator it = icon_list.begin(); | ||
401 | BScreen::Icons::iterator itend= icon_list.end(); | ||
399 | unsigned int workspace_num= screen->currentWorkspaceID(); | 402 | unsigned int workspace_num= screen->currentWorkspaceID(); |
400 | unsigned int old_workspace_num; | 403 | unsigned int old_workspace_num; |
401 | 404 | ||
diff --git a/src/Window.cc b/src/Window.cc index 066d962..24fc8df 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -458,7 +458,7 @@ void FluxboxWindow::init() { | |||
458 | 458 | ||
459 | restoreAttributes(); | 459 | restoreAttributes(); |
460 | 460 | ||
461 | if (m_workspace_number < 0 || m_workspace_number >= screen().numberOfWorkspaces()) | 461 | if (m_workspace_number >= screen().numberOfWorkspaces()) |
462 | m_workspace_number = screen().currentWorkspaceID(); | 462 | m_workspace_number = screen().currentWorkspaceID(); |
463 | 463 | ||
464 | bool place_window = (m_old_pos_x == static_cast<signed>(m_screen.width())); | 464 | bool place_window = (m_old_pos_x == static_cast<signed>(m_screen.width())); |