aboutsummaryrefslogtreecommitdiff
path: root/src/event.rs
diff options
context:
space:
mode:
authornolanl <720974+nolanl@users.noreply.github.com>2018-09-17 13:00:42 -0700
committerChristian Duerr <chrisduerr@users.noreply.github.com>2018-09-17 20:00:42 +0000
commit7a8a002da6a7c5b17edf5dc8cc8e3f9e089632fc (patch)
tree9d99b54b929ea4f87e927142e9cddde7afbf2933 /src/event.rs
parent1f243468dc96a68cac68e7ca0485a9f9b130db75 (diff)
downloadalacritty-7a8a002da6a7c5b17edf5dc8cc8e3f9e089632fc.tar.gz
alacritty-7a8a002da6a7c5b17edf5dc8cc8e3f9e089632fc.zip
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.
Diffstat (limited to 'src/event.rs')
-rw-r--r--src/event.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event.rs b/src/event.rs
index 589f1a42..ec17034f 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -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;