I'll be using this in a follow up patch that adds touch input to weston's
wayland backend.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Previously geometry was changed to leave space for titlebar if a frame
has only buttons but no title. This patch fixes theme_render_frame to
avoid transparent titlebar.
Signed-off-by: Boyan Ding <stu_dby@126.com>
Title can decide the geometry of a frame because it may affect the
existence of titlebar, so setting geometry_dirty in frame_set_title for
potential change.
Signed-off-by: Boyan Ding <stu_dby@126.com>
There exist frames which have buttons without title such as a simple
X application piped through xwayland which doesn't specify a title.
We draw the title bar with buttons, but hide it under the window
because geometry thinks a window needs titlebar only if it has title.
This patch change the condition, making it titlebar is needed if a
frame has title or has button(s), which makes more sense.
Signed-off-by: Boyan Ding <stu_dby@126.com>
This is used to figure out the size of "invisible" decorations, which we'll
use to better know the visible extents of the surface, which we can use for
constraining, titlebars, and more.
In frame_create, we need to destroy any frame buttons created
in preceding calls to frame_button_create during the function
execution if any of the successive calls to frame_button_create
fail.
This has minimal severity since most, if not all, cases in
frame_button_create that result in a fail (i.e. NULL result) means
a program is OOM and the program will have to exit/abort anyway.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
This makes button handling more correct concerning drags. Also,
frame_pointer_button returns the original button location in the case of a
release. This makes filtering of button events much easier for users of
the cair-util frame code.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>