Acknowledge first click on unfocused windows with bsd/linux

Fixes a regression on non-macOS platforms caused by the fix for
issue #1291. The fix is to follow platform norms for mouse click
behavior on unfocused terminals. On macOS, the first click (that
gives the window focus) is swallowed, and has no effect on the
terminal. On all other platforms, the first click is passed through
to the terminal.
This commit is contained in:
nolanl 2018-09-17 13:00:42 -07:00 committed by Christian Duerr
parent 1f243468dc
commit 7a8a002da6
2 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- First click on unfocused Alacritty windows is no longer ignored on platforms other than macOS
## Version 0.2.0
### Added

View File

@ -341,7 +341,7 @@ impl<N: Notify> Processor<N> {
processor.received_char(c);
},
MouseInput { state, button, modifiers, .. } => {
if *window_is_focused {
if !cfg!(target_os = "macos") || *window_is_focused {
*hide_cursor = false;
processor.mouse_input(state, button, modifiers);
processor.ctx.terminal.dirty = true;