From 9069ae0d80c278fcba837d50f75a49f18ea44c15 Mon Sep 17 00:00:00 2001 From: rathnor Date: Thu, 13 May 2004 01:48:18 +0000 Subject: fix up a number of things for when a window hides while moving, including a crash bug --- ChangeLog | 5 ++++ src/Screen.cc | 6 ++--- src/Window.cc | 81 ++++++++++++++++++++++++++++++++------------------------ src/Window.hh | 13 ++++----- src/Workspace.cc | 6 ++--- src/Workspace.hh | 2 +- 6 files changed, 66 insertions(+), 47 deletions(-) diff --git a/ChangeLog b/ChangeLog index 17b0da1..458dab1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ (Format: Year/Month/Day) Changes for 0.9.10: +*04/05/13: + * Fix a crash when a window closes while [opaque] moving (Simon) + - also tidy up several related things when a window hides + - don't call frame().hide() explicitly, use FBW.hide(bool) + Window.hh/cc Workspace.hh/cc Screen.cc *04/05/04: * Fix EventManager bug/memory leak (possibly caused crash) (Simon) EventManager.hh/cc diff --git a/src/Screen.cc b/src/Screen.cc index 19f7d3a..3497f7d 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.277 2004/05/02 21:12:22 fluxgen Exp $ +// $Id: Screen.cc,v 1.278 2004/05/13 01:48:17 rathnor Exp $ #include "Screen.hh" @@ -851,7 +851,7 @@ void BScreen::changeWorkspaceID(unsigned int id) { } } - currentWorkspace()->hideAll(); + currentWorkspace()->hideAll(false); // set new workspace m_current_workspace = getWorkspace(id); @@ -903,7 +903,7 @@ void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS // if the window isn't on current workspace, hide it if (id != currentWorkspace()->workspaceID()) - win->withdraw(); + win->withdraw(true); reassociateWindow(win, id, true); diff --git a/src/Window.cc b/src/Window.cc index e8cdf32..9299653 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.286 2004/05/03 13:45:23 rathnor Exp $ +// $Id: Window.cc,v 1.287 2004/05/13 01:48:18 rathnor Exp $ #include "Window.hh" @@ -302,11 +302,12 @@ FluxboxWindow::~FluxboxWindow() { cerr<<__FILE__<<"("<<__LINE__<<"): m_labelbuttons.size = "<removeWindowSearchGroup(frame().window().window()); @@ -1265,10 +1266,22 @@ bool FluxboxWindow::setInputFocus() { return ret; } -void FluxboxWindow::hide() { +// don't hide the frame directly, use this function +void FluxboxWindow::hide(bool interrupt_moving) { #ifdef DEBUG cerr<<__FILE__<<"("<<__FUNCTION__<<")["<isStuck()) - (*it)->withdraw(); + (*it)->withdraw(interrupt_moving); } } diff --git a/src/Workspace.hh b/src/Workspace.hh index c2b02f3..90c57d0 100644 --- a/src/Workspace.hh +++ b/src/Workspace.hh @@ -57,7 +57,7 @@ public: /// Set workspace name void setName(const std::string &name); void showAll(); - void hideAll(); + void hideAll(bool interrupt_moving); void removeAll(); void reconfigure(); void shutdown(); -- cgit v0.11.2