mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-06-01 20:34:25 +00:00
[client] message: fix window resize event message handling
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
This commit is contained in:
@@ -102,9 +102,13 @@ void lgMessage_process(void)
|
|||||||
case LG_MSG_WINDOWSIZE:
|
case LG_MSG_WINDOWSIZE:
|
||||||
{
|
{
|
||||||
// retain the last/latest windowsize event
|
// retain the last/latest windowsize event
|
||||||
if (windowSize)
|
if (!windowSize || windowSize->timestamp > event->timestamp)
|
||||||
|
{
|
||||||
free(windowSize);
|
free(windowSize);
|
||||||
windowSize = event;
|
windowSize = event;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
free(event);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,7 +127,7 @@ void lgMessage_process(void)
|
|||||||
if (time - windowSize->timestamp < 500000)
|
if (time - windowSize->timestamp < 500000)
|
||||||
{
|
{
|
||||||
// requeue the event for later
|
// requeue the event for later
|
||||||
if (!ll_push(this.list, event))
|
if (!ll_push(this.list, windowSize))
|
||||||
{
|
{
|
||||||
DEBUG_ERROR("Failed to re-queue the windowSize event");
|
DEBUG_ERROR("Failed to re-queue the windowSize event");
|
||||||
free(windowSize);
|
free(windowSize);
|
||||||
|
|||||||
Reference in New Issue
Block a user