Baby questions about cursor and GUI

I am nowhere familiar with GUI protocol and ask some baby questions now.

  1. Can an appVM intercept mouse and keyboard event by creating a window completely outside the screen and let that window get focused?

  2. R4.1 introduced the feature that the cursor can change according to VM request. Is it possible for the cursor to be changed by one VM that does not have any window created or does not have any visible windows on the workspace (be it minimized or on other workspace) at all?

From my understanding, this is where Qubes excels, because nothing can be “visible” or appear over another VM without you knowing. There’s potential from within the same AppVM, but each AppVM has to have it’s own window open that displays and has a border that’s implemented by Qubes (I believe handled by Dom0).

  1. I see from the source code of qubes-gui-daemon that if a window is completely out of screen, Qubes OS may take it differently by not drawing colorful border. This does not seem to be common case.
  2. Cursor is just introduced in R4.1 a few months ago, and this part might not be as secure as other parts of system.

It may be better to invite some dev to answer this question @Demi

My understanding is that a VM can only change the cursor for its own windows. I believe it would be a security vulnerability if it could change the cursor of another VM’s windows (including dom0).