[Wayland-bugs] [Bug 75382] Implement wl_probe, or something similar
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Mar 29 21:47:02 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=75382
--- Comment #10 from x414e54 at linux.com ---
I have done a bit more thinking about the idea.
I propose something along the lines of:
set_window_constraints(enum x, enum y)
move_x
- The window will be able to be moved along the x direction up to a maximum of
its width.
move_y
- The window will be able to be moved along the y direction up to a maximum of
its height.
rotate
- The window can be rotated safely around the x and y co-ordinates. Both x and
y must be rotate or this is an error.
flip_x
- The window can be mirrored along the x axis. Non-mirror-able content such as
text should be sub-surfaces which will be positioned as if mirrored first along
the parent x axis and then along their width mid point.
- If the compositor is unable to mirror buffers then this will become resize_w.
flip_y
- The window can be mirrored along the x axis. Non-mirror-able content such as
text should be sub-surfaces which will be positioned as if mirrored first along
the parent y axis and then along their height mid point.
- If the compositor is unable to mirror buffers then this will become resize_y.
scale_parent_to_fit_w
- The root parent surface width will be scaled so the total bounding area will
fit on the screen.
- If the compositor is unable to scale buffers then this will become
resize_parent_to_fit_w.
scale_parent_to_fit_h
- The root parent surface height will be scaled so the total bounding area will
fit on the screen.
- If the compositor is unable to scale buffers then this will become
resize_parent_to_fit_y.
resize_parent_to_fit_w
- The root parent surface width will receive configure events to state its
maximum width so the total bounding area will fit on the screen.
resize_parent_to_fit_h
- The root parent surface height will receive configure events to state its
maximum height so the total bounding area will fit on the screen.
resize_w
- The x co-ordinate is guaranteed and the surface will receive configure events
to state its maximum width to fit on the screen.
resize_h
- The y co-ordinate is guaranteed and the surface will receive configure events
to state its maximum height to fit on the screen.
You can use a combination of either for example have a popup movable along the
x axis but fixed y position.
The application is then free to move the y position if the height becomes to
small.
This also allows a user on a tabletop style display to rotate a pop-up
separately of the parent window without the application having to be involved.
Also tabletop/multi-touch where you do not want a menu popup on one surface to
block the entire surface. And the window may get knocked about due to
collision/physics.
So in your example for an application creating a menu based on a widget shape.
It can either:
set_window_constraints(resize_w, resize_h)
It will then receive configure events which if it is not happy about it could
move/resize the popup.
Exactly the same as wl_probe except it would allow resizing or moving the popup
if the parent window moved without polling.
Or:
set_window_constraints(flip_x, flip_y)
Attach the popup window decoration buffer offset by the center point of the
widget and then attach the Text/Content buffer as a subsurface/child to the
popup.
The compositor can then flip the decoration buffer and due to the center based
offset it would be in the correct position.
It would then position the Text buffer in the correct place for the decoration.
In this case the decoration buffer or original widget need not be a rectangular
shape but just the text/content buffer needs to be able to be correctly
overlayed on top.
This means the compositor could display the popup differently on two different
outputs, and also could move the popup itself when the parent window is moved.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150330/a42de9f7/attachment-0001.html>
More information about the wayland-bugs
mailing list