aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-06-15 15:27:50 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-06-18 13:36:58 +0000
commit535c82d628909b4f54774885e7de366c07fa9779 (patch)
tree6f6968db0dc2944834a0f169cc446dbcd5d1c55d /scripts
parentMerge branch 'reduce-tllist-usage' (diff)
render: use a timer instead of relying on the frame callback for title update throttling
Using the frame callback works most of the time, but e.g. Sway doesn’t call it while the window is hidden, and thus prevents us from updating the title in e.g. stacked views. This patch uses a timer FD instead. We store a timestamp from when the title was last updated. When the application wants to update the title, we first check if we already have a timer running, and if so, does nothing. If no timer is running, check the timestamp. If enough time has passed, update the title immediately. If not, instantiate a timer and wait for it to trigger. Set the minimum time between two updates to ~8ms (twice per frame, for a 60Hz output, and ~once per frame on a 120Hz output). Closes #591
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions