diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-12-15 08:14:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-12-15 08:37:28 +0000 |
commit | 102846d45cb9660805e209b6954c7b8d707b8288 (patch) | |
tree | a741fe953c435419e6253628e815cf32257adff7 /vcl/unx/gtk3/gtkinst.cxx | |
parent | 9c1927df9c266834b5a2da4b7f23af0b8e8b8c6e (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk3/gtkinst.cxx')
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
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 |