diff --git a/CHANGELOG.md b/CHANGELOG.md index 228b3d8e..c43909c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - The `--help` output was reworked with a new colorful syntax +- OSC 52 is now disabled on unfocused windows ### Fixed diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index 6a14097a..b9a9b534 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -1078,11 +1078,15 @@ impl input::Processor> { } }, TerminalEvent::ClipboardStore(clipboard_type, content) => { - self.ctx.clipboard.store(clipboard_type, content); + if self.ctx.terminal.is_focused { + self.ctx.clipboard.store(clipboard_type, content); + } }, TerminalEvent::ClipboardLoad(clipboard_type, format) => { - let text = format(self.ctx.clipboard.load(clipboard_type).as_str()); - self.ctx.write_to_pty(text.into_bytes()); + if self.ctx.terminal.is_focused { + let text = format(self.ctx.clipboard.load(clipboard_type).as_str()); + self.ctx.write_to_pty(text.into_bytes()); + } }, TerminalEvent::ColorRequest(index, format) => { let color = self.ctx.terminal().colors()[index]