Summary: | Causes ~1 wakeup per second when idle | ||
---|---|---|---|
Product: | [Applications] klipper | Reporter: | Jonathan Thomas <echidnaman> |
Component: | general | Assignee: | Esben Mose Hansen <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dimsuz |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Disable timer when it is not necessary |
Description
Jonathan Thomas
2009-07-26 22:12:11 UTC
Created attachment 36670 [details]
Disable timer when it is not necessary
Cause of the problem being fixed: klipper sets up a timer to check if there were too many clipboard changes in last second (overflow timer). It is enabled all the time, no matter if someone actually uses the clipboard or not.
Fix: enable timer only after a clipboard change (if it is not yet enabled).
When the timer fires, do all checks as usual and disable it. Timer handler
resets overflow count to 0 so it is not possible that an overflow will be
missed because of this patch.
Patch looks good to me. Will test it today, and apply. SVN commit 1019658 by esben: Disable overflow timer when it is not needed, elimating a wakeup per second in klipper. Patch by Jakub Stachowski BUG: 201587 M +4 -1 klipper.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1019658 Sincere thanks to the reporter and patch submitted :) |