mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-26 15:27:19 +00:00
[client] updated to use new cursor state flags
This commit is contained in:
parent
b7e4426002
commit
dcc9625803
@ -299,18 +299,22 @@ static int cursorThread(void * unused)
|
|||||||
}
|
}
|
||||||
|
|
||||||
KVMFRCursor * cursor = (KVMFRCursor *)msg.mem;
|
KVMFRCursor * cursor = (KVMFRCursor *)msg.mem;
|
||||||
state.cursor.x = cursor->x;
|
|
||||||
state.cursor.y = cursor->y;
|
|
||||||
state.cursorVisible = cursor->visible;
|
|
||||||
state.haveCursorPos = true;
|
|
||||||
|
|
||||||
if (!state.haveAligned && state.haveSrcSize && state.haveCurLocal)
|
if (msg.udata & CURSOR_FLAG_POSITION)
|
||||||
{
|
{
|
||||||
alignMouseWithHost();
|
state.cursor.x = cursor->x;
|
||||||
state.haveAligned = true;
|
state.cursor.y = cursor->y;
|
||||||
|
state.cursorVisible = cursor->visible;
|
||||||
|
state.haveCursorPos = true;
|
||||||
|
|
||||||
|
if (!state.haveAligned && state.haveSrcSize && state.haveCurLocal)
|
||||||
|
{
|
||||||
|
alignMouseWithHost();
|
||||||
|
state.haveAligned = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg.udata == 1)
|
if (msg.udata & CURSOR_FLAG_SHAPE)
|
||||||
{
|
{
|
||||||
switch(cursor->type)
|
switch(cursor->type)
|
||||||
{
|
{
|
||||||
@ -341,13 +345,17 @@ static int cursorThread(void * unused)
|
|||||||
|
|
||||||
lgmpClientMessageDone(queue);
|
lgmpClientMessageDone(queue);
|
||||||
state.updateCursor = false;
|
state.updateCursor = false;
|
||||||
state.lgr->on_mouse_event
|
|
||||||
(
|
if (msg.udata & CURSOR_FLAG_POSITION)
|
||||||
state.lgrData,
|
{
|
||||||
state.cursorVisible && state.drawCursor,
|
state.lgr->on_mouse_event
|
||||||
state.cursor.x,
|
(
|
||||||
state.cursor.y
|
state.lgrData,
|
||||||
);
|
state.cursorVisible && state.drawCursor,
|
||||||
|
state.cursor.x,
|
||||||
|
state.cursor.y
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lgmpClientUnsubscribe(&queue);
|
lgmpClientUnsubscribe(&queue);
|
||||||
|
Loading…
Reference in New Issue
Block a user