[geary/wip/765516-gtk-widget-conversation-viewer: 172/174] Workaround a GTK+ crasher, Bug 771812.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/765516-gtk-widget-conversation-viewer: 172/174] Workaround a GTK+ crasher, Bug 771812.
- Date: Sun, 25 Sep 2016 13:20:30 +0000 (UTC)
commit 63fc144110052bcfc5a7b8592d75164f56b2d48b
Author: Michael James Gratton <mike vee net>
Date: Fri Sep 23 10:44:41 2016 +1000
Workaround a GTK+ crasher, Bug 771812.
src/client/composer/composer-widget.vala | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 8c7c6e6..4704104 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -1181,6 +1181,18 @@ public class ComposerWidget : Gtk.EventBox {
Gtk.Widget? focus = this.container.top_window.get_focus();
this.container.remove_composer();
ComposerWindow window = new ComposerWindow(this);
+
+ // Workaround a GTK+ crasher, Bug 771812. When the composer is
+ // re-parented, its menu_button's popover keeps a reference to
+ // the conversation window's viewport, so when that is removed
+ // it has a null parent and we crash. To reproduce: Reply
+ // inline, detach the composer, then choose a different
+ // conversation back in the main window. The workaround here
+ // sets a new menu model and hence the menu_button constructs
+ // a new popover.
+ this.actions.change_action_state(ACTION_COMPOSE_AS_HTML,
+ GearyApplication.instance.config.compose_as_html);
+
this.state = ComposerWidget.ComposerState.DETACHED;
if (focus != null && focus.parent.visible) {
ComposerWindow focus_win = focus.get_toplevel() as ComposerWindow;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]