# x11: Halt periodic refresh for windows that aren't visible \(\#32775\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 3bed5b767f32028dc0beb5cc8dc4983e1398f2ed

Requested commit: 3bed5b767f32028dc0beb5cc8dc4983e1398f2ed

Commit: 3bed5b767f32028dc0beb5cc8dc4983e1398f2ed

Tree: 8e7c91afd783810fee1234f3554ebffe96cfe61b

Author: Michael Sloan

Committer: GitHub

## Message

```
x11: Halt periodic refresh for windows that aren't visible (#32775)

This adds handling of UnmapNotify / MapNotify / VisibilityNotify to
track whether windows are visible. When hidden, the refresh loop is
halted until visible again. Often these refreshes were just checking if
the window is dirty, but I believe it sometimes did a full re-render for
things that change without user interaction (cursor blink, animations).

This also changes handling of Expose events to set a flag indicating the
next refresh should have `require_presentation: true`.

Release Notes:

- x11: No longer refreshes windows that aren't visible.
```

## Parents

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

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