# linux/x11: Restore differentiation of mouse/keyboard focus \(\#13995\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/ee623f77c1332d2bb779cce16faf8d64c1097457)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: ee623f77c1332d2bb779cce16faf8d64c1097457

Requested commit: ee623f77c1332d2bb779cce16faf8d64c1097457

Commit: ee623f77c1332d2bb779cce16faf8d64c1097457

Tree: 67fb8fd4394ca81e4fb3b74547d5b0e320178b17

Author: Thorsten Ball

Committer: GitHub

## Message

```
linux/x11: Restore differentiation of mouse/keyboard focus (#13995)

This restores https://github.com/zed-industries/zed/pull/13943 which was
reverted in #13974 because it was possible to get in a state where focus
could not be restored on a window.

In this PR there's an additional change: `FocusIn` and `FocusOut` events
are always handled, even if the `event.mode` is not "NORMAL". In my
testing, `alt-tabbing` between windows didn't produce `FocusIn` and
`FocusOut` events when we had that check. Now, with the check removed,
it's possible to switch focus between two windows again with `alt-tab`.


Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
```

## Parents

- [c732865fc5918a4898fe79bcac730309d0c47cc7](https://git.cafe/gitcafe/zed/commit/c732865fc5918a4898fe79bcac730309d0c47cc7?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/ee623f77c1332d2bb779cce16faf8d64c1097457?format=markdown)
