mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 15:11:31 +00:00
[client] input: fix automatic keyboard capture
Treat autoCapture as keyboard ownership while the pointer is inside the guest viewport. Predict the next local position for both absolute and relative motion, then release the keyboard before the pointer crosses an edge. Keep capture, focus, and deferred evdev transitions consistent while retaining the latest local position as the prediction baseline.
This commit is contained in:
@@ -316,12 +316,15 @@ struct CursorState
|
||||
/* true if the position is valid */
|
||||
bool valid;
|
||||
|
||||
/* true if the last local position can be used to predict motion */
|
||||
bool motionValid;
|
||||
|
||||
/* true if auto capture currently requests the keyboard */
|
||||
bool autoCaptureActive;
|
||||
|
||||
/* the button state */
|
||||
unsigned int buttons;
|
||||
|
||||
/* the delta since last warp when in auto capture mode */
|
||||
struct DoublePoint delta;
|
||||
|
||||
/* the scale factor for the mouse sensitiviy */
|
||||
int sens;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user