This lands the basic behavior of the popup surface type, but there are still
a number of details to be worked out. Mainly there's a hardcoded timeout
to handle the case of releasing the popup button outside any of the
client windows, which triggers popup_end if it happens after the timeout.
Maybe we just need to add that as an argument, or we could add a new event
that fires in this case to let the client decide whether it ends the popup
or not.
Make resizor quit when you press Esc key.
Call the toytoolkit cleanup functions, properly destroy window, display
and frame callback.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Get snapping to character grid working again, avoid crashes when attempting
to resize below 1x1 character cell, only redraw when size actually changes.
Also, rename window_get_child_rectangle() to window_get_child_allocation().
The new map_toplevel() request no longer specifies a position and takes
the size from the attached buffer. The attach request now takes a
position relative to the top-left corner of the old buffer to let
clients specify the relative position of the new buffer.
This is an example of how to animate window resizing. The size is
animated by a simple physics model that allows the user to cancel the
animation halfway and still look good.