mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-06-23 15:14:27 +00:00
[client]: core: add timeout on pointerQueue wait loop
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
If the host has had a fault this loop can become infinite, soft-locking the application. This adds a 200ms timeout to prevent this.
This commit is contained in:
@@ -554,6 +554,7 @@ void core_handleMouseNormal(double ex, double ey)
|
|||||||
{
|
{
|
||||||
/* wait for the move request to be processed */
|
/* wait for the move request to be processed */
|
||||||
g_cursor.realigning = true;
|
g_cursor.realigning = true;
|
||||||
|
unsigned timeout = 200;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
LG_LOCK(g_state.pointerQueueLock);
|
LG_LOCK(g_state.pointerQueueLock);
|
||||||
@@ -577,6 +578,14 @@ void core_handleMouseNormal(double ex, double ey)
|
|||||||
if (hostSerial >= setPosSerial)
|
if (hostSerial >= setPosSerial)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (--timeout == 0)
|
||||||
|
{
|
||||||
|
DEBUG_ERROR(
|
||||||
|
"pointerQueue serial not updating, expected %u but stuck at %u",
|
||||||
|
setPosSerial, hostSerial);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
g_state.ds->wait(1);
|
g_state.ds->wait(1);
|
||||||
}
|
}
|
||||||
while(app_isRunning());
|
while(app_isRunning());
|
||||||
|
|||||||
Reference in New Issue
Block a user