summaryrefslogtreecommitdiff
path: root/mate-dictionary/src
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-05-24 00:06:16 -0400
committerlukefromdc <[email protected]>2016-05-24 00:06:16 -0400
commitf832d9e9327f41ac653a7623e4f51d5139a03e1d (patch)
tree93ada995f3bba93e0a2c29ff986cc9a29c870466 /mate-dictionary/src
parent5ab184661ff38baca3ea2709d81932a578654392 (diff)
downloadmate-utils-f832d9e9327f41ac653a7623e4f51d5139a03e1d.tar.bz2
mate-utils-f832d9e9327f41ac653a7623e4f51d5139a03e1d.tar.xz
Dictionary: Fix Gtk3.21 segfault
Fix GTK 3.21 segfault caused by issue with calling gtk_widget_realize at this point in the program. Show the widget instead as this does the same thing implicitly and doesn't segfault. Restrict this to GTK 3.21 for now. Mate-dictionary windows haven't resized to fit text all the way back to MATE 1.10 as tested with GTK 3.14, so this whole function needs to either be fixed or removed. My earlier prevented it from being called by disabling a function that used GtkStyle but in this case GtkStyle isn't causing trouble -yet.
Diffstat (limited to 'mate-dictionary/src')
-rw-r--r--mate-dictionary/src/gdict-window.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mate-dictionary/src/gdict-window.c b/mate-dictionary/src/gdict-window.c
index 3a63b44e..424d7616 100644
--- a/mate-dictionary/src/gdict-window.c
+++ b/mate-dictionary/src/gdict-window.c
@@ -1628,8 +1628,12 @@ set_window_default_size (GdictWindow *window)
widget = GTK_WIDGET (window);
/* make sure that the widget is realized */
+ /*Do this implicitly in GTK3.21 or segfault results */
+#if GTK_CHECK_VERSION (3, 21, 0)
+ gtk_widget_show (widget);
+#else
gtk_widget_realize (widget);
-
+#endif
/* XXX - the user wants mate-dictionary to resize itself, so
* we compute the minimum safe geometry needed for displaying
* the text returned by a dictionary server, which is based