Java applets and ConfigureRequest

Leon Bottou leon at bottou.org
Tue Dec 9 16:36:13 GMT 2003


On Tuesday 09 December 2003 03:46 am, Lubos Lunak wrote:
> The X11 border width is so rarely used feature that I doubt this would
> make any difference in practice. But forcing the border size shouldn't harm
> either. Just calling XSetWindowBorderWidth() once after the reparenting is
> finished should be enough.

Yet this might be what is happening in Koos case 
since everything works when he asks the java toolkit
to make the window 'undecorated'.  It all depends
what this means for the java toolkit.  But Koos was surprised
to see that this also apply to Withdrawn windows.
Therefore I wonder whether Java plays funny games
with the almost never used X11 window border.

After reparenting we need to set the border width to zero
and also set the position of the window to (0,0).
I think this is small enough to be done for 3.2.
However I cannot do it because I am out of town
and my laptop is not setup to test this properly.

>  No. QXEmbed is a representation of the external window inside the
> application, in other words, they should act like one. If you obey the
> window's request to change size, QXEmbed should resize as well (similarly,
> it should obey the window's minimum/maximum size). If you respond to
> ConfigureRequest only with XConfigureWindow(), you'll resize only the
> embedded window, but not QXEmbed, which can lead to QXEmbed showing only
> part of the window, or being larger than the window.

My understanding was that QXEmbed forces the client window to
have the same size and position as the embedding window.
Window managers are allowed to do that (remember the tiling window managers).
The configure request is just a hint, like the min and max sizes.
On the other hand, QXEmbed honors the XSizeHint by reflecting
it into the widget minimum size.  Qt then does the layout,
positions the QXEmbed widget. The client window
simply copies the geometry of the QXEmbed widget...
See QXEmbed::minimumSizeHint.  Currently 
QXEmbed::sizeHint simply calls minimumSizeHint.
We could make it report the preferred geometry by saving
the w and h requested by the ConfigureRequest event.

>  For the present time, I think it's simpler to just leave it as it is, with
> QXEmbed forcing its size on the window all the time. Post 3.2, I think
> QXEmbed should try to sync size requests and constrains from both the app
> and the window.

For me this is almost working already.
It misses some code to detect changes in the size hints.
Post 3.2 for sure.

- L.





More information about the kfm-devel mailing list