qnikst / kbdd

keyboard library for per-window keyboard layout
GNU General Public License v2.0
146 stars 16 forks source link

Process eat 100% of current resources after "Process XKB events in loop" commit #47

Open mahatma-kaganovich opened 7 years ago

mahatma-kaganovich commented 7 years ago

After commit 0b92da3dd9b39953c5d275c264f2041da59acfc7 ("Process XKB events in loop") on xorg-server 1.19.0 (at least, others don't try) kbdd always on top and eat 100% CPU. Rolling back this single patch solve problem.

mahatma-kaganovich commented 7 years ago

Fixed for me by changing "while(){}" to "do{}while()" in this place. https://raw.githubusercontent.com/mahatma-kaganovich/raw/6c870f1a5cb2a29fcd522a9b1b41102ce0f77160/app-portage/ppatch/files/extensions/x11-misc/kbdd/prepare/dowhile.patch

PS Now all fine, but googling also subject to future deep test: change XPending(display) to XEventsQueued(display, QueuedAlready) - blocking vs. non-blocking.

qnikst commented 7 years ago

Thanks, I'll try to check that asap.