r3242 - in /stretch/evolution/debian: changelog patches/20_composer_hangs_right_click.patch patches/series

biebl at users.alioth.debian.org biebl at users.alioth.debian.org
Sat Sep 9 20:17:23 UTC 2017


Author: biebl
Date: Sat Sep  9 20:17:22 2017
New Revision: 3242

URL: http://svn.debian.org/wsvn/pkg-evolution/?sc=1&rev=3242
Log:
* Added debian/patches/20_composer_hangs_right_click.patch.
  - Backport patch from git - Fix hangs on right click in composer window.
    (Closes: #871626)

Added:
    stretch/evolution/debian/patches/20_composer_hangs_right_click.patch
Modified:
    stretch/evolution/debian/changelog
    stretch/evolution/debian/patches/series

Modified: stretch/evolution/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-evolution/stretch/evolution/debian/changelog?rev=3242&op=diff
==============================================================================
--- stretch/evolution/debian/changelog	(original)
+++ stretch/evolution/debian/changelog	Sat Sep  9 20:17:22 2017
@@ -1,3 +1,12 @@
+evolution (3.22.6-1+deb9u1) stretch; urgency=medium
+
+  [ Phil Wyett ]
+  * Added debian/patches/20_composer_hangs_right_click.patch.
+    - Backport patch from git - Fix hangs on right click in composer window.
+      (Closes: #871626)
+
+ -- Michael Biebl <biebl at debian.org>  Sat, 09 Sep 2017 21:56:36 +0200
+
 evolution (3.22.6-1) unstable; urgency=medium
 
   * New upstream release.

Added: stretch/evolution/debian/patches/20_composer_hangs_right_click.patch
URL: http://svn.debian.org/wsvn/pkg-evolution/stretch/evolution/debian/patches/20_composer_hangs_right_click.patch?rev=3242&op=file
==============================================================================
--- stretch/evolution/debian/patches/20_composer_hangs_right_click.patch	(added)
+++ stretch/evolution/debian/patches/20_composer_hangs_right_click.patch	Sat Sep  9 20:17:22 2017
@@ -0,0 +1,104 @@
+Description: Backported patch from git - Fix hangs on right click in composer
+ window.
+Bug-GNOME: https://bugzilla.gnome.org/show_bug.cgi?id=777086
+
+---
+Index: b/e-util/e-html-editor.c
+===================================================================
+--- a/e-util/e-html-editor.c	2017-08-10 02:19:27.349879933 +0100
++++ b/e-util/e-html-editor.c	2017-08-10 02:25:30.691503859 +0100
+@@ -488,36 +488,73 @@
+ 	g_strfreev (languages);
+ }
+
++typedef struct _ContextMenuData {
++	GWeakRef *editor_weakref; /* EHTMLEditor * */
++	EContentEditorNodeFlags flags;
++	guint button;
++	guint32 time;
++} ContextMenuData;
++
++static void
++context_menu_data_free (gpointer ptr)
++{
++	ContextMenuData *cmd = ptr;
++
++	if (cmd) {
++		e_weak_ref_free (cmd->editor_weakref);
++		g_free (cmd);
++	}
++}
++
++static gboolean
++html_editor_show_context_menu_idle_cb (gpointer user_data)
++{
++	ContextMenuData *cmd = user_data;
++	EHTMLEditor *editor;
++
++	g_return_val_if_fail (cmd != NULL, FALSE);
++
++	editor = g_weak_ref_get (cmd->editor_weakref);
++	if (editor) {
++		GtkWidget *menu;
++
++		menu = e_html_editor_get_managed_widget (editor, "/context-menu");
++
++		g_signal_emit (editor, signals[UPDATE_ACTIONS], 0, cmd->flags);
++
++		if (!gtk_menu_get_attach_widget (GTK_MENU (menu)))
++			gtk_menu_attach_to_widget (GTK_MENU (menu), GTK_WIDGET (editor), NULL);
++
++		gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL,
++			GTK_WIDGET (e_html_editor_get_content_editor (editor)), cmd->button, cmd->time);
++
++		g_object_unref (editor);
++	}
++
++	return FALSE;
++}
++
+ static gboolean
+ html_editor_context_menu_requested_cb (EContentEditor *cnt_editor,
+                                        EContentEditorNodeFlags flags,
+                                        GdkEvent *event,
+                                        EHTMLEditor *editor)
+ {
+-	GtkWidget *menu;
++	ContextMenuData *cmd;
++
++	g_return_val_if_fail (E_IS_HTML_EDITOR (editor), FALSE);
++
++	cmd = g_new0 (ContextMenuData, 1);
++	cmd->editor_weakref = e_weak_ref_new (editor);
++	cmd->flags = flags;
+
+-	/* COUNT FLAGS */
+-	menu = e_html_editor_get_managed_widget (editor, "/context-menu");
++	if (!event || !gdk_event_get_button (event, &cmd->button))
++		cmd->button = 0;
+
+-	g_signal_emit (editor, signals[UPDATE_ACTIONS], 0, flags);
++	cmd->time = event ? gdk_event_get_time (event) : gtk_get_current_event_time ();
+
+-	if (!gtk_menu_get_attach_widget (GTK_MENU (menu)))
+-		gtk_menu_attach_to_widget (GTK_MENU (menu),
+-					   GTK_WIDGET (editor),
+-					   NULL);
+-
+-	if (event)
+-		gtk_menu_popup (
+-			GTK_MENU (menu), NULL, NULL, NULL,
+-			GTK_WIDGET (cnt_editor),
+-			((GdkEventButton*) event)->button,
+-			((GdkEventButton*) event)->time);
+-	else
+-		gtk_menu_popup (
+-			GTK_MENU (menu), NULL, NULL, NULL,
+-			GTK_WIDGET (cnt_editor),
+-			0,
+-			gtk_get_current_event_time ());
++	g_idle_add_full (G_PRIORITY_LOW, html_editor_show_context_menu_idle_cb,
++		cmd, context_menu_data_free);
+
+ 	return TRUE;
+ }

Modified: stretch/evolution/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-evolution/stretch/evolution/debian/patches/series?rev=3242&op=diff
==============================================================================
--- stretch/evolution/debian/patches/series	(original)
+++ stretch/evolution/debian/patches/series	Sat Sep  9 20:17:22 2017
@@ -1,2 +1,3 @@
 02_nss_paths.patch
 10_revert_libevolution_avoid-version.patch
+20_composer_hangs_right_click.patch




More information about the pkg-evolution-commits mailing list