[squeak-dev] Re: DisplayScreen class>>hostWindowExtent: with HostWindowPlugin on X11 cannot possibly work

Bert Freudenberg bert at freudenbergs.de
Thu May 12 09:51:09 UTC 2016


On 12.05.2016, at 07:42, David T. Lewis <lewis at mail.msen.com> wrote:
> 
> For our immediate purposes, we should respect the convention of treating
> host window handle 1 as a reference to the display window. Hack the plugin
> and X11 loadable VM module as needed make it work. It does work, and I'll
> post some VM patches as soon as I can (maybe a couple of days, I'm done
> looking at it for now).
> 
> But what we really should do: Implement it as I believe that it was probably
> done at Qwaq. The handles should be opaque, and the host window plugin
> should have an addition primitive to answer the window handle for the
> main host window. That primitive would, in the case of the X11 VM module,
> call this to get the handle:
> 
>  void *display_ioGetWindowHandle() { return (void *)stParent; }
> 
> This can be done in a backward compatible manner, because the image
> can call the primitive to obtain the main window handle, and fall back
> to a default value of 1 if the primitive fails.
> 
> Dave

+1

This is a sensible and pragmatic approach.

The other option would be to actually have a registry in the plugin and only hand indices to the image instead of leaking raw window handles. That way the handles would be completely opaque, and couldn’t be forged by the image. Index 1 would be pre-allocated to the main window. But I agree that the added complexity in the plugin is not worth that effort.

- Bert -

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4207 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160512/0d67f358/smime.bin


More information about the Squeak-dev mailing list