# windows: Handle scale factor change while window is maximized \(\#35686\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d0de81b0b47ad42a360df448001dd8314affe153

Requested commit: d0de81b0b47ad42a360df448001dd8314affe153

Commit: d0de81b0b47ad42a360df448001dd8314affe153

Tree: e88037f0e66dc4cefffee8286b3c42425bf0d469

Author: Max Brunsfeld

Committer: GitHub

## Message

```
windows: Handle scale factor change while window is maximized (#35686)

Fixes https://github.com/zed-industries/zed/issues/33257

Previously, the scale-factor-change-handling logic relied on
`SetWindowPos` enqueuing a `WM_SIZE` window event. But that does not
happen when the window is maximized. So when the scale factor changed,
maximized windows neglected to call their `resize` callback, and would
misinterpret the positions of mouse events.

This PR adds special logic for maximized windows, to ensure that the
size is updated appropriately.

Release Notes:

- N/A
```

## Parents

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

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