mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-12-07 08:38:13 +00:00
[client] fix the warp logic to account for still pending warps to finish
As X11 is a server/client protocol, issuing commands such as XWarpPointer do not happen immediately, as such we need to identify when the warp is complete to know to null out the movement. To do this we track each warp issued and look for it's completion in the event filter. As some events come in via XInput2 we need to also make use of this instead of just relying on MotionNotify, as such the support has been implemented for XI_Motion events.
This commit is contained in:
@@ -25,6 +25,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "dynamic/renderers.h"
|
||||
#include "dynamic/clipboards.h"
|
||||
#include "common/ivshmem.h"
|
||||
#include "ll.h"
|
||||
|
||||
#include "spice/spice.h"
|
||||
#include <lgmp/client.h>
|
||||
@@ -156,8 +157,6 @@ struct KeybindHandle
|
||||
enum WarpState
|
||||
{
|
||||
WARP_STATE_ON,
|
||||
WARP_STATE_ACTIVE,
|
||||
WARP_STATE_WIN_EXIT,
|
||||
WARP_STATE_OFF
|
||||
};
|
||||
|
||||
@@ -215,11 +214,9 @@ struct CursorState
|
||||
int sens;
|
||||
float sensX, sensY;
|
||||
|
||||
/* the mouse warp state and target */
|
||||
/* the mouse warp state and queue */
|
||||
enum WarpState warpState;
|
||||
bool warpExit;
|
||||
unsigned long warpSerial;
|
||||
SDL_Point warpTo;
|
||||
struct ll * warpList;
|
||||
|
||||
/* the guest's cursor position */
|
||||
struct CursorInfo guest;
|
||||
|
||||
Reference in New Issue
Block a user