vcl/unx/gtk3/gtkinst.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 102846d45cb9660805e209b6954c7b8d707b8288
Author: Stephan Bergmann <[email protected]>
AuthorDate: Thu Dec 15 08:14:52 2022 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Thu Dec 15 08:37:28 2022 +0000
Fix another use of gtk_gesture_zoom_new for GTK 4
...introduced with 7d5841b435a6794e30f02b62db15660ffe4ee39e "vcl: Implement
touchpad zoom gesture support in GtkInstanceDrawingArea", and fixing it
along
the lines of 903b8f8524b8c84eced3ccbf7cfec9c5b9015f4b "gtk: Fix gtk4 build
after
f2bd19f672023 and e6bed4293814d" and
b37e6d2cbd2cfbd5c6eeba81415182c1c766de8f
"gtk4: connect the zoom and rotate gestures for gtk4"
Change-Id: I7a4521766e537d33ee3bf1787c317095a2e54af8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144208
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index ca08ce4d37f6..0525f8118531 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -18281,7 +18281,12 @@ public:
#endif
ensureMouseEventWidget();
+#if GTK_CHECK_VERSION(4,0,0)
+ m_pZoomGesture = gtk_gesture_zoom_new();
+ gtk_widget_add_controller(m_pMouseEventBox,
GTK_EVENT_CONTROLLER(m_pZoomGesture));
+#else
m_pZoomGesture = gtk_gesture_zoom_new(m_pMouseEventBox);
+#endif
gtk_event_controller_set_propagation_phase(GTK_EVENT_CONTROLLER(m_pZoomGesture),
GTK_PHASE_TARGET);
// Note that the default zoom gesture signal handler needs to run
first to setup correct