From 69f848cefd5e192eea88458551a7c0c8ec0b4654 Mon Sep 17 00:00:00 2001 From: "Alejandro G. Castro" Date: Tue, 11 Aug 2009 14:53:40 +0200 Subject: [PATCH] Added a new check of scrollbars layout in the allocation * hildon/hildon-pannable-area.c (hildon_pannable_area_size_allocate): Checked the scrollbars before the first try when defining the layout, avoids two allocations in some situations. Fixes: NB#131794 (pannable area produces unnecessary allocations causing performance problems) --- ChangeLog | 10 ++++++++++ hildon/hildon-pannable-area.c | 2 ++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9f0b6e6..997c480 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,16 @@ 2009-08-11 Alejandro G. Castro * hildon/hildon-pannable-area.c + (hildon_pannable_area_size_allocate): Checked the scrollbars + before the first try when defining the layout, avoids two + allocations in some situations. + + Fixes: NB#131794 (pannable area produces unnecessary allocations + causing performance problems) + +2009-08-11 Alejandro G. Castro + + * hildon/hildon-pannable-area.c (hildon_pannable_area_button_press_cb), (hildon_pannable_area_motion_notify_cb), (hildon_pannable_area_button_release_cb): Added unrefs to reduce diff --git a/hildon/hildon-pannable-area.c b/hildon/hildon-pannable-area.c index 33033dc..abf5223 100644 --- a/hildon/hildon-pannable-area.c +++ b/hildon/hildon-pannable-area.c @@ -1223,6 +1223,8 @@ hildon_pannable_area_size_allocate (GtkWidget * widget, if (child && GTK_WIDGET_VISIBLE (child)) { + hildon_pannable_area_check_scrollbars (HILDON_PANNABLE_AREA (widget)); + hildon_pannable_area_child_allocate_calculate (widget, allocation, &child_allocation); -- 1.7.9.5