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 766737 - stack: Only map children when necessary
stack: Only map children when necessary
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-05-20 22:36 UTC by Florian Müllner
Modified: 2016-05-20 22:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
stack: Only map children when necessary (1.57 KB, patch)
2016-05-20 22:36 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2016-05-20 22:36:05 UTC
See patch.
Comment 1 Florian Müllner 2016-05-20 22:36:13 UTC
Created attachment 328294 [details] [review]
stack: Only map children when necessary

gtk_widget_set_parent() will map the widget if the parent is mapped
and the widget is both visible and child-visible. As we currently
only set the child visibility after adding the child, we immediately
map all children that are added to a mapped stack, even when they
are not actually shown. Avoid this by setting the child visibility
before adding the child, so widgets are only mapped when shown.
Comment 2 Benjamin Otte (Company) 2016-05-20 22:44:34 UTC
Comment on attachment 328294 [details] [review]
stack: Only map children when necessary

Looks good.
Comment 3 Florian Müllner 2016-05-20 22:57:11 UTC
Attachment 328294 [details] pushed as 57efcab - stack: Only map children when necessary