diff options
| author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-10-20 10:38:11 +0200 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-10-20 10:38:11 +0200 |
| commit | c33732a5305270321beccbd3e1b44881cd2e0004 (patch) | |
| tree | d559d8cbedf82165d931edf15713a76b4730f35b | |
| parent | 624c9f51125ded8cc3e2aa715558cf9c4a6f7108 (diff) | |
| download | plan9front-c33732a5305270321beccbd3e1b44881cd2e0004.tar.xz | |
rio: wtop() after resize fix
wtop() checked w->topped == topped as a fast exit. if you
had the top most window not being current (== input) which
can happen when you delete the current window, then wtop would
after resize would not make the window current because it
is already top topmost one. wtopme() and wcurrent() both are
non-ops when window is already the topmost or window is already
current, so remove the check as its not needed. also topping
the window feels less sluggish.
| -rw-r--r-- | sys/src/cmd/rio/rio.c | 2 | ||||
| -rw-r--r-- | sys/src/cmd/rio/wind.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/src/cmd/rio/rio.c b/sys/src/cmd/rio/rio.c index 98d3dd10b..92fd60846 100644 --- a/sys/src/cmd/rio/rio.c +++ b/sys/src/cmd/rio/rio.c @@ -1220,8 +1220,8 @@ unhide(int j) for(j=0; j<nwindow; j++) if(window[j] == w){ incref(w); - wcurrent(w); wtopme(w); + wcurrent(w); wclose(w); return; } diff --git a/sys/src/cmd/rio/wind.c b/sys/src/cmd/rio/wind.c index dc7d4a88a..337ed5bd2 100644 --- a/sys/src/cmd/rio/wind.c +++ b/sys/src/cmd/rio/wind.c @@ -1311,11 +1311,9 @@ wtop(Point pt) w = wpointto(pt); if(w){ - if(w->topped == topped) - return nil; incref(w); - wcurrent(w); wtopme(w); + wcurrent(w); wclose(w); } return w; |
