I'm using a browser widget which I always want to have the size it needs to show the whole html page. That's not possible by default, but I am able to update the size after rendering by using a small java-script function.
Anyway, that's not the problem. My problem is that I have to relayout parts of my component hierarchy when the size of the browser widget changes. I managed to do that by calling layout(true, true) on each of the browsers parents, but I guess that's not very smart and does a lot more relayouts than needed. Calling layout only on the direct parent of the browser widget does not work and I think layouting must be at least propagated up the hierarchy to a ScrolledComposite or something similar.
I found a solution that works by doing this on stackoverflow: http://stackoverflow.com/questions/586414/why-does-an-swt-composite-sometimes-require-a-call-to-resize-to-layout-correctl/686610#686610
But I think that should be a common problem and if that's really the right solution: Isn't there a util function already located in SWT to do that?
As far as i understand the last reply, it is exactly the same what I outlined as working solution. I'm just wondering that there is no function doing the layout propagation until it reaches a scrollable composite. If that's the default step to do in this situation then there should be a utility function. Otherwise all developers have to reimplement it. That's why I'm not sure that it is the right way.