GNOME Bugzilla – Bug 164007
segfault in custom widget example
Last modified: 2005-01-18 20:51:35 UTC
Segfaults in on_expose_event() because of problem with get_default_colormap() (see Bug 163992).
Created attachment 35984 [details] [review] patch Removed colormap in on_expose_event() Made it draw something nice.
Is this patch meant to fix the crash reported bug 163992?
No it's not, it's meant to make the example work. I just discovered bug 163992 while working on this, this patch does not fix that, just the example.
1. This patch contains whitespace changes. Please try to remove them so I can more easily see what has really changed. 2. This patch does more than just what it says in the ChangeLog. Please explain them. 3. If this patch contains a workaround for another bug, then please wait until that bug is resolved and/or clearly comment-out that code so that it can be re-enabled later. By the way, the gtkmm book gets the code directly from the examples directory, so it is not necessary to also patch the book.
Created attachment 36097 [details] [review] cleaned up patch 1. done that 2. done that 3. Using modify_bg and modify_fg is not really a workaround for bug 163992 although this made it crash on my machine. I just think this is a simpler way, and i did not think changing this would be a problem because how we change the colors is not essential to this example. Question: It doesn't seem to make a difference if on_expose_event() returns true or false, what is this return value for and how is it used?
Excellent. Many thanks. Applied.