mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-25 14:05:41 -05:00
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:
parent
1f243468dc
commit
7a8a002da6
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue