From 1671e1129d7ed0d4326653e259844ba185709282 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 10 Oct 2012 11:36:24 -0400 Subject: [PATCH] window: Add getters for fullscreen and maximized state This lets us eliminate a bit of redundancy in the clienst where they track fullscreen state themselves. --- clients/window.c | 12 ++++++++++++ clients/window.h | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/clients/window.c b/clients/window.c index 4df771d..1529dac 100644 --- a/clients/window.c +++ b/clients/window.c @@ -2979,6 +2979,12 @@ window_schedule_redraw(struct window *window) } } +int +window_is_fullscreen(struct window *window) +{ + return window->type == TYPE_FULLSCREEN; +} + void window_set_fullscreen(struct window *window, int fullscreen) { @@ -3003,6 +3009,12 @@ window_set_fullscreen(struct window *window, int fullscreen) } } +int +window_is_maximized(struct window *window) +{ + return window->type == TYPE_MAXIMIZED; +} + void window_set_maximized(struct window *window, int maximized) { diff --git a/clients/window.h b/clients/window.h index 41f63da..0c09c68 100644 --- a/clients/window.h +++ b/clients/window.h @@ -281,9 +281,15 @@ display_surface_damage(struct display *display, cairo_surface_t *cairo_surface, void window_set_buffer_type(struct window *window, enum window_buffer_type type); +int +window_is_fullscreen(struct window *window); + void window_set_fullscreen(struct window *window, int fullscreen); +int +window_is_maximized(struct window *window); + void window_set_maximized(struct window *window, int maximized); -- 2.7.4