diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-10-22 07:03:47 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-10-22 07:03:47 +0200 |
commit | 99216e01291ab687f74a54dd21dc0b8aa27de8d5 (patch) | |
tree | 8659b1e1892f63e96abf79df244d2d3858f3a26e /sys/src/cmd/rio/dat.h | |
parent | 54d2424a7cab7fe1808f7bdb7acade6af0e3428a (diff) |
rio: fix deadlock
we can't really change the Window *input from
outside the winctl() thread. the problem is
that the window might end up reading the
mouse (scroll, select) which makes the w->cctl
channel block once you try to talk to the
window again (from the mousethread). this also
means we have to coordinate window switchin
from the winctl proc waiting for the current
window to release the input and then take over.
thers a new Winctl message Topped that basically
does that now using Wakeup and a chan to
synchronize.
Diffstat (limited to 'sys/src/cmd/rio/dat.h')
-rw-r--r-- | sys/src/cmd/rio/dat.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/src/cmd/rio/dat.h b/sys/src/cmd/rio/dat.h index 363be0256..690bd4168 100644 --- a/sys/src/cmd/rio/dat.h +++ b/sys/src/cmd/rio/dat.h @@ -61,13 +61,14 @@ enum /* control messages */ Wakeup, Reshaped, Moved, + Topped, + Repaint, Refresh, Movemouse, Rawon, Rawoff, Holdon, Holdoff, - Repaint, Deleted, Exited, }; @@ -76,7 +77,7 @@ struct Wctlmesg { int type; Rectangle r; - Image *image; + void *p; }; struct Conswritemesg @@ -132,7 +133,7 @@ struct Window Mousectl mc; Mouseinfo mouse; Channel *ck; /* chan(char*) */ - Channel *cctl; /* chan(Wctlmesg)[20] */ + Channel *cctl; /* chan(Wctlmesg)[4] */ Channel *conswrite; /* chan(Conswritemesg) */ Channel *consread; /* chan(Consreadmesg) */ Channel *mouseread; /* chan(Mousereadmesg) */ @@ -188,8 +189,7 @@ char* wcontents(Window*, int*); int wbswidth(Window*, Rune); int wclickmatch(Window*, int, int, int, uint*); int wclose(Window*); -int wctlmesg(Window*, int, Rectangle, Image*); -int wctlmesg(Window*, int, Rectangle, Image*); +int wctlmesg(Window*, int, Rectangle, void*); uint wbacknl(Window*, uint, uint); uint winsert(Window*, Rune*, int, uint); void waddraw(Window*, Rune*, int); @@ -213,7 +213,7 @@ void wresize(Window*, Image*, int); void wscrdraw(Window*); void wscroll(Window*, int); void wselect(Window*); -void wsendctlmesg(Window*, int, Rectangle, Image*); +void wsendctlmesg(Window*, int, Rectangle, void*); void wsetcursor(Window*, int); void wsetname(Window*); void wsetorigin(Window*, uint, int); |