From d89ecb8731bf6a9c61fa037067598dbcbfb335da Mon Sep 17 00:00:00 2001 From: eabdullin Date: Fri, 15 Nov 2024 13:15:34 +0000 Subject: [PATCH] import CS evolution-3.40.4-11.el9_5 --- .../webkitgtk-2.46.1-middle-click-paste.patch | 37 +++++++++++++++++++ SPECS/evolution.spec | 6 ++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 SOURCES/webkitgtk-2.46.1-middle-click-paste.patch diff --git a/SOURCES/webkitgtk-2.46.1-middle-click-paste.patch b/SOURCES/webkitgtk-2.46.1-middle-click-paste.patch new file mode 100644 index 0000000..7fe3e1a --- /dev/null +++ b/SOURCES/webkitgtk-2.46.1-middle-click-paste.patch @@ -0,0 +1,37 @@ +diff --git a/src/modules/webkit-editor/e-webkit-editor.c b/src/modules/webkit-editor/e-webkit-editor.c +index bc423841a8..d3217cd48b 100644 +--- a/src/modules/webkit-editor/e-webkit-editor.c ++++ b/src/modules/webkit-editor/e-webkit-editor.c +@@ -5724,6 +5724,24 @@ webkit_editor_button_press_event (GtkWidget *widget, + GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->button_press_event (widget, event); + } + ++static gboolean ++webkit_editor_button_release_event (GtkWidget *widget, ++ GdkEventButton *event) ++{ ++ if (event->button == 2) { ++ /* WebKitGTK 2.46.1 changed the middle-click paste behavior and moved ++ the paste handler from the button-press event into the button-release ++ event, which causes double paste of the clipboard content. As the paste ++ is handled in the webkit_editor_button_press_event() above, make sure ++ the release handler is not called here regardless whether the user ++ uses the changed WebkitGTK or not. */ ++ return TRUE; ++ } ++ ++ /* Chain up to parent's method. */ ++ return GTK_WIDGET_CLASS (e_webkit_editor_parent_class)->button_release_event (widget, event); ++} ++ + static gboolean + webkit_editor_key_press_event (GtkWidget *widget, + GdkEventKey *event) +@@ -5814,6 +5832,7 @@ e_webkit_editor_class_init (EWebKitEditorClass *class) + + widget_class = GTK_WIDGET_CLASS (class); + widget_class->button_press_event = webkit_editor_button_press_event; ++ widget_class->button_release_event = webkit_editor_button_release_event; + widget_class->key_press_event = webkit_editor_key_press_event; + + g_object_class_override_property ( diff --git a/SPECS/evolution.spec b/SPECS/evolution.spec index c09deae..ad857bb 100644 --- a/SPECS/evolution.spec +++ b/SPECS/evolution.spec @@ -43,7 +43,7 @@ Name: evolution Version: 3.40.4 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Mail and calendar client for GNOME License: GPLv2+ and GFDL URL: https://wiki.gnome.org/Apps/Evolution @@ -59,6 +59,7 @@ Patch04: webkitgtk-2.36.0-dark-theme.patch Patch05: webkitgtk-2.36.0-disable-hw-accel.patch Patch06: evolution-3.40.4-frame-flattenning.patch Patch07: evolution-3.40.4-new-button.patch +Patch08: webkitgtk-2.46.1-middle-click-paste.patch # Approximate version number Provides: bundled(libgnomecanvas) = 2.30.0 @@ -575,6 +576,9 @@ grep -v "%{_datadir}/locale" evolution.lang > help.lang %endif %changelog +* Tue Oct 15 2024 Milan Crha - 3.40.4-11 +- Resolves: RHEL-62668 (WebKitGTK 2.46.1: Middle mouse button inserts primary clipboard twice) + * Wed Oct 11 2023 Milan Crha - 3.40.4-10 - Related: RHEL-12405 (Move WebKitGTK parts in Evolution Data Server into optional subpackage) - Add dependency on newly introduced evolution-data-server-ui