Commit graph

40 commits

Author SHA1 Message Date
cinap_lenrek 0ad8548b70 rio: fix auto compmplete candidates getting read back without prompt 2012-11-10 02:30:17 +01:00
cinap_lenrek 30d54cc055 rio: fix topping a hidden window does not activate the foreground font color 2012-10-30 23:18:53 +01:00
cinap_lenrek 99216e0129 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.
2012-10-22 07:03:47 +02:00
cinap_lenrek 54d2424a7c rio: fix cursor for sizing nocurrent window
wrepaint() used to also set the cursor for the window
if it was current. this reset the corner cursors on
bandresize when one tried to attempt to size a window
that was not current. make repaint just repaint the
window and border. set cursor explicitely for hold
toggle.
2012-10-21 18:27:43 +02:00
cinap_lenrek bf13408df2 rio: various fixes
use notefd in killprocs() insead of postnote() as the process
might'v exited. the notefd stays valid even if the particular
process it was originaly opend on exited. remove the Window.pid
field as its not needed.

dup() the notefd for interruptproc as the window might'v gone
away and closed the notefd file descriptor, resulting in us
writing to the wrong thing.

use snprint() instead of sprint() for safety.

fix bogus debug fprint().

add missing "visible" flushimage() after Reshaped winctl message
got handled. i assumed wsetname()/nameimage() would be enough,
it but does a invisible flush so softscreen doesnt get updated
immidiately.

do not make allocimage() failure in scrtemps() fatal. it wont
draw the window properly, but it gives the user a chance to
delete some windows to recover.
2012-10-21 17:00:12 +02:00
cinap_lenrek 8057e48ae1 rio: colors, flicker reduction, refresh after mouse close
allocate all the colors in iconinit(), remove unused ones
like grey. rename darkgrey to paletextcol because thats
what it is used for. new approach to window image allocation.
we allocate the window with DNofill and let the window fill
itself. this reduces flickering especially with (-b) option
and makes rio resize feel a lot faster.

wrefresh() didnt work. now fixed.
2012-10-20 15:51:32 +02:00
cinap_lenrek c33732a530 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.
2012-10-20 10:38:11 +02:00
cinap_lenrek 624c9f5112 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.
2012-10-20 22:42:01 +02:00
cinap_lenrek 0a3eb7d6b1 rio: copy window labels for menu3
as the menu is displayed, the window might go away or change its
label causing menuhit() to dereference bad memory. just strdup()
the labels before passing to menu3str to prevent accidents.
2012-10-18 18:51:32 +02:00
cinap_lenrek 92d3ff8426 rio: single line scroll up/down with holding shift key 2012-09-16 02:49:41 +02:00
cinap_lenrek 87fca361f7 rio: rect outside screen counts as covered wcovered() 2012-08-22 00:11:42 +02:00
cinap_lenrek 2dd17995f1 rio: fix mistake 2012-08-16 06:57:58 +02:00
cinap_lenrek 711557c85e rio: add some tolerance when declaring windows covered 2012-08-16 06:32:34 +02:00
cinap_lenrek 2eb369bb1d rio: add covered (burried) windows to the menu3 hidden window list 2012-08-16 04:00:32 +02:00
cinap_lenrek 15c0d4b7c4 rio: add scroll lock key to toggle scroll mode 2012-07-28 14:47:35 +02:00
cinap_lenrek 98b9c4eb1e rio: dont shift window out to the left when its too wide for the screen 2012-07-26 17:28:14 +02:00
stanley lieber c065e02a99 rio/rio.c: update usage 2012-06-03 15:19:23 -05:00
cinap_lenrek 8791baf8b3 rio: dont list files we dont serve when reading directory 2012-05-08 23:53:46 +02:00
cinap_lenrek 20c27e0197 rio: keep window rects managable on rio resize 2012-03-13 08:14:55 +01:00
cinap_lenrek 21cedbedb2 rio: fix memory leak for w->dir 2012-01-28 20:29:55 +01:00
cinap_lenrek 205f12720e rio: don't hardcode font 2011-12-09 21:44:02 +01:00
cinap_lenrek 25f4840c7e rio: dont serve /dev/screen from display->image, as its not updated on resize. instead, use screen and omit the file if provided by the enviroment. allow unaligned reads. 2011-11-29 13:41:02 -05:00
cinap_lenrek c389d96769 rio: return correct color chan after screen depth change 2011-11-25 01:10:46 +01:00
cinap_lenrek e1bb660ef2 rio: return correct color chan after screen depth change 2011-11-25 00:49:41 +01:00
stanley lieber 315b61ade3 rio: use -b instead of the $reverse env variable 2011-11-19 12:43:15 -06:00
cinap_lenrek 205a39474c rio: use -scroll parameter from attach message 2011-10-13 06:18:57 +02:00
cinap_lenrek 4e9e860776 rio: fix kbdin 2011-05-28 08:23:32 +00:00
cinap_lenrek fbbb449cc0 big /dev/kbd change, new format, support Alt+Stuff (key composing) 2011-05-28 08:16:01 +00:00
cinap_lenrek ec4bcbd01f rio: disable cons if /dev/kbd is open, add games/doom 2011-05-26 23:30:17 +00:00
cinap_lenrek befae4b650 rio: run kbdproc in with clean fdtable 2011-05-26 14:54:28 +00:00
cinap_lenrek f258c3725d rio: dont leak the /dev/consctl and /dev/kbd filedescriptors into windows 2011-05-23 21:43:51 +00:00
cinap_lenrek 545fc5e329 rio: remove useless if() 2011-05-13 09:08:27 +00:00
cinap_lenrek 07cfc31444 fix broken kbdproc buffering 2011-05-13 03:27:25 +00:00
cinap_lenrek ac2e6cf020 rio: continue on zero length /dev/cons read, put reverse pale colors back in 2011-05-11 13:38:28 +00:00
cinap_lenrek d831a028dc ignore \0 bytes, disable navigation keys when /dev/kbd is open 2011-05-11 09:23:01 +00:00
cinap_lenrek bc91b2709f merge 2011-05-11 05:56:28 +00:00
cinap_lenrek 4fcc906e7f add /dev/kbd support to rio 2011-05-11 05:55:48 +00:00
stanley lieber ec236059b6 there are no pastel paints in the dungeons and dragons world - rob pike 2011-05-09 16:51:12 +00:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen e5888a1ffd Import sources from 2011-03-30 iso image 2011-03-30 15:46:40 +03:00