mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
os: WaitForSomething(): also try to flush out older buffer content
Always try to flush out anything we have, even for clients that had been stuck for a short while because we've tried to send out too much at once. If we'd only do it when someting *new* is in the queue, then those clients might get stuck for long time, until something else triggers the flush by mere accident. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
50037a450d
commit
ceeddbd219
11
os/WaitFor.c
11
os/WaitFor.c
@@ -198,8 +198,15 @@ WaitForSomething(Bool are_ready)
|
||||
timeout = 0;
|
||||
|
||||
BlockHandler(&timeout);
|
||||
if (NewOutputPending)
|
||||
FlushAllOutput();
|
||||
|
||||
/* Always try to flush out anything we have, even for clients that had
|
||||
been stuck for a short while because we've tried to send out too
|
||||
much at once. If we'd only do it when someting *new* is in the queue,
|
||||
then those clients might get stuck for long time, until something else
|
||||
triggers the flush by mere accident.
|
||||
*/
|
||||
FlushAllOutput();
|
||||
|
||||
/* keep this check close to select() call to minimize race */
|
||||
if (dispatchException)
|
||||
i = -1;
|
||||
|
||||
Reference in New Issue
Block a user