diff options
author | Boyan Ding <stu_dby@126.com> | 2014-07-04 15:19:22 +0800 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2014-07-05 01:05:06 -0700 |
commit | c4902124f95b37239552e1e3d4017c74caf6db9e (patch) | |
tree | f54a93dbdddd3fbd1e552dc719e4fdbbec973fe4 /shared | |
parent | ef5400843ff53c76ccfac99a80ef84baaee3dc38 (diff) | |
download | weston-c4902124f95b37239552e1e3d4017c74caf6db9e.tar.gz weston-c4902124f95b37239552e1e3d4017c74caf6db9e.tar.bz2 weston-c4902124f95b37239552e1e3d4017c74caf6db9e.zip |
cairo-util: Fix geometry for frames with buttons but without title
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>
Diffstat (limited to 'shared')
-rw-r--r-- | shared/frame.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/frame.c b/shared/frame.c index 35e6b65e..aacca608 100644 --- a/shared/frame.c +++ b/shared/frame.c @@ -426,7 +426,7 @@ frame_resize_inside(struct frame *frame, int32_t width, int32_t height) struct theme *t = frame->theme; int decoration_width, decoration_height, titlebar_height; - if (frame->title) + if (frame->title || !wl_list_empty(&frame->buttons)) titlebar_height = t->titlebar_height; else titlebar_height = t->width; @@ -467,7 +467,7 @@ frame_refresh_geometry(struct frame *frame) if (!frame->geometry_dirty) return; - if (frame->title) + if (frame->title || !wl_list_empty(&frame->buttons)) titlebar_height = t->titlebar_height; else titlebar_height = t->width; |