shared/frame: add helper to get decoration sizes without shadow

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This commit is contained in:
Michael Olbrich 2023-02-16 15:51:50 +01:00 committed by Daniel Stone
parent 89d05db0b7
commit 2a48ab8c1e
2 changed files with 14 additions and 2 deletions

View File

@ -167,6 +167,10 @@ frame_width(struct frame *frame);
int32_t
frame_height(struct frame *frame);
void
frame_border_sizes(struct frame *frame, int32_t *top, int32_t *bottom,
int32_t *left, int32_t *right);
void
frame_decoration_sizes(struct frame *frame, int32_t *top, int32_t *bottom,
int32_t *left, int32_t *right);

View File

@ -493,8 +493,8 @@ frame_resize(struct frame *frame, int32_t width, int32_t height)
}
void
frame_decoration_sizes(struct frame *frame, int32_t *top, int32_t *bottom,
int32_t *left, int32_t *right)
frame_border_sizes(struct frame *frame, int32_t *top, int32_t *bottom,
int32_t *left, int32_t *right)
{
struct theme *t = frame->theme;
@ -508,6 +508,14 @@ frame_decoration_sizes(struct frame *frame, int32_t *top, int32_t *bottom,
*bottom = t->width;
*right = t->width;
*left = t->width;
}
void
frame_decoration_sizes(struct frame *frame, int32_t *top, int32_t *bottom,
int32_t *left, int32_t *right)
{
struct theme *t = frame->theme;
frame_border_sizes(frame, top, bottom, left, right);
if (frame->flags & FRAME_FLAG_MAXIMIZED)
return;