diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-02-01 18:36:41 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-02-06 13:05:03 -0800 |
commit | 74073454462f9a1fb71319779d4c2d57e1d0e9d5 (patch) | |
tree | b75e5c6632d2dc4aeb37dfffecd19271c4ee9ac2 /shared | |
parent | 2097fe12d47d46efb8784f757dbfb36dc0ed8a8f (diff) | |
download | weston-74073454462f9a1fb71319779d4c2d57e1d0e9d5.tar.gz |
xdg-shell: Add set_margin request
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.
Diffstat (limited to 'shared')
-rw-r--r-- | shared/cairo-util.h | 3 | ||||
-rw-r--r-- | shared/frame.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/shared/cairo-util.h b/shared/cairo-util.h index 7bcbc296..4493b0d9 100644 --- a/shared/cairo-util.h +++ b/shared/cairo-util.h @@ -165,6 +165,9 @@ void frame_opaque_rect(struct frame *frame, int32_t *x, int32_t *y, int32_t *width, int32_t *height); +int +frame_get_shadow_margin(struct frame *frame); + uint32_t frame_status(struct frame *frame); diff --git a/shared/frame.c b/shared/frame.c index a039d157..35e6b65e 100644 --- a/shared/frame.c +++ b/shared/frame.c @@ -578,6 +578,14 @@ frame_opaque_rect(struct frame *frame, int32_t *x, int32_t *y, *height = frame->height - frame->opaque_margin * 2; } +int +frame_get_shadow_margin(struct frame *frame) +{ + frame_refresh_geometry(frame); + + return frame->shadow_margin; +} + uint32_t frame_status(struct frame *frame) { |