diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-07-19 14:39:56 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-07-19 14:43:18 +0000 |
| commit | a49281ced3fb27d6fa0f59f7964c5c0cc07b3829 (patch) | |
| tree | aef6d1572b5fa5b6da9eede4aa7ea15d636d6275 | |
| parent | render: disable transparency when we’re fullscreened (diff) | |
render: OSD: don’t mark surface as being opaque, when it’s not
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | render.c | 15 |
2 files changed, 10 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9958e293..7ef784f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,7 @@ compositors without `cursor-shape-v1 support` ([#1411][1411]). * Crash on exit, if the mouse is hovering over the foot window (does not happen on all compositors) +* Visual glitches when CSD titlebar is transparent. [1404]: https://codeberg.org/dnkl/foot/issues/1404 [1411]: https://codeberg.org/dnkl/foot/pulls/1411 @@ -1953,12 +1953,15 @@ render_osd(struct terminal *term, const struct wayl_sub_surface *sub_surf, wl_surface_attach(sub_surf->surface.surf, buf->wl_buf, 0, 0); wl_surface_damage_buffer(sub_surf->surface.surf, 0, 0, buf->width, buf->height); - struct wl_region *region = wl_compositor_create_region(term->wl->compositor); - if (region != NULL) { - wl_region_add(region, 0, 0, buf->width, buf->height); - wl_surface_set_opaque_region(sub_surf->surface.surf, region); - wl_region_destroy(region); - } + if (alpha == 0xffff) { + struct wl_region *region = wl_compositor_create_region(term->wl->compositor); + if (region != NULL) { + wl_region_add(region, 0, 0, buf->width, buf->height); + wl_surface_set_opaque_region(sub_surf->surface.surf, region); + wl_region_destroy(region); + } + } else + wl_surface_set_opaque_region(sub_surf->surface.surf, NULL); wl_surface_commit(sub_surf->surface.surf); quirk_weston_subsurface_desync_off(sub_surf->sub); |
