summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-wm/fluxbox/files/0.9.10/fluxbox-0.9.10-workspacemenu-crash.patch')
-rw-r--r--x11-wm/fluxbox/files/0.9.10/fluxbox-0.9.10-workspacemenu-crash.patch88
1 files changed, 88 insertions, 0 deletions
diff --git a/x11-wm/fluxbox/files/0.9.10/fluxbox-0.9.10-workspacemenu-crash.patch b/x11-wm/fluxbox/files/0.9.10/fluxbox-0.9.10-workspacemenu-crash.patch
new file mode 100644
index 000000000000..03207cc656b4
--- /dev/null
+++ b/x11-wm/fluxbox/files/0.9.10/fluxbox-0.9.10-workspacemenu-crash.patch
@@ -0,0 +1,88 @@
+Index: src/Screen.cc
+===================================================================
+RCS file: /cvsroot/fluxbox/fluxbox/src/Screen.cc,v
+retrieving revision 1.286
+retrieving revision 1.288
+diff -u -r1.286 -r1.288
+--- src/Screen.cc 30 Aug 2004 11:33:23 -0000 1.286
++++ src/Screen.cc 6 Sep 2004 13:17:56 -0000 1.288
+@@ -407,11 +407,17 @@
+ }
+
+ BScreen::~BScreen() {
++
+ if (! managed)
+ return;
+-
++
+ if (m_rootmenu.get() != 0)
+ m_rootmenu->removeAll();
++
++ // Since workspacemenu holds client list menus (from workspace)
++ // we need to destroy it before we destroy workspaces
++ m_workspacemenu.reset(0);
++
+
+ if (geom_pixmap != None)
+ imageControl().removeImage(geom_pixmap);
+@@ -651,7 +657,7 @@
+ const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end();
+ for (; win_it != win_it_end; ++win_it) {
+ if (*win_it != except)
+- (*win_it)->menu().hide();
++ (*win_it)->menu().hide();
+ }
+ }
+ }
+@@ -772,7 +778,12 @@
+ if (w == 0)
+ return;
+
++ // make sure we have a unique list
++ if (find(getIconList().begin(), getIconList().end(), w) != getIconList().end())
++ return;
++
+ m_icon_list.push_back(w);
++
+ // notify listeners
+ m_iconlist_sig.notify();
+ }
+@@ -782,20 +793,28 @@
+ if (w == 0)
+ return;
+
+- Icons::iterator erase_it = remove_if(m_icon_list.begin(),
+- m_icon_list.end(),
++ Icons::iterator erase_it = remove_if(getIconList().begin(),
++ getIconList().end(),
+ bind2nd(equal_to<FluxboxWindow *>(), w));
+- if (erase_it != m_icon_list.end())
+- m_icon_list.erase(erase_it);
+-
+- m_iconlist_sig.notify();
++ // no need to send iconlist signal if we didn't
++ // change the iconlist
++ if (erase_it != m_icon_list.end()) {
++ getIconList().erase(erase_it);
++ m_iconlist_sig.notify();
++ }
+ }
+
+ void BScreen::removeWindow(FluxboxWindow *win) {
+- if (win->isIconic())
+- removeIcon(win);
+- else
+- getWorkspace(win->workspaceNumber())->removeWindow(win, false);
++#ifdef DEBUG
++ cerr<<"BScreen::removeWindow("<<win<<")"<<endl;
++#endif // DEBUG
++ // extra precaution, if for some reason, the
++ // icon list should be out of sync
++ removeIcon(win);
++ // remove from workspace
++ Workspace *space = getWorkspace(win->workspaceNumber());
++ if (space != 0)
++ space->removeWindow(win, false);
+ }
+
+