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 611944 - [StScrollBar] avoid queueing a relayout during allocation
[StScrollBar] avoid queueing a relayout during allocation
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-05 21:29 UTC by Owen Taylor
Modified: 2010-03-11 20:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[StScrollBar] avoid queueing a relayout during allocation (7.72 KB, patch)
2010-03-05 21:29 UTC, Owen Taylor
none Details | Review
[StScrollBar] avoid queueing a relayout during allocation (7.79 KB, patch)
2010-03-05 21:38 UTC, Owen Taylor
none Details | Review
[StScrollBar] avoid queueing a relayout during allocation (7.79 KB, patch)
2010-03-05 23:07 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2010-03-05 21:29:24 UTC
This is a bug fix for StScrollBar and Clutter 1.2; it also requires
Clutter-1.2 since the ::queue-relayout method of ClutterActor is
new in 1.2.
Comment 1 Owen Taylor 2010-03-05 21:29:26 UTC
Created attachment 155363 [details] [review]
[StScrollBar] avoid queueing a relayout during allocation

When an StScrollView is allocated, allocating the child would
cause the adjustment values to change, which would result in
the scrollbars queueing a relayout, which isn't allowed during
allocation.

To avoid this, instead of queueing a relayout when the adjustment
changes:

 - When we have a valid allocation already, just go ahead
   and reallocate the children.
 - Otherwise do nothing immediately and wait until we get allocated

Because the 'needs_allocation' flag in ClutterActor isn't exposed,
this requires some slightly ugly code to shadow that state locally.
Comment 2 Owen Taylor 2010-03-05 21:38:37 UTC
Created attachment 155366 [details] [review]
[StScrollBar] avoid queueing a relayout during allocation

Added link to newly filed:

 http://bugzilla.openedhand.com/show_bug.cgi?id=2024

to the comment explaining the workaround handling of needs_allocation.
Comment 3 Owen Taylor 2010-03-05 23:07:27 UTC
Created attachment 155379 [details] [review]
[StScrollBar] avoid queueing a relayout during allocation

Minor fix for a compilation problem.
Comment 4 Dan Winship 2010-03-09 22:06:02 UTC
Comment on attachment 155379 [details] [review]
[StScrollBar] avoid queueing a relayout during allocation

looks good
Comment 5 Owen Taylor 2010-03-11 20:09:40 UTC
Attachment 155379 [details] pushed as 524e2ca - [StScrollBar] avoid queueing a relayout during allocation