mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
acme: add focus change to log
Currently new, put and del events are being logged. This patch adds a focus event to the log whenever the user changes the focus to another window. This lets programs react to files being edited in acme without the need of being restarted. Change-Id: Idf35c0d7dbfca30e79724dc9f49e44c6a4eb6a1e Reviewed-on: https://plan9port-review.googlesource.com/1140 Reviewed-by: Russ Cox <rsc@google.com>
This commit is contained in:
parent
d52bdd3356
commit
fdf6ef3337
1 changed files with 6 additions and 0 deletions
|
@ -571,6 +571,12 @@ mousethread(void *v)
|
|||
m = mousectl->m;
|
||||
qlock(&row.lk);
|
||||
t = rowwhich(&row, m.xy);
|
||||
|
||||
if((t!=mousetext && t!=nil && t->w!=nil) &&
|
||||
(mousetext==nil || mousetext->w==nil || t->w->id!=mousetext->w->id)) {
|
||||
xfidlog(t->w, "focus");
|
||||
}
|
||||
|
||||
if(t!=mousetext && mousetext!=nil && mousetext->w!=nil){
|
||||
winlock(mousetext->w, 'M');
|
||||
mousetext->eq0 = ~0;
|
||||
|
|
Loading…
Reference in a new issue