@@ 78,7 78,7 @@ enum{
static Dirtab mousedir[]={
"mouse", {Qmouse}, 0, 0666,
"mousein", {Qmousein}, 0, 0220,
- "mousectl", {Qmousectl}, 0, 0220,
+ "mousectl", {Qmousectl}, 0, 0660,
};
static uchar buttonmap[8] = {
@@ 238,6 238,15 @@ penmouseread(Chan *c, void *va, long n, vlong)
case CHDIR:
return devdirread(c, va, n, mousedir, nelem(mousedir), devgen);
+ case Qmousectl:
+ sprint(buf, "c%11ld %11ld %11ld %11ld",
+ calibration.scalex, calibration.scaley,
+ calibration.transx, calibration.transy);
+ if(n > 1+4*12)
+ n = 1+4*12;
+ memmove(va, buf, n);
+ return n;
+
case Qmouse:
while(penmousechanged(0) == 0)
sleep(&mouse.r, penmousechanged, 0);
@@ 366,7 366,6 @@ screenwin(void)
h = memdefont->height;
r = insetrect(gscreen->r, 4);
- r.max.y -= 56;
memimagedraw(gscreen, r, memblack, ZP, memopaque, ZP);
window = insetrect(r, 4);
@@ 1097,7 1097,6 @@ readtime(ulong off, char *buf, int n)
vlong nsec, ticks;
long sec;
char str[7*NUMSIZE];
- // char
nsec = todget(&ticks);
if(fasthz == 0LL)