Predefined window position

Norman Feske norman.feske at ...1...
Tue Sep 5 16:04:02 CEST 2017


Hi Alex,

>     <start name="layouter">
>         <binary name="floating_window_layouter"/>
>         <resource name="RAM" quantum="4M"/>
>         <config>
>             <policy label_prefix="mixer_gui_qt" xpos="300" ypos="300"/>
>         </config>
>         <route>
>     ...
> 
> Unexpectedly, when I run it the window is created as position (0,0). What's the right way to set the position of a window?

thanks for bringing up this issue. This is indeed a silly bug in the
window layouter. I just fixed it in [1].

[1]
https://github.com/genodelabs/genode/commit/b2b21270d74feb402097a57591ad04b6bb0faa7b

> Also, I was wondering whether there is a way to set the dimension of a Qt window without changing the application?

This is not possible out of the box. One idea to achieve that would be
adding 'width' and 'height' attributes to the layouter's policy,
following the pattern of 'xpos' and 'ypos'. But instead of immediately
setting the window to the specified size, the layouter would set the
'requested_size' of the window. Internally, this would be handled like
if user manually attempted to drag the border of the window to the
specified size. The actual size will be set only if the application
actually responds to the resize request. This is just an idea. I have
not tried this out.

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list