Bug in GTK's internal invocation of GtkLayoutManagerClass.measure()
Hi,
Some weeks ago I had left a message on discourse in which I explained how I was not able to solve a bug that affected a custom layout manager of mine. Now I am quite convinced that the bug is in the GTK libraries (not in my widgets), and I would like to understand what is going on.
At https://github.com/madmurphy/libgnuisance-tests I have prepared a modified version of my library that emphasizes the problem and prints in a terminal the information passed to the .measure()
and .allocate()
functions of my layout manager.
If you clone the repository, run sandbox/before-install/tagged-entry-sandbox-run.sh
and start adding tags, you will notice that
- The window's height will not increase despite the height of your tagged entry will increase
- The numbers printed in the terminal are crazy, and even if the tagged entry is
150px
large, my.measure()
function is asked to calculate the height of an imaginary tagged entry that is1316px
large, and that number keeps increasing.
You can see both issues in this short screencast:
As you can see from the printed messages, the problem comes solely from the numbers that the GTK libraries pass to the .measure()
function of my layout manager, and these do not make any sense.
In my message on Discourse I suspected that the bug might come from the gtk_widget_query_size_for_orientation()
function in gtk/gtksizerequest.c
.
Is anyone able to shed some light on this issue?
--madmurphy
EDIT: As I have updated the test repository, please refer to this commit or, equivalently, this attached file.