mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 06:11:46 +00:00
[client] handle pointer visibility properly
This commit is contained in:
parent
2d755a45e0
commit
6f551c770c
2 changed files with 32 additions and 48 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
B1-61-g7a98a886b6+1
|
B1-62-g2d755a45e0+1
|
|
@ -279,22 +279,11 @@ static int cursorThread(void * unused)
|
||||||
KVMFRCursor * cursor = (KVMFRCursor *)msg.mem;
|
KVMFRCursor * cursor = (KVMFRCursor *)msg.mem;
|
||||||
state.cursor.x = cursor->x;
|
state.cursor.x = cursor->x;
|
||||||
state.cursor.y = cursor->y;
|
state.cursor.y = cursor->y;
|
||||||
|
state.cursorVisible = cursor->visible;
|
||||||
state.haveCursorPos = true;
|
state.haveCursorPos = true;
|
||||||
|
|
||||||
// if this was only a move event
|
if (msg.udata == 1)
|
||||||
if (msg.udata == 0)
|
|
||||||
{
|
{
|
||||||
state.lgr->on_mouse_event
|
|
||||||
(
|
|
||||||
state.lgrData,
|
|
||||||
state.cursorVisible,
|
|
||||||
state.cursor.x,
|
|
||||||
state.cursor.y
|
|
||||||
);
|
|
||||||
lgmpClientMessageDone(queue);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(cursor->type)
|
switch(cursor->type)
|
||||||
{
|
{
|
||||||
case CURSOR_TYPE_COLOR : cursorType = LG_CURSOR_COLOR ; break;
|
case CURSOR_TYPE_COLOR : cursorType = LG_CURSOR_COLOR ; break;
|
||||||
|
@ -320,13 +309,9 @@ static int cursorThread(void * unused)
|
||||||
lgmpClientMessageDone(queue);
|
lgmpClientMessageDone(queue);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool showCursor = cursor->visible;
|
|
||||||
lgmpClientMessageDone(queue);
|
lgmpClientMessageDone(queue);
|
||||||
|
|
||||||
if (showCursor != state.cursorVisible)
|
|
||||||
{
|
|
||||||
state.cursorVisible = showCursor;
|
|
||||||
state.lgr->on_mouse_event
|
state.lgr->on_mouse_event
|
||||||
(
|
(
|
||||||
state.lgrData,
|
state.lgrData,
|
||||||
|
@ -335,7 +320,6 @@ static int cursorThread(void * unused)
|
||||||
state.cursor.y
|
state.cursor.y
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
lgmpClientUnsubscribe(&queue);
|
lgmpClientUnsubscribe(&queue);
|
||||||
state.running = false;
|
state.running = false;
|
||||||
|
|
Loading…
Reference in a new issue