fixed transient check in destructor
fluxgen fluxgen
1 files changed,
29 insertions(+),
14 deletions(-)
jump to
M
src/Window.cc
→
src/Window.cc
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.50 2002/05/07 13:50:34 fluxgen Exp $ +// $Id: Window.cc,v 1.51 2002/05/17 13:27:20 fluxgen Exp $ #include "Window.hh"@@ -82,7 +82,7 @@ #endif
{ lastFocusTime.tv_sec = lastFocusTime.tv_usec = 0; - + #ifdef DEBUG fprintf(stderr, I18n::instance()-> getMessage(@@ -90,6 +90,7 @@ FBNLS::WindowSet, FBNLS::WindowCreating,
"FluxboxWindow::FluxboxWindow(): creating 0x%lx\n"), w); + #endif //DEBUG Fluxbox *fluxbox = Fluxbox::instance(); display = fluxbox->getXDisplay();@@ -399,8 +400,7 @@ if (screen==0) //the window wasn't created
return; Fluxbox *fluxbox = Fluxbox::instance(); - - + if (moving || resizing) { screen->hideGeometry(); XUngrabPointer(display, CurrentTime);@@ -413,23 +413,38 @@ workspace->removeWindow(this);
} else //it's iconic screen->removeIcon(this); - if (windowmenu) + if (windowmenu) { delete windowmenu; + windowmenu = 0; + } - if (tab!=0) + if (tab!=0) { delete tab; - tab = 0; + tab = 0; + } - if (client.mwm_hint!=0) + if (client.mwm_hint!=0) { XFree(client.mwm_hint); - - if (client.blackbox_hint!=0) - XFree(client.blackbox_hint); + client.mwm_hint = 0; + } + if (client.blackbox_hint!=0) { + XFree(client.blackbox_hint); + client.blackbox_hint = 0; + } - //TODO: Move this to Workspace::removeWindow - if (client.transient_for!=0) - fluxbox->setFocusedWindow(client.transient_for); + if (client.transient_for!=0) { + //guard from having transient_for = this + if (client.transient_for == this) { + #ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): WARNING! client.transient_for == this WARNING!"<<endl; + #endif //DEBUG + client.transient_for = 0; + } + + fluxbox->setFocusedWindow(client.transient_for); + } + if (client.window_group) fluxbox->removeGroupSearch(client.window_group);