aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ClientMenu.cc7
-rw-r--r--src/FbTk/Menu.cc1
-rw-r--r--src/Screen.cc2
-rw-r--r--src/Window.cc16
-rw-r--r--src/Window.hh2
-rw-r--r--src/Workspace.cc2
6 files changed, 11 insertions, 19 deletions
diff --git a/src/ClientMenu.cc b/src/ClientMenu.cc
index c70da85..ae35aab 100644
--- a/src/ClientMenu.cc
+++ b/src/ClientMenu.cc
@@ -46,9 +46,14 @@ public:
46 FluxboxWindow *fbwin = m_client.fbwindow(); 46 FluxboxWindow *fbwin = m_client.fbwindow();
47 if (fbwin == 0) 47 if (fbwin == 0)
48 return; 48 return;
49
50 // this MenuItem object can get destroyed as a result of focus(), so we
51 // must get a local copy of the parent menu
52 FbTk::Menu *parent = menu();
53
49 m_client.focus(); 54 m_client.focus();
50 fbwin->raise(); 55 fbwin->raise();
51 menu()->hide(); 56 parent->hide();
52 } 57 }
53 58
54 const std::string &label() const { return m_client.title(); } 59 const std::string &label() const { return m_client.title(); }
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 0559f0d..f10f1b7 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -111,6 +111,7 @@ Menu::Menu(MenuTheme &tm, ImageControl &imgctrl):
111 111
112 m_internal_menu = 112 m_internal_menu =
113 m_moving = 113 m_moving =
114 m_closing =
114 m_torn = 115 m_torn =
115 m_visible = false; 116 m_visible = false;
116 117
diff --git a/src/Screen.cc b/src/Screen.cc
index 9a7d433..a87a842 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1329,7 +1329,7 @@ void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS
1329 if (id == currentWorkspace()->workspaceID() && !win->isIconic()) 1329 if (id == currentWorkspace()->workspaceID() && !win->isIconic())
1330 win->deiconify(false, false); 1330 win->deiconify(false, false);
1331 else { 1331 else {
1332 win->withdraw(true); 1332 win->hide(true);
1333 FocusControl::revertFocus(*this); 1333 FocusControl::revertFocus(*this);
1334 } 1334 }
1335 1335
diff --git a/src/Window.cc b/src/Window.cc
index 74deb9b..9ec92c4 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1389,7 +1389,7 @@ bool FluxboxWindow::focus() {
1389 // fetch the window to the current workspace 1389 // fetch the window to the current workspace
1390 if (model == BScreen::FETCH_ACTIVE_WINDOW || 1390 if (model == BScreen::FETCH_ACTIVE_WINDOW ||
1391 (isIconic() && model == BScreen::SEMIFOLLOW_ACTIVE_WINDOW)) 1391 (isIconic() && model == BScreen::SEMIFOLLOW_ACTIVE_WINDOW))
1392 screen().sendToWorkspace(screen().currentWorkspaceID(), this, true); 1392 screen().sendToWorkspace(screen().currentWorkspaceID(), this, false);
1393 // warp to the workspace of the window 1393 // warp to the workspace of the window
1394 else 1394 else
1395 screen().changeWorkspaceID(workspaceNumber()); 1395 screen().changeWorkspaceID(workspaceNumber());
@@ -1586,18 +1586,6 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) {
1586 raise(); 1586 raise();
1587} 1587}
1588 1588
1589/**
1590 Set window in withdrawn state
1591*/
1592void FluxboxWindow::withdraw(bool interrupt_moving) {
1593#ifdef DEBUG
1594 cerr<<"FluxboxWindow::"<<__FUNCTION__<<": this = "<<this<<endl;
1595#endif // DEBUG
1596 iconic = false;
1597
1598 hide(interrupt_moving);
1599}
1600
1601/** setFullscreen mode: 1589/** setFullscreen mode:
1602 1590
1603 - maximize as big as the screen is, dont care about slit / toolbar 1591 - maximize as big as the screen is, dont care about slit / toolbar
@@ -3901,7 +3889,7 @@ void FluxboxWindow::changeBlackboxHints(const BlackboxHints &net) {
3901 screen().reassociateWindow(this, net.workspace, true); 3889 screen().reassociateWindow(this, net.workspace, true);
3902 3890
3903 if (screen().currentWorkspaceID() != net.workspace) 3891 if (screen().currentWorkspaceID() != net.workspace)
3904 withdraw(true); 3892 hide(true);
3905 else 3893 else
3906 deiconify(); 3894 deiconify();
3907 } 3895 }
diff --git a/src/Window.hh b/src/Window.hh
index cb32768..d4040fc 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -266,8 +266,6 @@ public:
266 void close(); 266 void close();
267 /// kill current client 267 /// kill current client
268 void kill(); 268 void kill();
269 /// set the window in withdrawn state
270 void withdraw(bool interrupt_moving);
271 /// set fullscreen 269 /// set fullscreen
272 void setFullscreen(bool flag); 270 void setFullscreen(bool flag);
273 /// toggle maximize 271 /// toggle maximize
diff --git a/src/Workspace.cc b/src/Workspace.cc
index fe30a8f..e1dcc7a 100644
--- a/src/Workspace.cc
+++ b/src/Workspace.cc
@@ -140,7 +140,7 @@ void Workspace::hideAll(bool interrupt_moving) {
140 Windows::reverse_iterator it_end = m_windowlist.rend(); 140 Windows::reverse_iterator it_end = m_windowlist.rend();
141 for (; it != it_end; ++it) { 141 for (; it != it_end; ++it) {
142 if (! (*it)->isStuck()) 142 if (! (*it)->isStuck())
143 (*it)->withdraw(interrupt_moving); 143 (*it)->hide(interrupt_moving);
144 } 144 }
145} 145}
146 146