lahwaacz / sxlock

MIT License
41 stars 21 forks source link

Use XRRGetScreenResourcesCurrent to avoid polling #32

Closed limitedAtonement closed 2 years ago

limitedAtonement commented 2 years ago

XRRGetScreenResources is too slow due to polling. See https://lists.freedesktop.org/archives/xorg/2008-May/035007.html for instance. It appears there was a solution made for this to use only cached resources: XRRGetScreenResourcesCurrent. See https://github.com/jcs/xdimmer/commit/70513f5cfb9273730fcc11258d3ccb73cab6b32f for another instance of using this fix.