Commit e706f3d
committed
Use gesture_pan on macOS
The macOS built-in trackpad reports as GDK_SOURCE_MOUSE (not GDK_SOURCE_TOUCHPAD).
The _scrolled routing condition required either GDK_SOURCE_TOUCHPAD or a device previously seen in a pinch event (_touchpad).
On macOS, neither condition held before a pinch had been seen, so two-finger scroll events fell through to dt_view_manager_scrolled (image navigation) instead of gesture_pan (panning). A #ifdef GDK_WINDOWING_QUARTZ branch now routes all non-ctrl smooth scrolls to gesture_pan on macOS.
Net result: On macOS, zoom via pinch works (was already working), and pan via two-finger swipe now works via gesture_pan. Combined pinch+pan simultaneously is not possible at the GDK level on macOS — NSEventTypeMagnify does not deliver the translational component; it must be done as sequential operations (zoom then pan).1 parent 643493e commit e706f3d
2 files changed
Lines changed: 21 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
781 | | - | |
782 | | - | |
783 | | - | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
784 | 794 | | |
785 | 795 | | |
786 | 796 | | |
| |||
810 | 820 | | |
811 | 821 | | |
812 | 822 | | |
813 | | - | |
| 823 | + | |
814 | 824 | | |
815 | | - | |
| 825 | + | |
816 | 826 | | |
817 | 827 | | |
818 | 828 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4208 | 4208 | | |
4209 | 4209 | | |
4210 | 4210 | | |
4211 | | - | |
4212 | | - | |
4213 | | - | |
4214 | 4211 | | |
4215 | 4212 | | |
4216 | 4213 | | |
4217 | 4214 | | |
4218 | 4215 | | |
4219 | 4216 | | |
4220 | | - | |
4221 | | - | |
4222 | | - | |
4223 | | - | |
4224 | 4217 | | |
4225 | 4218 | | |
4226 | 4219 | | |
| |||
4252 | 4245 | | |
4253 | 4246 | | |
4254 | 4247 | | |
4255 | | - | |
4256 | | - | |
4257 | | - | |
4258 | | - | |
4259 | | - | |
4260 | | - | |
4261 | | - | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
| 4251 | + | |
| 4252 | + | |
| 4253 | + | |
4262 | 4254 | | |
4263 | 4255 | | |
4264 | | - | |
4265 | | - | |
4266 | | - | |
4267 | | - | |
4268 | | - | |
4269 | 4256 | | |
4270 | 4257 | | |
4271 | 4258 | | |
| |||
0 commit comments