mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-05-06 14:41:11 +00:00
[idd] driver: fix loss of mouse cursor on guest wakeup
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run
This commit is contained in:
parent
530e83e7bf
commit
35c975d334
@ -88,6 +88,8 @@ reInit:
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_swapChain.reset(new CSwapChainProcessor(m_devContext, swapChain, m_dx11Device, m_dx12Device, newFrameEvent));
|
m_swapChain.reset(new CSwapChainProcessor(m_devContext, swapChain, m_dx11Device, m_dx12Device, newFrameEvent));
|
||||||
|
|
||||||
|
m_lastShapeId = 0;
|
||||||
m_thread.Attach(CreateThread(nullptr, 0, _CursorThread, this, 0, nullptr));
|
m_thread.Attach(CreateThread(nullptr, 0, _CursorThread, this, 0, nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,24 +113,37 @@ DWORD CALLBACK CIndirectMonitorContext::_CursorThread(LPVOID arg)
|
|||||||
void CIndirectMonitorContext::CursorThread()
|
void CIndirectMonitorContext::CursorThread()
|
||||||
{
|
{
|
||||||
HRESULT hr = 0;
|
HRESULT hr = 0;
|
||||||
|
bool running = true;
|
||||||
|
|
||||||
for (;;)
|
while(running)
|
||||||
{
|
{
|
||||||
HANDLE waitHandles[] =
|
HANDLE waitHandles[] =
|
||||||
{
|
{
|
||||||
m_cursorDataEvent.Get(),
|
m_cursorDataEvent.Get(),
|
||||||
m_terminateEvent.Get()
|
m_terminateEvent.Get()
|
||||||
};
|
};
|
||||||
DWORD waitResult = WaitForMultipleObjects(ARRAYSIZE(waitHandles), waitHandles, FALSE, 100);
|
|
||||||
if (waitResult == WAIT_TIMEOUT)
|
DWORD waitResult = WaitForMultipleObjects(
|
||||||
continue;
|
ARRAYSIZE(waitHandles), waitHandles, FALSE, 100);
|
||||||
else if (waitResult == WAIT_OBJECT_0 + 1)
|
|
||||||
break;
|
switch (waitResult)
|
||||||
else if (waitResult != WAIT_OBJECT_0)
|
|
||||||
{
|
{
|
||||||
hr = HRESULT_FROM_WIN32(waitResult);
|
case WAIT_TIMEOUT:
|
||||||
DEBUG_ERROR_HR(hr, "WaitForMultipleObjects");
|
continue;
|
||||||
return;
|
|
||||||
|
// cursorDataEvent
|
||||||
|
case WAIT_OBJECT_0:
|
||||||
|
break;
|
||||||
|
|
||||||
|
// terminateEvent
|
||||||
|
case WAIT_OBJECT_0 + 1:
|
||||||
|
running = false;
|
||||||
|
continue;
|
||||||
|
|
||||||
|
default:
|
||||||
|
hr = HRESULT_FROM_WIN32(waitResult);
|
||||||
|
DEBUG_ERROR_HR(hr, "WaitForMultipleObjects");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IDARG_IN_QUERY_HWCURSOR in = {};
|
IDARG_IN_QUERY_HWCURSOR in = {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user