mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-22 20:57:06 +00:00
[host] fix cursor not visible on client reconnect
This commit is contained in:
parent
df13340439
commit
d08fba9cf9
@ -44,7 +44,6 @@ Service::Service() :
|
|||||||
m_frameIndex(0),
|
m_frameIndex(0),
|
||||||
m_cursorDataSize(0),
|
m_cursorDataSize(0),
|
||||||
m_cursorData(NULL),
|
m_cursorData(NULL),
|
||||||
m_haveShape(false),
|
|
||||||
m_shapePending(false)
|
m_shapePending(false)
|
||||||
{
|
{
|
||||||
m_ivshmem = IVSHMEM::Get();
|
m_ivshmem = IVSHMEM::Get();
|
||||||
@ -134,7 +133,6 @@ void Service::DeInitialize()
|
|||||||
m_timer = NULL;
|
m_timer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_haveShape = false;
|
|
||||||
m_shapePending = false;
|
m_shapePending = false;
|
||||||
|
|
||||||
if (m_cursorData)
|
if (m_cursorData)
|
||||||
@ -270,10 +268,10 @@ bool Service::Process()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (frame.cursor.hasPos || (m_cursor.hasPos && restart))
|
if (frame.cursor.hasPos || (m_cursor.hasPos && restart))
|
||||||
{
|
|
||||||
if (!restart)
|
|
||||||
{
|
{
|
||||||
// remember the last state for client restart
|
// remember the last state for client restart
|
||||||
|
if (frame.cursor.hasPos)
|
||||||
|
{
|
||||||
m_cursor.hasPos = true;
|
m_cursor.hasPos = true;
|
||||||
m_cursor.visible = frame.cursor.visible;
|
m_cursor.visible = frame.cursor.visible;
|
||||||
m_cursor.x = frame.cursor.x;
|
m_cursor.x = frame.cursor.x;
|
||||||
@ -291,7 +289,7 @@ bool Service::Process()
|
|||||||
|
|
||||||
if (frame.cursor.hasShape || m_shapePending || (m_cursor.hasShape && restart))
|
if (frame.cursor.hasShape || m_shapePending || (m_cursor.hasShape && restart))
|
||||||
{
|
{
|
||||||
if (!m_shapePending)
|
if (!m_shapePending && !restart)
|
||||||
{
|
{
|
||||||
if (frame.cursor.dataSize > m_frameSize)
|
if (frame.cursor.dataSize > m_frameSize)
|
||||||
{
|
{
|
||||||
@ -315,7 +313,6 @@ bool Service::Process()
|
|||||||
}
|
}
|
||||||
|
|
||||||
memcpy(m_cursorData, frame.cursor.shape, frame.cursor.dataSize);
|
memcpy(m_cursorData, frame.cursor.shape, frame.cursor.dataSize);
|
||||||
m_haveShape = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// we can't send a frame with the cursor shape as we need the buffer location
|
// we can't send a frame with the cursor shape as we need the buffer location
|
||||||
|
@ -63,6 +63,5 @@ private:
|
|||||||
CursorInfo m_cursor;
|
CursorInfo m_cursor;
|
||||||
size_t m_cursorDataSize;
|
size_t m_cursorDataSize;
|
||||||
uint8_t * m_cursorData;
|
uint8_t * m_cursorData;
|
||||||
bool m_haveShape;
|
|
||||||
bool m_shapePending;
|
bool m_shapePending;
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user