summaryrefslogtreecommitdiff
path: root/nichrome
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-05-02 00:07:52 -0700
committerKeith Packard <keithp@keithp.com>2012-05-02 00:07:52 -0700
commit17ea02197d3a73991486d6d34e5b139f08720a85 (patch)
treef28f21a11cd847fe8344f3b2103f05227027756f /nichrome
parent66e17cd443793787bf6d5204f67bb8f682cbe435 (diff)
nichrome: Skip recursive box resize
There's no need to ask widgets *again* for their preferred sizes, once should suffice. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'nichrome')
-rw-r--r--nichrome/nichrome-box.5c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nichrome/nichrome-box.5c b/nichrome/nichrome-box.5c
index baf7557..915499b 100644
--- a/nichrome/nichrome-box.5c
+++ b/nichrome/nichrome-box.5c
@@ -118,6 +118,9 @@ extend namespace Nichrome {
}
void box_resize (*box_t box, *contained_t contained) {
+ if (Mutex::owner(box->query_lock) == (mutex_owner.owner) Thread::current())
+ return;
+
twixt(Mutex::acquire(box->query_lock); Mutex::release(box->query_lock)) {
int[2] d = dims(box->items);
for (int y = 0; y < d[1]; y++) {