Lost size allocations between plug and socket
- From: Owen Taylor <otaylor redhat com>
- To: Michael Meeks <michael ximian com>
- Cc: Alex Larsson <alexl redhat com>, nautilus-list gnome org, Gtk Hackers <gtk-devel-list gnome org>
- Subject: Lost size allocations between plug and socket
- Date: Tue, 20 Aug 2002 11:28:59 -0400 (EDT)
Michael Meeks <michael ximian com> writes:
> Hi Owen,
> On Tue, 2002-08-20 at 00:21, Owen Taylor wrote:
> > Let me see if I can describe how I expect things to work, and then
> > perhaps you can correlate your observations with this.
> Sounds good. I think the main problem is that I'm getting confused by
> (possibly) two bugs.
OK, splitting this thread into two pieces.
> The first is, that sizing seems erratic for some reason; fairly
> frequently it seems that the GtkPlug side is not getting the
> size_allocate propagated correctly from the GtkSocket (only when out of
Hmm, this sounds a bit like:
Thu May 16 18:47:29 2002 Owen Taylor <otaylor redhat com>
* gtk/gtksocket.c (gtk_socket_size_allocate): Send
as many synthetic configures as necessary to make
up for ConfigureRequest events we got. (#78799,
But that shouldn't happen any more.
> To see this, you can run libbonoboui/tests/test-reparent - re-sizing
> the window (to greater than the GtkEntry default allocation) and then
> hitting 'reparent widget' a few times. Of course, it's entirely possible
> that I'm doing something daft - but having turned off all my (in some
> cases mis-guided) Bonobo plug/socket shortcuts / optimizations I still
> get the effect so ...
Can you rewrite the test to use only GtkPlug, GtkSocket?
> If I understood the process by which a size_allocate on the GtkSocket
> resulted in a size_allocate on the remote GtkPlug then I'd be a lot
> happier and might be able to debug the problem; how does that work ? [
> via. a ConfigureEvent ? or do they merely go Plug -> Socket ? ].
It works exactly identical to the way that window managers handle
toplevel windows... (which means we can use all the horribly complex
logic in GtkWindow verbatim in GtkPlug.)
So, see the ICCCM (probably in /usr/share/doc/XFree86-doc-*/) for
Every time a Plug asks for a new size via XResizeWindow, XMoveResizeWindow.
it is guaranteed to get a ConfigureNotify event back. If the window
was actually resized, then it will get a real ConfigureNotify sent
from X. If the Socket decided not to actually resize the window,
then it sends a synthetic ConfigureNotify back.
] [Thread Prev