From 911ae1af88380865bac7b1505d868f0d7dbbe787 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Mon, 1 Oct 2012 17:38:07 +0200 Subject: [PATCH] wlt: theme: do not draw decorations in fullscreen mode When fullscreen mode is active, we should not draw any decorations. Instead just skip every callback in the theme layer. Signed-off-by: David Herrmann --- src/wlt_theme.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/wlt_theme.c b/src/wlt_theme.c index 5da7716..a15a84f 100644 --- a/src/wlt_theme.c +++ b/src/wlt_theme.c @@ -239,6 +239,9 @@ static void widget_redraw(struct wlt_widget *widget, unsigned int flags, struct wlt_theme *theme = data; unsigned int width, height; + if (flags & WLT_WINDOW_FULLSCREEN) + return; + width = theme->buffer.width; height = theme->buffer.height; if (width < 2 || @@ -266,6 +269,9 @@ static void widget_prepare_resize(struct wlt_widget *widget, struct wlt_theme *theme = data; unsigned int minw, minh; + if (flags & WLT_WINDOW_FULLSCREEN) + return; + /* set minimal size */ minw = 2 * theme->button_margin + 2 * theme->button_padding + 3 * theme->button_size + *new_width; @@ -293,6 +299,9 @@ static void widget_resize(struct wlt_widget *widget, unsigned int flags, wlt_window_get_buffer(theme->wnd, alloc, &theme->buffer); memcpy(&theme->alloc, alloc, sizeof(*alloc)); + if (flags & WLT_WINDOW_FULLSCREEN) + return; + alloc->x = theme->frame_width; alloc->y = theme->control_height + theme->frame_width; nwidth = alloc->width - 2 * theme->frame_width;