From 9e05db9518c528ac0d2d44311cde267d9886b36a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 8 Feb 2003 10:48:19 +0000 Subject: remove includes for widgetbase.hh. fix bug with circular modal pointer. --- src/client.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/client.cc') diff --git a/src/client.cc b/src/client.cc index d5be00d0..e78336d3 100644 --- a/src/client.cc +++ b/src/client.cc @@ -821,6 +821,7 @@ void Client::setModal(bool modal) Client *c = this; while (c->_transient_for) { c = c->_transient_for; + if (c == this) break; // circular? if (c->_modal_child) break; // already has a modal child c->_modal_child = this; } @@ -836,7 +837,9 @@ void Client::setModal(bool modal) c = this; while (c->_transient_for) { c = c->_transient_for; + if (c == this) break; // circular? if (c->_modal_child != this) break; // has a different modal child + if (c == replacement) break; // found the replacement itself c->_modal_child = replacement; } } -- cgit v1.2.3