GNOME Bugzilla – Bug 336796
Textview child is covered by window border
Last modified: 2006-04-06 02:48:59 UTC
It depends on something (?) whether textview child added with gtk_text_view_add_child_in_window is covered by border window. The attached file demonstrates the problem. See comment in add_child: child widget should be shown after border window size is set. Perhaps it means that border window should be created first. But, I could not get same bug in testtext.c (maybe some other calls swap window order somehow?).
Created attachment 62511 [details] testcase
Probably the stacking order of the GdkWindows does not get maintained. A workaround should in fact be to create the border windows first, before adding any child widgets. For a fix, we probably need to raise any added children after creating a new border window.
Can you try this patch ? diff -u -p -r1.310 gtktextview.c --- gtktextview.c 28 Mar 2006 17:28:19 -0000 1.310 +++ gtktextview.c 1 Apr 2006 16:53:45 -0000 @@ -7413,6 +7413,7 @@ text_window_realize (GtkTextWindow *win, gdk_window_show (win->window); gdk_window_set_user_data (win->window, win->widget); + gdk_window_lower (win->window); attributes.x = 0; attributes.y = 0;
Works fine here, thanks!
2006-04-05 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextview.c (text_window_realize): Lower the window, to prevent late-constructed text windows from covering child widgets. (#336796, Yevgen Muntyan)