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.
Kristian Høgsberg 12 years ago
parent c6a7e4b277
commit 1671e1129d
  1. 12
      clients/window.c
  2. 6
      clients/window.h

@ -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)
{

@ -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);

Loading…
Cancel
Save