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_lastShapeId = 0;
|
||||
m_thread.Attach(CreateThread(nullptr, 0, _CursorThread, this, 0, nullptr));
|
||||
}
|
||||
|
||||
@ -111,21 +113,34 @@ DWORD CALLBACK CIndirectMonitorContext::_CursorThread(LPVOID arg)
|
||||
void CIndirectMonitorContext::CursorThread()
|
||||
{
|
||||
HRESULT hr = 0;
|
||||
bool running = true;
|
||||
|
||||
for (;;)
|
||||
while(running)
|
||||
{
|
||||
HANDLE waitHandles[] =
|
||||
{
|
||||
m_cursorDataEvent.Get(),
|
||||
m_terminateEvent.Get()
|
||||
};
|
||||
DWORD waitResult = WaitForMultipleObjects(ARRAYSIZE(waitHandles), waitHandles, FALSE, 100);
|
||||
if (waitResult == WAIT_TIMEOUT)
|
||||
continue;
|
||||
else if (waitResult == WAIT_OBJECT_0 + 1)
|
||||
break;
|
||||
else if (waitResult != WAIT_OBJECT_0)
|
||||
|
||||
DWORD waitResult = WaitForMultipleObjects(
|
||||
ARRAYSIZE(waitHandles), waitHandles, FALSE, 100);
|
||||
|
||||
switch (waitResult)
|
||||
{
|
||||
case WAIT_TIMEOUT:
|
||||
continue;
|
||||
|
||||
// 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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user