diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2017-08-19 14:37:50 +0200 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2017-08-19 14:37:57 +0200 |
commit | 84c0c87a5ddca24cb039f33eea38252681bb4636 (patch) | |
tree | 94fb650815691f98ab633c7731496f14ac751dc2 | |
parent | 062d923b0a872a0417542ab069cb71da787bc2d0 (diff) |
wlr_surface: change update_size/damage to bool
-rw-r--r-- | types/wlr_surface.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c index d8baab20..2f68b134 100644 --- a/types/wlr_surface.c +++ b/types/wlr_surface.c @@ -204,20 +204,20 @@ static void wlr_surface_to_buffer_region(struct wlr_surface *surface, static void surface_commit(struct wl_client *client, struct wl_resource *resource) { struct wlr_surface *surface = wl_resource_get_user_data(resource); - int update_size = 0; - int update_damage = 0; + bool update_size = false; + bool update_damage = false; if ((surface->pending.invalid & WLR_SURFACE_INVALID_SCALE)) { surface->current.scale = surface->pending.scale; - update_size = 1; + update_size = true; } if ((surface->pending.invalid & WLR_SURFACE_INVALID_TRANSFORM)) { surface->current.transform = surface->pending.transform; - update_size = 1; + update_size = true; } if ((surface->pending.invalid & WLR_SURFACE_INVALID_BUFFER)) { surface->current.buffer = surface->pending.buffer; - update_size = 1; + update_size = true; } if (update_size) { int32_t oldw = surface->current.buffer_width; @@ -236,7 +236,7 @@ static void surface_commit(struct wl_client *client, surface->current.height); pixman_region32_clear(&surface->pending.surface_damage); - update_damage = 1; + update_damage = true; } if ((surface->pending.invalid & WLR_SURFACE_INVALID_BUFFER_DAMAGE)) { pixman_region32_union(&surface->current.buffer_damage, @@ -244,7 +244,7 @@ static void surface_commit(struct wl_client *client, &surface->pending.buffer_damage); pixman_region32_clear(&surface->pending.buffer_damage); - update_damage = 1; + update_damage = true; } if (update_damage) { pixman_region32_t buffer_damage; |