How to maintain relative position of two surfaces?
Hongze Zhao
zhaohongze at gmail.com
Wed Sep 24 18:48:56 PDT 2014
I am not familiar with subsurfaces as I am new to weston. I will look at it
and see how it works.
Thanks,
Hongze
On Wed, Sep 24, 2014 at 8:45 PM, Jasper St. Pierre <jstpierre at mecheye.net>
wrote:
> This sounds like you want to use subsurfaces, then.
>
> Any reason you can't just draw the child surface on top of the father
> surface, though?
>
> On Wed, Sep 24, 2014 at 6:16 PM, Hongze Zhao <zhaohongze at gmail.com> wrote:
>
>> Hi Jasper,
>>
>> Thanks for reply.
>>
>> Here is my use case.
>>
>> Suppose we have a client called "father", who has a larger surface called
>> "father surface" and a client called "child", whose smaller surface is
>> "child surface". The child surface should be displayed in a given relative
>> position above father surface and maintain their relative position. When I
>> move father surface, the child surface will be moved together. But the
>> child surface cannot be moved. Thus the child surface will looks like a
>> part of father surface. I just need it works in the simplest scenario. I
>> assume the two surfaces is in the same workspace, both surfaces cannot be
>> resized, maximized or fullscreened. The two clients and compositor should
>> work together to achieve this goal.
>>
>> I know this is a weird use case. I am just wondering if there is some
>> natural or easy way to implement this functionality. Or I have to do a lot
>> of modifications.
>>
>> Thanks,
>> Hongze
>>
>>
>> On Wed, Sep 24, 2014 at 7:54 PM, Jasper St. Pierre <jstpierre at mecheye.net
>> > wrote:
>>
>>> The only way to position surfaces relatively one to another is by using
>>> a subsurface. But I imagine this isn't exactly what you want.
>>>
>>> Can you explain a bit more about your use case? What happens if I put
>>> one surface on a different workspace from the others? Should the two be
>>> stacked independently (e.g. your window A, my terminal, your window B)?
>>> What happens when I resize the surfaces? Or maximize or fullscreen them?
>>>
>>> On Wed, Sep 24, 2014 at 5:49 PM, Hongze Zhao <zhaohongze at gmail.com>
>>> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I am doing some experiments on weston compositor. I am wondering if
>>>> someone could give me some hints about how to maintain relative position of
>>>> two surfaces.
>>>>
>>>> Suppose I have two wayland clients. After I grab and move the surface
>>>> of one client, I would like to maintain the relative positions of the the
>>>> surfaces from two clients. Thus I have to automatically update the position
>>>> of the other surface.
>>>>
>>>> I feel that surface position is stored in an instance of weston_view,
>>>> which is mainly maintained by desktop-shell. So I am not sure if there is
>>>> some easy way to achieve my goal by modifying desktop-shell.
>>>>
>>>> Thanks,
>>>> Hongze
>>>>
>>>> _______________________________________________
>>>> wayland-devel mailing list
>>>> wayland-devel at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>>>>
>>>>
>>>
>>>
>>> --
>>> Jasper
>>>
>>
>>
>>
>> --
>> Hongze Zhao
>> Department of Computer Science
>> Duke University
>> Email: zhaohongze at gmail.com
>>
>
>
>
> --
> Jasper
>
--
Hongze Zhao
Department of Computer Science
Duke University
Email: zhaohongze at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140924/01da56c6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: surfaces.png
Type: image/png
Size: 3046 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140924/01da56c6/attachment-0001.png>
More information about the wayland-devel
mailing list