File workaround_for_gtk3_higher_3.7.8.patch of Package uim

Description: Add a workaround for gtk+ >= 3.7.8.
Origin: upstream, https://github.com/uim/uim/commit/5177a6f6545f9180bbbbd595e0d4b0c311414119
Bug-Debian: https://bugs.debian.org/752226
Author: e-kato <ek.kato@gmail.com>
Lst-Update: 2014-01-22

diff --git a/gtk2/candwin/gtk.c b/gtk2/candwin/gtk.c
index 3964ccd..c87459b 100644
--- a/gtk2/candwin/gtk.c
+++ b/gtk2/candwin/gtk.c
@@ -801,6 +801,9 @@ candwin_show_page(gchar **str)
 
   uim_cand_win_gtk_set_page(cwin, page);
   gtk_widget_show_all(GTK_WIDGET(cwin));
+#if GTK_CHECK_VERSION(3, 7, 8)
+  gtk_widget_queue_resize_no_redraw(cwin->view);
+#endif
 }
 
 static void str_parse(gchar *str)
diff --git a/gtk2/immodule/uim-cand-win-gtk.c b/gtk2/immodule/uim-cand-win-gtk.c
index 4d28266..b8b3b5a 100644
--- a/gtk2/immodule/uim-cand-win-gtk.c
+++ b/gtk2/immodule/uim-cand-win-gtk.c
@@ -765,6 +765,10 @@ uim_cand_win_gtk_layout(UIMCandWinGtk *cwin,
   }
 
   gtk_window_move(GTK_WINDOW(cwin), x, y);
+#if GTK_CHECK_VERSION(3, 7, 8)
+  if (gtk_widget_get_mapped(cwin->view) && GTK_IS_TREE_VIEW(cwin->view))
+    gtk_widget_queue_resize_no_redraw(cwin->view);
+#endif
 
   uim_cand_win_gtk_layout_sub_window(cwin);
 }