Age | Commit message (Collapse) | Author |
|
run the keyboardtap as a thread instead of a proc
so that we can read input window variable.
This gets rid of the wintap channel.
do focus handling by tracking the last window and
only send context switch when we start typing into
a different window.
have fromtap, totap channels created by open and
use the variable also as the in-use flag.
handle use nbsendp() when sending to the tap
program, as it might be blocked or misbehaving.
if the totap channel is full, we bypass the tap
and send to input again.
handle keyup on focus loss in the window thread instead
(just like the artificial mouseup) it is unrelated to
keyboardtap.
|
|
Multiple readers eat each other's lunch, and it makes more
sense to limit use to one 'pipeline' then just one reader.
This also brings back the 'focus' message from kbdtap used
by ktrans to reset its line buffers when the user switches
windows. An event file was considered, but deemed harmful
to the artwork. To paraphrase an old excuse found in the code:
"rio just isn't structured for that. Apologies."
|
|
This allows users to mount wsys without having
a valid window or creating a new one. In this
mode wsys only servs 'global' files, those that
apply to all windows. Providing this mount to
riostart's namespace gives us two things:
* Allows kbdtap programs(ktrans) to run in riostart
* Obsoletes $wctl and the associated named pipe by providing /dev/wctl in riostart
As such, the wctl pipe and environment variable are removed as well.
|
|
This should make kbdtap related deadlocks
impossible. The tap thread has been rewritten
to use one alt which always allows for the window
handling code to nofiy us regardless if we're send'ing or
recv'ing. We also move the start/stop messages to their
own channel and can the reset code for now.
|
|
Remove tapmesg, allow the reads to accept
flushes, accept writes of multiple messages,
move open/close to Xfid code.
|
|
Even accidentally killing a subrio can be
annoying. So instead of only showing this
on subrios, show it always but always
require an additional click to actually
exit.
|
|
|
|
Switching window focus used to be non deterministic
as the current window in focus (Window *input) was set
concurrently while processing window messages such as
Resized and Topped.
This implements a new approach where wcurrent() and
wuncurrent() are responsible for the synchronization
and switch of the input.
It is implemented by sending a Repaint message to the
old input window first, neccesarily waiting until that
window releases the focus and then input is updated
and then a Topped or Reshaped message is send to the
new input window.
Note, that when the whole screen is resized that no
input changes need to happening anymore.
|
|
As long as the client as the mouse file open
and maintains reading the winname file of the window
after a resize we will avoid drawing the text frame
on a resize as it will be overdrawn by the client.
This reduces flicker on resize somewhat for slow systems.
|
|
Makes the code a bit nicer and allows reusing wsend() in patches.
|
|
grow selection from point of click, not start of selection region.
starting at the beginning of the selection region causes the match
logic to kick in, which is confusing.
|
|
same as sam and vt, three clicks selects a
whitespace-delimited line.
|
|
because a client might not handle resize, rio would try to move ther
window offsceen after 750 ms. however, it does this by window name,
which could have been reassigned by another concurrent rio, causing the
wrong window to disappear.
now we always move the window offscreen before freeimage(). this way we
are sure to still have the right reference to the original window.
|
|
|
|
|
|
|
|
|
|
|
|
When a window is moved or reshaped, that implicitely tops
the window and makes it current. The conseqence of this
is that we always have to redraw the window as if it where
a current window in any case. This was handled for Reshaped
windows, but not when the window was just moved. We now
handle both cases the exact same way, getting rid of the
Moved wctl message.
|
|
kbdfs already provides a /dev/kbdin file for the system, rio does
not need to provide one for the onscreen keyboard anymore.
|
|
9vx doesnt provide a /dev/kbd file and rio faking one
up causes problems with vncv. (issue #223)
|
|
|
|
|
|
xfidflush() now uses a simpler way to flush another xfid.
when we can send to Xfid.c channel, we know that the
xfid is completed. so all xfidflush() needs todo is to
do an alt sending to both Xfid.c and Xfid.flushc.
once the send to Xfid.c succeeds, we know the xfid is gone
and we can respond to the flush request.
theres no need to keep track of flush state anymore. so
Xfid.active and Xfid.flushing can be removed.
note, that it is ok to respond normally to a currently
flushed request.
|
|
when multiple flushes are send, they need to be replied
in order. we ensure this by having the flush xfid taking
over the flushtag (synchronized with a new fs->csyncflush
channel) so the next flush will flush the previous flush.
|
|
dont rely on postnote to shutdown client. instead, make reads on
cons, kbd and mouse error. when we mount a window system over
exportfs, the pid useless and even dangerous! pid should be
only used by clients forked by rio itself.
fix bug in resized(), goodrect() takes rect in screen coordinates!
make rectonscreen() fix window size if the window doesnt fit
on the screen.
improve goodrect() to check for windows outside of the screen or
bigger than screen without borders visible.
|
|
this avoids locking up rio when doing filename completion
on a unresponsive directory.
|
|
|
|
if a window gets hidden/unhidden/resized too fast, the client might have no
chance attaching to that image using winname. so we move the window
offscreen instead and delay the freeimage() by doing it in the deletethread().
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|