From edb4c8d8588eea184cb688f04affa14fd3f0615c Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 30 Jan 2018 22:06:10 +0100 Subject: [PATCH] output: damage whole output when fullscreen surface size changes --- include/wlr/types/wlr_output.h | 1 + types/wlr_output.c | 8 ++++++++ 2 files changed, 9 insertions(+) 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);