aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);