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 331599 - GtkNotebook flicker problem on Win32 with background pixmap set
GtkNotebook flicker problem on Win32 with background pixmap set
Status: RESOLVED DUPLICATE of bug 144269
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.8.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-02-17 19:59 UTC by Emilie
Modified: 2006-05-16 20:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case, pre-compiled windows executable, source file, makefile, and images (38.88 KB, application/x-compressed-tar)
2006-02-17 20:11 UTC, Emilie
Details

Description Emilie 2006-02-17 19:59:53 UTC
This problem only appears on Win32 (I am using gtk+ 2.8.9).

When a set of widgets is created at run-time and added to a notebook page that has a background pixmap set, there is a very noticeable and unacceptable flicker.  It appears that the widget is being painted with a grey background before being updated to the pixmap.  My application uses GtkEventBoxes with their "visible window" turned off but I think it is also occuring for other "see-through" widgets.

I think this may be related to <a href="http://bugzilla.gnome.org/show_bug.cgi?id=144269">Bug #144269</a> but I don't know enough about the internals to play with this or really know what I am doing.

The thing I have discovered is that if you add the widgets to the notebook before calling gtk_main(), there will be no flicker, even if the background pixmap is changing, it seems to only affect widgets that are added at runtime.

I have created a test program which I hope illustrates this.  The program has 3 tabs, the first just allows you to choose one of the other 2 tabs.  Each of the other tabs has a table of widgets that simulate a "multiple-choice" question.  One of the tabs is created at run-time and therefore exhibits the flicker problem.  The other tab is identical except it was added before gtk_main() is called and therefore doesn't exhibit the flicker problem.

Needless to say, my real program needs to generate the pages at run-time (the multiple choice questions/backgrounds are read in from an XML file).  I have not been able to figure out any sort of work around.  As this demo program illustrates, it's not when the resources are allocated that is the problem it's when they are added and drawn, somehow.

The images used are from art.gnome.org, hopefully it doesn't offend any copyrights to include them in this bug-report.
Comment 1 Emilie 2006-02-17 20:11:52 UTC
Created attachment 59607 [details]
Test case, pre-compiled windows executable, source file, makefile, and images

Contains a pre-compiled executable as well as the source/make files.  Images contained herein are from art.gnome.org
Comment 2 Emilie 2006-04-05 23:15:31 UTC
I've spent more time on this and it appears that I was incorrect in claiming that the flicker only occurs when notebook pages are created at run-time, I am seeing the flicker on pages created before gtk_main.  It seems to be a more generic double-buffer problem with eventboxes/images/gtknotebook on win32.

Although the test case submitted earlier still demonstrates this bug, I will try to create a simpler, more generic one.
Comment 3 Emilie 2006-05-16 20:43:20 UTC
I still have not discovered exactly why and when this bug manifests itself but the patch given in Bug #144269 solves it completely.

I think this bug report should be closed as a duplicate bug.

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