udevbe / greenfield

HTML5 Wayland compositor :seedling:
GNU Affero General Public License v3.0
918 stars 28 forks source link

Is this read only on the web #4

Closed ghost closed 5 years ago

ghost commented 6 years ago

Take for example a rich text widget. Your only rendering images to the frontend so there is no real text box on the front end. But you know the co-ordinates of where the textbox is so you just need to capture the mouse and keyboard event in the browser and pipe them back to the server where they are fed into the running desktop app causing the screen to change and so be fed up to the web client in the video stream.

Or have I gotten this totally wrong ? Maybe your rendering real DOM objects ?

Zubnix commented 6 years ago

Yes pretty much. The compositor running in the browser (Greenfield) is not aware of how the client is representing it's content. However, Greenfield does know where each individual client/program is placed on screen, what it's dimensions are, when it's updating etc. That's because each program/client/window is represented by an invidual HTML5 canvas inside your browser DOM.