summaryrefslogtreecommitdiff
path: root/sys/src/cmd/rio/fns.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-10-20 22:42:01 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2012-10-20 22:42:01 +0200
commit624c9f51125ded8cc3e2aa715558cf9c4a6f7108 (patch)
treedc469165dfd3f3e5ca9171dae04f2d976ac0aefe /sys/src/cmd/rio/fns.h
parent558b9558d4d90c0dabaa57c9a3fe79f9f5f626d5 (diff)
rio: preserve window z-order on resize, fix race conditions
sort the window array by w->topped before reshaping all windows. this preserves the window z-order. remove implicit focus change on reshape/move. it called wcurrent() in wtcl thread which might send a wctl message to itself, bad... also we might not want to change focus on reshape, like for the rio resize. so we set the input window explicitely in all call sites. window deletion was racy. wclosewin() destroys w->i, but it is called outside the wctl thread so it might just free the image under libframe doing some text selection. this is fixed the following: add wclunk() function, which basically just marks the window as deleted and removes the reference from the window[] and hidden[] arrays. (called on wclose() when refcount drops to zero). wclosewin() now just frees the image and is only called from the wctl thread on exit or when handing the Deleted message. get a reference to the window when doing sweeping or moving as the filesystem might just clunk it under us and we might end up sending wctl messages to a Exited window. wctl resize message has to fail if the window is not current as it might be hidden... would also be annoying.
Diffstat (limited to 'sys/src/cmd/rio/fns.h')
-rw-r--r--sys/src/cmd/rio/fns.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/rio/fns.h b/sys/src/cmd/rio/fns.h
index d6e152e35..702eb101e 100644
--- a/sys/src/cmd/rio/fns.h
+++ b/sys/src/cmd/rio/fns.h
@@ -1,6 +1,6 @@
void keyboardsend(char*, int);
int whide(Window*);
-int wunhide(int);
+int wunhide(Window*);
void freescrtemps(void);
int parsewctl(char**, Rectangle, Rectangle*, int*, int*, int*, int*, char**, char*, char*);
int writewctl(Xfid*, char*);