aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-01-04 21:01:19 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-01-04 21:58:32 +0000
commit5ec447697c7548fc7930031077e821fd1e26b2f9 (patch)
treec03edfcda2c61eda425644803bc6dbf22bec086f /selection.c
parentinput: scroll: call term_mouse_up() once, after all term_mouse_down() (diff)
render: throttle xcursor updates
With a bad behaving client (e.g. 'less' with mouse support enabled), we can end up with a *lot* of xcursor updates (so much, that we flooded the wayland socket before we implemented a blocking wayl_flush()). Since there's little point in updating the cursor more than once per frame interval, use frame callbacks to throttle the updates. This works more or lesslike normal terminal refreshes: render_xcursor_set() stores the last terminal (window) that had (and updated) the cursor. The renderer's FDM hook checks if we have such a pending terminal set, and if so, tries to refresh the cursor. This is done by first checking if we're already waiting for a callback from a previous cursor update, and if so we do nothing; the callback will update the cursor for the next frame. If we're *not* already waiting for a callback, we update the cursor immediately.
Diffstat (limited to 'selection.c')
0 files changed, 0 insertions, 0 deletions