aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-01-30 22:06:10 +0100
committeremersion <contact@emersion.fr>2018-01-30 22:06:10 +0100
commitedb4c8d8588eea184cb688f04affa14fd3f0615c (patch)
tree1d32e5f0c69cd76ca4ca96e698b459f17c19eee2
parenta295c805c45e940dab511f118a10101a3d3c1f18 (diff)
output: damage whole output when fullscreen surface size changes
-rw-r--r--include/wlr/types/wlr_output.h1
-rw-r--r--types/wlr_output.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 3eb1c6ff..f10d8286 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -82,6 +82,7 @@ struct wlr_output {
struct wlr_surface *fullscreen_surface;
struct wl_listener fullscreen_surface_commit;
struct wl_listener fullscreen_surface_destroy;
+ int fullscreen_width, fullscreen_height;
struct wl_list cursors; // wlr_output_cursor::link
struct wlr_output_cursor *hardware_cursor;
diff --git a/types/wlr_output.c b/types/wlr_output.c
index 497178c1..4aed1ba6 100644
--- a/types/wlr_output.c
+++ b/types/wlr_output.c
@@ -594,6 +594,14 @@ static void output_fullscreen_surface_handle_commit(
fullscreen_surface_commit);
struct wlr_surface *surface = output->fullscreen_surface;
+ if (output->fullscreen_width != surface->current->width ||
+ output->fullscreen_height != surface->current->height) {
+ output->fullscreen_width = surface->current->width;
+ output->fullscreen_height = surface->current->height;
+ output_damage_whole(output);
+ return;
+ }
+
struct wlr_box box;
output_fullscreen_surface_get_box(output, surface, &box);