# Fix AppKit screen coordinate conversion leading to wrong window bounds \(\#2856\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 802911d742beef60cfb535e397791ef2973c61c7

Requested commit: 802911d742beef60cfb535e397791ef2973c61c7

Commit: 802911d742beef60cfb535e397791ef2973c61c7

Tree: a1e1b52591dd6be6add2df868768ea6ce13ccc0c

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Fix AppKit screen coordinate conversion leading to wrong window bounds (#2856)

Fixes
https://linear.app/zed-industries/issue/Z-1510/join-project-notification-takes-up-full-screen-on-a-second-monitor

There were multiple mistakes in the positioning of Zed's notification
windows, one of which lead to the notifications taking up the full
screen on secondary displays 😱 .
* Wrong sign for the vertical padding (moving the window *upward*
instead of downward)
* Using the screen's full frame instead of its "visible frame" (which
accounts for app menu bar)
* Wrong coordinate translation between our coordinates and AppKit's
coordinates. Regardless of which display a given window appears on, the
coordinate translation needs to use the height of the *main* display.

Release Notes:

- Fixed a bug where call notifications were accidentally full-screen on
all displays except the main display.
```

## Parents

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

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

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