Java applets and ConfigureRequest

Lubos Lunak l.lunak at suse.cz
Tue Dec 9 08:46:30 GMT 2003


On Tuesday 09 of December 2003 01:22, Leon Bottou wrote:
> On Monday 08 December 2003 11:49 am, Lubos Lunak wrote:
> > See ICCCM, section 4.1.5. Synthetic configure notify events are supposed
> > be relative to root window, and QXEmbed does it right. Not that it
> > actually matters, as QXEmbed blocks are configure requests  (I think it
> > should honor size changes, and also handle min/max sizes).
>
> I actually had a look.  ICCCM says:
> " The (x,y) coordinates will be in the root coordinate system adjusted for
> the border width the client requested, irrespective of any reparenting ...
> " and layer
> " the coordinates will reflect the actual border width of the window
>   (which the window manager might have changed)"
>
> QXEmbed does not adjust for the border width.
> Therefore it does it right when the border width is zero.
> Lubos says that QXEmbed is allowed to enforce a zero border width policy.
> But QXEmbed does not en does not do this.  It solely calls XResizeWindow.
>
> The simplest fix would be to replace all the two XResizeWindow by
> XConfigureWindow to enforce the position, the size, and a zero border
> width.

 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.

> For additional safety, another call to XConfigureWindow should 
> probably be made when we receive a ConfigureRequest message, before sending
> the synthetic notification.
>
> Lubos, does this seem correct to you?

 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.

 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.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/




More information about the kfm-devel mailing list