main-- / windows-gaming

This project makes it easy and straightforward to set up PCI/VGA passthrough on your system. - OR AT LEAST IT WOULD, IF IT WASNT DEAD
6 stars 1 forks source link

TemporaryLightEntry #128

Closed oberien closed 7 years ago

oberien commented 7 years ago

It would be nice to have a way to seamlessly move the mouse between linux and windows monitors without the need to manually press a key / execute a command to attach / detach. With light IO entry this should be possible, as attaching and detaching is nearly instant. This idea is rather hard to generically implement, which is why a standalone binary connecting as a client to the driver's control socket should be created.

On X11 the absolute mouse position can be gotten as seen here. Additionally, we need to listen for the EVENT_MASK_SUBSTRUCTURE_NOTIFY event, so that we can reregister ourselves to all new / changed windows.

In the driver a new command should be created, TemporaryLightEntry. This triggers a light entry and notifies the controller to forward x/y coordinates of the mouse back to the socket that command was received on. The client can send a IoExit at any point, which will detach the light IO entry and reset the state of that control connection. Any other command is invalid and will result in the connection being closed.

On Windows, the following techniques can be used to get global mouse events and the bounds of all screens: