Fix pinch zoom and enable it for TouchpadMagnify events (#30459)

Pinch zoom was broken because pinch zoom events were triggered at -1, -1
in the compositor. This change:

1. Differentiates between magnify and scroll events in the compositor to
   remove the question of where to trigger them.
2. Converts winit TouchpadMagnify events into pinch zoom events so that
   this works properly on MacOS.
This commit is contained in:
Martin Robinson 2023-10-03 14:49:36 +02:00 committed by GitHub
parent f78d53daaa
commit dfd14aabef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 149 additions and 111 deletions

View file

@ -548,8 +548,8 @@ where
self.compositor.on_zoom_reset_window_event();
},
EmbedderEvent::PinchZoom(magnification) => {
self.compositor.on_pinch_zoom_window_event(magnification);
EmbedderEvent::PinchZoom(zoom) => {
self.compositor.on_pinch_zoom_window_event(zoom);
},
EmbedderEvent::Navigation(top_level_browsing_context_id, direction) => {