summaryrefslogtreecommitdiff
path: root/sys/src/cmd/vnc/vncs.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-07-30 02:21:28 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2018-07-30 02:21:28 +0200
commit36abc45f2895ebc6b02f746586e814349581579b (patch)
tree38b8630235d82554a35a068abf06b769b3e5e11a /sys/src/cmd/vnc/vncs.c
parentda5c0bada7be9dd82ca1f63e621670143597d3bb (diff)
vncv: implement extended DesktopSize extension, cleanup
Diffstat (limited to 'sys/src/cmd/vnc/vncs.c')
-rw-r--r--sys/src/cmd/vnc/vncs.c34
1 files changed, 7 insertions, 27 deletions
diff --git a/sys/src/cmd/vnc/vncs.c b/sys/src/cmd/vnc/vncs.c
index f613ec864..efa1b996d 100644
--- a/sys/src/cmd/vnc/vncs.c
+++ b/sys/src/cmd/vnc/vncs.c
@@ -21,29 +21,6 @@ Dev *devtab[] =
nil
};
-static char *msgname[] = {
- [MPixFmt] = "MPixFmt",
- [MFixCmap] = "MFixCmap",
- [MSetEnc] = "MSetEnc",
- [MFrameReq] = "MFrameReq",
- [MKey] = "MKey",
- [MMouse] = "MMouse",
- [MCCut] = "MCCut",
-};
-
-static char *encname[] = {
- [EncRaw] = "raw",
- [EncCopyRect] = "copy rect",
- [EncRre] = "rre",
- [EncCorre] = "corre",
- [EncHextile] = "hextile",
- [EncZlib] = "zlib",
- [EncTight] = "zlibtight",
- [EncZHextile] = "zhextile",
- [EncMouseWarp] = "mousewarp",
-
-};
-
/*
* list head. used to hold the list, the lock, dim, and pixelfmt
*/
@@ -594,10 +571,10 @@ vncaccept(Vncs *v)
if(!shared)
killclients(v);
- v->dim = (Point){Dx(gscreen->r), Dy(gscreen->r)};
- vncwrpoint(v, v->dim);
+ v->dim = rectsubpt(screen->r, screen->r.min);
+ vncwrpoint(v, v->dim.max);
if(verbose)
- fprint(2, "%V: send screen size %P (rect %R)\n", v, v->dim, gscreen->r);
+ fprint(2, "%V: send screen size %R\n", v, v->dim);
v->bpp = gscreen->depth;
v->depth = gscreen->depth;
@@ -696,6 +673,9 @@ setencoding(Vncs *v)
case EncMouseWarp:
v->canwarp = 1;
continue;
+ case EncDesktopSize:
+ case EncXDesktopSize:
+ continue;
}
if(v->countrect != nil)
continue;
@@ -1118,7 +1098,7 @@ clientwriteproc(Vncs *v)
|| (v->image && v->image->chan != v->imagechan)){
if(v->image)
freememimage(v->image);
- v->image = allocmemimage(Rpt(ZP, v->dim), v->imagechan);
+ v->image = allocmemimage(v->dim, v->imagechan);
if(v->image == nil){
fprint(2, "%V: allocmemimage: %r; hanging up\n", v);
vnchungup(v);