9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] vncs and warped pointers
@ 2004-11-20 15:22 andrey mirtchovski
  2004-11-20 16:08 ` David Leimbach
  0 siblings, 1 reply; 16+ messages in thread
From: andrey mirtchovski @ 2004-11-20 15:22 UTC (permalink / raw)
  To: 9fans

If you've tried vnc-ing to a Plan 9 machine from UNIX you'll know that
it doesn't really work 100% because the mouse pointer isn't warping
properly, which brings down the mood of acme editing sessions.  there
are provisions made (EncMouseWarp) for supporting this but i'm not
sure where exactly are they supposed to work.  not in tightvnc.

If you prefer vnc to drawterm however and if you'd like to have mouse
warping in acme, here are instructions on how to modify both vncs and
TightVNC to get proper warping behaviour using the protocol extensions
used by TightVNC (Plan 9 must conform to lUNIX, as usual):

On the Plan 9 side:

	plan9% diff vncs.c /sys/src/cmd/vnc/vncs.c
	684d683
	< 	v->canwarp = 1;
	1019c1018
	< 		vncwrlong(v, 0xFFFFFF18); /* extension to the protocol used by tightvnc, at least */
	---
	> 		vncwrlong(v, EncMouseWarp);
	plan9% 


On the TightVNC side, download tightvnc from www.tightvnc.com,
uncompress do the 'xmkmf; make World' dance and edit
vncviewer/cursor.c's HandleCursorPos() thusly:

	mirtchov@localrob$ diff cursor.c cursor.c.old 
	322c322,324
	<   XWarpPointer(dpy, None, desktopWin, 0, 0, 0, 0, x, y);
	---
	>   if (appData.useX11Cursor) {
	>     if (appData.fullScreen)
	>       XWarpPointer(dpy, None, desktopWin, 0, 0, 0, 0, x, y);
	324c326,335
	<   return True; 
	---
	>     return True; 
	>   }
	> 
	>   if (x >= si.framebufferWidth)
	>     x = si.framebufferWidth - 1;
	>   if (y >= si.framebufferHeight)
	>     y = si.framebufferHeight - 1;
	> 
	>   SoftCursorMove(x, y);
	>   return True;

Essentially hardcoding TightVNC to warp always. 

Hope you find it useful.  There are a few things that are still
annoying -- if acme wants to warp the cursor while you're moving it
the warp will be lost.  That's just how vncviewer was written.

andrey, who woke up way too early this morning...

ps: crashes under plan9port's rio when attempting to hide the
window...  works with twm though! :)

pps: this mail written using vncs/vncviewer + warping



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-11-22 21:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-20 15:22 [9fans] vncs and warped pointers andrey mirtchovski
2004-11-20 16:08 ` David Leimbach
2004-11-20 16:17   ` andrey mirtchovski
2004-11-21  6:14     ` [9fans] Booting a new kernel Paul Lalonde
2004-11-21 23:15       ` pat
2004-11-22  6:27       ` [9fans] " Paul Lalonde
2004-11-22  6:51         ` geoff
2004-11-22 18:30           ` [9fans] Video and mouse problems Paul Lalonde
2004-11-22 20:28             ` Paul Lalonde
2004-11-22 20:41               ` andrey mirtchovski
2004-11-22 20:53                 ` Charles Forsyth
2004-11-22 21:31                 ` Paul Lalonde
2004-11-22 21:34                   ` Russ Cox
2004-11-22 21:39                     ` Paul Lalonde
2004-11-21 17:51     ` [9fans] vncs and warped pointers David Leimbach
2004-11-21 21:44       ` David Leimbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).