aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wayland.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/wayland.c b/wayland.c
index 5f68ecf7..59b2a33e 100644
--- a/wayland.c
+++ b/wayland.c
@@ -1064,6 +1064,7 @@ xdg_surface_configure(void *data, struct xdg_surface *xdg_surface,
bool wasnt_configured = !win->is_configured;
bool was_resizing = win->is_resizing;
+ bool was_fullscreen = win->is_fullscreen;
bool csd_was_enabled = win->csd_mode == CSD_YES && !win->is_fullscreen;
int new_width = win->configure.width;
int new_height = win->configure.height;
@@ -1096,6 +1097,10 @@ xdg_surface_configure(void *data, struct xdg_surface *xdg_surface,
else if (csd_was_enabled && !enable_csd)
csd_destroy(win);
+ /* Update opaque region if fullscreen state changed */
+ if (was_fullscreen != win->is_fullscreen)
+ wayl_win_alpha_changed(win);
+
if (enable_csd && new_width > 0 && new_height > 0) {
if (wayl_win_csd_titlebar_visible(win))
new_height -= win->term->conf->csd.title_height;
@@ -2401,7 +2406,13 @@ wayl_win_alpha_changed(struct wl_window *win)
{
struct terminal *term = win->term;
- if (term->colors.alpha == 0xffff) {
+ /*
+ * When fullscreened, transparency is disabled (see render.c).
+ * Update the opaque region to match.
+ */
+ bool is_opaque = term->colors.alpha == 0xffff || win->is_fullscreen;
+
+ if (is_opaque) {
struct wl_region *region = wl_compositor_create_region(
term->wl->compositor);