# gpui: Implement pinch event support for X11 and Windows \(\#51354\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 6694a3bd14bba5d52c375cc4c3ce9681445cbc22

Requested commit: 6694a3bd14bba5d52c375cc4c3ce9681445cbc22

Commit: 6694a3bd14bba5d52c375cc4c3ce9681445cbc22

Tree: 3ce51deb4d4e79b6dfd2f2a24dc50b2a2dffe9b8

Author: MostlyK

Committer: GitHub

## Message

```
gpui: Implement pinch event support for X11 and Windows (#51354)

Closes #51312 

- Remove platform-specific #[cfg] gates from PinchEvent, event
  listeners, and dispatch logic in GPUI
- Windows: Intercept Ctrl+ScrollWheel (emitted by precision trackpads
  for pinch gestures) and convert them to GPUI PinchEvents
- Image Viewer: remove redundant platform-specific blocks
- X11: Bump XInput version to 2.4 and implement handlers for
  XinputGesturePinch events


- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Pinching gestures now available on all devices.

---------

Co-authored-by: John Tur <john-tur@outlook.com>
```

## Parents

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

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