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 125597 - GtkTextView in GtkScrolledWindow not redraw properly
GtkTextView in GtkScrolledWindow not redraw properly
Status: RESOLVED DUPLICATE of bug 144269
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.2.x
Other Windows
: Normal normal
: Small fix
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-10-27 14:21 UTC by Richard Warren
Modified: 2007-07-08 22:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example screenshot of a corrupted window. (23.87 KB, image/jpeg)
2003-10-27 14:23 UTC, Richard Warren
Details

Description Richard Warren 2003-10-27 14:21:48 UTC
I have a GtkTextView inside a GtkScrolledWindow (with automatic scrollbars 
both horizontally and vertically), which in turn is packed into the bottom 
half of a GtkVPaned widget.  (If it matters, there is a DrawingArea in the 
top half of the VPaned).

When I drag the VPaned separator upwards (i.e. make the text view larger), 
everything is okay.

When I drag the separator downwards (i.e. make the text view smaller), the 
text view doesn't redraw correctly.  Instead, it leaves multiple copies of 
the separator in the text view window, corrupting the text.  It appears as 
though the separator is sometimes drawn in the new position, and then the 
contents of the text view are moved downwards, including the separator.

This seems to happen regardless of the amount of text in the window, i.e. 
it's independent of whether there is a vertical scrollbar or not.

This works okay when the same program is run under Linux.  I'm using the 
V2.2.4 version of GTK for Windows, as downloaded from Tor's website on 1st 
September 2003.

Apologies if this is a duplicate, but I tried searching for similar bugs 
and couldn't find any.
Comment 1 Richard Warren 2003-10-27 14:23:58 UTC
Created attachment 20974 [details]
Example screenshot of a corrupted window.
Comment 2 Tor Lillqvist 2003-10-28 18:52:47 UTC
This could be related to the fact that X11 GraphicsExposes aren't 
properly emulated by gdk/win32?
Comment 3 Peter Zelezny 2004-07-01 09:57:31 UTC
I don't think so, since GCs are created with GraphicsExpose OFF. The only places
 they're turned on explicitly are:

$ grep _set_expos *.c
gtkclist.c:  gdk_gc_set_exposures (clist->fg_gc, TRUE);
gtkruler.c:      gdk_gc_set_exposures (ruler->non_gr_exp_gc, FALSE);
gtktext.c:  gdk_gc_set_exposures (text->gc, TRUE);  <-- ***

Is the widget in the screenshot GtkText? It might be time to use GtkTextView!

However, I see a similar problem with xchat/win32 using a GtkVPaned with
GtkTreeView not redrawing itself properly (however that's gtk 2.2.4).

P.S. Tor, you actually wrote some code to implement GraphicsExpose on win32, but
it never got commited. It's probably in the mailing-list archives somewhere.
Comment 4 Richard Warren 2004-07-12 08:50:35 UTC
No, it's definitely already a GtkTextView, not a GtkText.

By the way, this still happens with the latest version of GTK+ that I 
downloaded from Tor's website on the 21st June (which I believe is V2.4.3).
Comment 5 John Ehresman 2004-07-12 14:35:06 UTC
I think this is related to bug #144269 and it is present in the current CVS
sources.  My theory is it's caused by the window repositioning / resizing code
in gdkgeometry-win32.c but I don't have a fix for it.  The workaround is to
queue a redraw when the allocation changes.
Comment 6 Cody Russell 2007-07-08 22:28:00 UTC

*** This bug has been marked as a duplicate of 144269 ***