After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336796 - Textview child is covered by window border
Textview child is covered by window border
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-04-01 05:21 UTC by Yevgen Muntyan
Modified: 2006-04-06 02:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase (1.47 KB, text/plain)
2006-04-01 05:22 UTC, Yevgen Muntyan
Details

Description Yevgen Muntyan 2006-04-01 05:21:31 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?).
Comment 1 Yevgen Muntyan 2006-04-01 05:22:10 UTC
Created attachment 62511 [details]
testcase
Comment 2 Matthias Clasen 2006-04-01 16:47:00 UTC
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.
Comment 3 Matthias Clasen 2006-04-01 16:54:34 UTC
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;
Comment 4 Yevgen Muntyan 2006-04-05 04:27:20 UTC
Works fine here, thanks!
Comment 5 Matthias Clasen 2006-04-06 02:48:59 UTC
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)