aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/input.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2021-04-17 19:28:23 +0000
committerGitHub <noreply@github.com>2021-04-17 19:28:23 +0000
commita312e415951fcb9156572f124b42f68c09f60ae9 (patch)
tree55f5a931fb8b720783bad5159b0a0ec175106270 /alacritty/src/input.rs
parent33d4b833dca46b775f485d0547f9f8804849fe8a (diff)
downloadr-alacritty-a312e415951fcb9156572f124b42f68c09f60ae9.tar.gz
r-alacritty-a312e415951fcb9156572f124b42f68c09f60ae9.tar.bz2
r-alacritty-a312e415951fcb9156572f124b42f68c09f60ae9.zip
Fix selection flooding Wayland connection
This resolves an issue where an excessive clipboard update frequency would cause the Wayland display server to ignore necessary selection updates. Instead of copying the selection to the clipboard during the selection process, it is now only copied once the mouse button is released. Fixes #4953.
Diffstat (limited to 'alacritty/src/input.rs')
-rw-r--r--alacritty/src/input.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/alacritty/src/input.rs b/alacritty/src/input.rs
index 977a6e5d..3559b85e 100644
--- a/alacritty/src/input.rs
+++ b/alacritty/src/input.rs
@@ -634,6 +634,9 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> {
self.ctx.display().highlighted_hint = hint;
self.ctx.scheduler_mut().unschedule(TimerId::SelectionScrolling);
+
+ // Copy selection on release, to prevent flooding the display server.
+ self.ctx.copy_selection(ClipboardType::Selection);
}
pub fn mouse_wheel_input(&mut self, delta: MouseScrollDelta, phase: TouchPhase) {