Skip to content

gl/wayland: fix wayland event source burning CPU

Patch by Lucas Stach from #603 (comment 167748) in form of a MR:

Commit c71dd72b "gl/wayland: fix glib mainloop integration" was overeager
in removing the poll result test from the check function. This caused
dispatch to be called even if no new events are available on the
Wayland connection, which in turn would wake up the glib mainloop,
causing effectively a tight loop without ever blocking on the poll.

Fixes #603

attached is the minimal fix, though it brings back some of the issues I tried to fix with the offending patch. This needs some further work on my side.

I'm fine with either a revert of the breaking change, or adding the minimal fix to get rid of the regression.

Does anyone have any opinions on whether we should revert the original change or add this patch?

It sounds like original commit + this patch fixes something at least?

cc @den_erpel @lynxeye

Merge request reports

Loading