diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-10-03 14:49:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-03 12:49:36 +0000 |
commit | dfd14aabef7eb33b09ed5d3b6e4f7faf4cf94b3b (patch) | |
tree | d49da8b4c0a642eaa1a37eadd45ec9a7a2cee043 /components/servo | |
parent | f78d53daaa6ff1235a80684314cb39ea9996739a (diff) | |
download | servo-dfd14aabef7eb33b09ed5d3b6e4f7faf4cf94b3b.tar.gz servo-dfd14aabef7eb33b09ed5d3b6e4f7faf4cf94b3b.zip |
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.
Diffstat (limited to 'components/servo')
-rw-r--r-- | components/servo/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs index e62a8e5f11b..36ceac156e0 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -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) => { |