# Use NSScreen to fetch primary display · gitcafe/zed

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

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

Visibility: public

Requested revision: f938bae0a2122b5244a19bfef5d3b3b4c1a5335b

Requested commit: f938bae0a2122b5244a19bfef5d3b3b4c1a5335b

Commit: f938bae0a2122b5244a19bfef5d3b3b4c1a5335b

Tree: 528464cc789c6992b7c394cd04cedbcb72a175c8

Author: Thorsten Ball

Committer: Thorsten Ball

## Message

```
Use NSScreen to fetch primary display

According to Chromium source, `NSScreen::screens` should always get us
one display.

We made this change because we ran into panics caused by the previous
`unwrap()` when `CGGetActiveDisplayList` might return an empty list.

```

## Parents

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

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