[haiku-development] Re: Reading the Mouse Cursor and Dirty Screen Rectangles for VNC

  • From: looncraz <looncraz@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 26 Mar 2015 10:46:12 -0500

On 3/26/2015 10:10, Alexander G. M. Smith wrote:
Which reminds me to ask if it would be easy to add a way of getting the current cursor shape, for use in VNC remote viewing of the screen. Or a way to force it to use the software cursor. It would also be nice to have a list of the dirty rectangles for the whole screen. Doable? - Alex

Yes, both are doable. I'm not certain as to how VNC remote viewing is handled, but I imagine it uses the RemoteHWInterface in the app_server, which will not enable the hardware cursor, so will always use a software cursor.

As for the dirty areas of the screen, the same aforementioned object contains a CopyBackToFront(BRect) method which is called each time a draw is performed by an attached DrawingEngine.

Providing access to a collected dirty region is needed for two ongoing app_server projects, one by Julian Harnath to add layer support to BView and, of course, compositing.

Creating a full-screen BRegion of changed areas is relatively trivial for remote viewing since everything occurs through the same RemoteHWInterface.

The base HWInterface will be getting a couple of methods for tracking changes made by all attached DrawingEngines. This will be used by compositing, for certain, and is obviously valuable for remote viewing. For view layering, though, I'm less certain if this method will work (since the rules change depending on the render target, and view layers need to be agnostic in that regard).

Hope this was in any way helpful ;-)

--The loon

Other related posts: