diff options
Diffstat (limited to 'src/platform/wayland/buffer.c')
| -rw-r--r-- | src/platform/wayland/buffer.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/platform/wayland/buffer.c b/src/platform/wayland/buffer.c index bbc055d..029b684 100644 --- a/src/platform/wayland/buffer.c +++ b/src/platform/wayland/buffer.c @@ -211,6 +211,7 @@ static const struct wp_fractional_scale_v1_listener frac_scale_listener = { void surface_follow_outputs(struct wayland_surface *w) { + if (!w->surface) return; /* Not rebuilt yet after a reconnect. */ uint32_t refresh = 0; int32_t max_scale = 0; bool need_scale = !w->frac_scale && @@ -563,11 +564,12 @@ int surface_init_scaling(struct wayland_surface *w) void wayland_surface_set_title(struct wayland_surface *w, const char *title) { - if (!w || !w->toplevel || !title) return; + if (!w || !title) return; char *copy = yasl_private_utf8_sanitize_dup(title); if (!copy) return; - xdg_toplevel_set_title(w->toplevel, copy); - free(copy); + free(w->title); + w->title = copy; + if (w->toplevel) xdg_toplevel_set_title(w->toplevel, copy); } struct yasl_private_timing wayland_surface_timing(const struct wayland_surface *w) |
