summaryrefslogtreecommitdiff
path: root/src/client.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-02-08 10:48:19 +0000
committerDana Jansens <danakj@orodu.net>2003-02-08 10:48:19 +0000
commit9e05db9518c528ac0d2d44311cde267d9886b36a (patch)
treea5e8f8d8dfa3629dd4a52b4502a528fb3d338058 /src/client.cc
parentc54d92b784036a4d9e829592aab938e661287fca (diff)
remove includes for widgetbase.hh. fix bug with circular modal pointer.
Diffstat (limited to 'src/client.cc')
-rw-r--r--src/client.cc3
1 files changed, 3 insertions, 0 deletions
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;
}
}