https://bugs.kde.org/show_bug.cgi?id=426230
Bartosz Taudul <w...@nereid.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Version Fixed In| |5.27 Resolution|--- |FIXED Latest Commit| |https://invent.kde.org/plas | |ma/plasma-desktop/commit/7d | |4a79afac02c0db7ef69bd31018c | |cbe16280299 --- Comment #6 from Bartosz Taudul <w...@nereid.pl> --- Git commit 7d4a79afac02c0db7ef69bd31018ccbe16280299 by Bartosz Taudul. Committed on 04/02/2023 at 01:19. Pushed by redstrate into branch 'master'. kcms/joystick: process all available events Processing of joystick events is performed in a response to a zero-timeout timer. Previously only one event was handled when the timer fired. The 10 ms timeout of the select call checking if there are events to process prevented 100% CPU usage of a constantly firing timer. The problem with such an approach is that joystick events are visibly slow to process and show up in the buttons and axis readout. In some cases they are even lost. It is not clear why this happens, my guess would be that each update of the button or axis state in the UI triggers a redraw, which then waits for VSync, preventing the timer from running. This commit changes the event processing logic to run until there are no events left to consume. This requires zeroing of the select call timeout, as otherwise a joystick emitting events every 9 ms would be able completely block the UI. To prevent 100% CPU usage, 10 ms sleep calls are issued when the event queue is empty. This has similar effect as the previous 10 ms select timeout. Changes in the joystick calibration dialog are minimal, as I don't have use for it. The behavior there shouldn't be degraded, but that's it. FIXED-IN: 5.27 M +4 -1 kcms/joystick/caldialog.cpp M +1 -1 kcms/joystick/joydevice.cpp M +24 -18 kcms/joystick/joywidget.cpp https://invent.kde.org/plasma/plasma-desktop/commit/7d4a79afac02c0db7ef69bd31018ccbe16280299 -- You are receiving this mail because: You are watching all bug changes.