Re: Our size allocation issues



Hi Alex,

On Thu, 2002-08-15 at 15:56, Alexander Larsson wrote:
> We have some very serious issues with our size allocation for 
> NautilusViews. For some reason they get allocated at 45x60 and then after 
> a while the size allocation machinery turns up and makes them the real 
> size. This gives a variety of problems:
> 
> * unneccessary of flashing on startup, new window, and switching view
> * performance problems, with double redraws and double size allocation

	Ok; it seems the issue is this:

	We have to gtk_widget_show the plug that we are putting the contents in
- or no contents is shown.

	It seems the problem lies in - when to show this plug. Clearly, as soon
as it is shown, it will be mapped - and unless the size allocation has
got there by then we'll see an incorrectly sized GdkWindow.

	Currently the interaction goes something like this:

	Control activation,
	Widget creation [hidden by plug non-showness]
frame -> getWindowId
	plug shown [ X resources allocated ]
	X id returned
frame <- return X id
	set Xid on socket / re-parent / detect in-procness etc.
	finally, sizing logic can get to the plug, we eventually set the
 	right size.

	At the end of the day - the problem is then that the CORBA exchange
happens but once - and we need 2 events to split the realize / show of
the plug. 

	So - one approach would be to have a pending 'to_show' flag such that
in the tail of the BonoboPlug's size_allocate we show, if that flag is
pending.

	Then again, in the bonobo plug world; by the time you have a
size_allocated the plug needs to be shown unconditionally, so I've just
changed the interaction so we have:

frame->getWindowId
	plug realized
	X id returned
frame <- return X id
	...
frame -> size_allocate
	allocate size
	if not mapped -> show (map) widget.
	...

	At least - that's the current plan; then again I've most likely
mis-understood something hideously, so ... ;-) by doing something like
the above I can kill the flicker in the in-proc case nicely, but out-of
proc it seems the size_allocate isn't arriving ever to allow the mapping
of the widget, which is strange indeed; perhaps I need to clobber
socket->current_width / height after the set_id and then queue a
re-size.

	Ideally this would all be done in the GtkPlug / GtkSocket - indeed
perhaps it is already, and I'm just getting something badly wrong. Owen
?

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]