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 695131 - gtkbin: initialize minimum and natural size to zero for when child is not visbile
gtkbin: initialize minimum and natural size to zero for when child is not vis...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-03-04 15:39 UTC by Alban Browaeys
Modified: 2013-03-05 01:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
set dummy size to zero before adjustments (also in between calls) (1.20 KB, patch)
2013-03-04 15:39 UTC, Alban Browaeys
none Details | Review
initialize gtkbin minimum_ and natural_ width and height for when child is not viisble (1.70 KB, patch)
2013-03-04 18:25 UTC, Alban Browaeys
accepted-commit_now Details | Review

Description Alban Browaeys 2013-03-04 15:39:17 UTC
Created attachment 238002 [details] [review]
set dummy size to zero before adjustments (also in between calls)

The value of dummy was not zero in my debug session (could be very high numbers) and after first adjust  dummy  was negative .
This affect mostly the gtk print window (all applications using gtk+ 3) and where the value tends to overflow the integer type and one ends up with high negative numbers.
Though it could fix medium to minor adjustments for other widgets.
Comment 1 Alban Browaeys 2013-03-04 17:08:14 UTC
sorry wait :/
it seems the root was an issue in libgd size requesition (same issue not initialized values) . Because here it makes no sense the values of dummy are not used anywhere .
Still investigating what has really fixed the issue here (I use gedit as a testcase).
Also obviously it would only affect lbgd applications : I guess the issue with all the gtk applications was the glist change that broke the gtk cups backend and is already fixed.
Comment 2 Alban Browaeys 2013-03-04 17:56:19 UTC
got it. gd revealer use gtkbin size requisition . But if child of gtkbin is not visible gtkbin do only
"*minimum_width += border ... " though minimum_width is nowhere iniitialized.
I am testing and will send the patch in a few hours (which boils down to set minimum_ and natural_ width and height to zero at the start of the get_preferred_ functions so that even we never returns random values).
Comment 3 Alban Browaeys 2013-03-04 18:25:10 UTC
Created attachment 238028 [details] [review]
initialize gtkbin minimum_ and natural_ width and height for when child is not viisble
Comment 4 Emmanuele Bassi (:ebassi) 2013-03-04 19:55:03 UTC
Review of attachment 238028 [details] [review]:

looks okay to me.