What we do and don't expose to client toolkits

Christopher James Halse Rogers chris at cooperteam.net
Mon Sep 5 23:41:38 UTC 2016



On Tue, Sep 6, 2016 at 2:21 AM, Alan Griffiths 
<alan.griffiths at canonical.com> wrote:
> On 02/09/16 15:44, Alan Griffiths wrote:
>> On 02/09/16 15:42, Thomas Voß wrote:
>>> This only works in the fullscreen case and I
>>> cannot think of a scenario where this impacts overall
>>> user experience. The app already is the one "owning" the display in 
>>> fullscreen.
>> Why would you think it only work in the fullscreen case?
> there was an IRC conversation to sort this out between myself William 
> and Thomas.
> 
> I think the resulting consensus was:
> 
> 1. Mir will constrain the placement anchor of the aux_rect to the 
> parent surface. I don't think we agreed exactly how (e.g. do we 
> "clip" the rect? What happens if there is *no* intersection?)
> 
This is easy. The client knows all the information required to ensure 
this, so if any part of the placement anchor is outside the parent 
anchor, we fail the request.

> 2. Mir will constrain the the offset placement anchor to the parent 
> surface. Again I don't think we agreed how. (Slide it horizontally 
> and/or vertically the minimum amount?)
> 
If any part of the offset placement anchor is outside the parent 
surface, we fail the request. ☺
> 3. Mir will provide a new notification of the placement rectangle.
> 
> 4. Clients can then probe the display boundaries:
> 
>> E.g.
>>   MirRectangle aux { 0, 0, 0, 0 };
>> 
>>  auto const surface_spec = 
>> mir_connection_create_spec_for_tip(connection, a_big_width, ...);
>>  mir_surface_spec_set_placement(
>>     surface_spec, &aux,
>>     mir_placement_gravity_northwest, // rect anchor
>>     mir_placement_gravity_northeast, // surface anchor
>>     mir_placement_hints_resize_x,
>>     0,
>>     0);
>> Will result in a "tip" surface whose width is the distance to the 
>> left hand side of the screen.
>> 
> 5. Clients using the result of such probing may get stupid results. 
> We don't care.




More information about the Mir-devel mailing list