[PATCH weston v4] toytoolkit: Don't draw shadows for maximized windows.

David Herrmann dh.herrmann at googlemail.com
Sat Sep 29 02:27:46 PDT 2012


Hi Scott

Only one nitpick below

On Fri, Sep 28, 2012 at 10:45 AM, Scott Moreau <oreaus at gmail.com> wrote:
> Add THEME_FRAME_MAXIMIZED flag so the theming system can know not to draw
> shadows for maximized windows. This allows maximized surfaces' content to be
> sized and placed in a more expectable fashion.
>
> ---
>  clients/window.c              | 75 +++++++++++++++++++++++++++++--------------
>  shared/cairo-util.c           | 51 +++++++++++++++++------------
>  shared/cairo-util.h           |  7 ++--
>  src/xwayland/window-manager.c |  4 +--
>  4 files changed, 88 insertions(+), 49 deletions(-)

[snip]

> diff --git a/shared/cairo-util.h b/shared/cairo-util.h
> index 2fec389..3a760a4 100644
> --- a/shared/cairo-util.h
> +++ b/shared/cairo-util.h
> @@ -58,7 +58,10 @@ theme_create(void);
>  void
>  theme_destroy(struct theme *t);
>
> -#define THEME_FRAME_ACTIVE 1
> +enum {
> +       THEME_FRAME_ACTIVE = 1,
> +       THEME_FRAME_MAXIMIZED,

Could you actually change this to:
  THEME_FRAME_MAXIMIZED = 2

If we add further flags, we need do explicitly define them to 4, 8,
16, ... so it would be really odd when only this flag is not
initialized explicitly.

But this is no reason to not push it. We can change it when adding
further flags.
Other than that it looks fine to me. I tested it and it works like a charm.

Regards
David


More information about the wayland-devel mailing list