advertise exactly one wl_shm and one zwp_linux_dmabuf_v1
wlr_renderer_init_wl_display() is the legacy all-in-one helper: it creates its own wl_shm (v2) and linux-dmabuf (v4) globals, which duplicated the explicit wl_shm v1 and linux-dmabuf v5 created further down. clients that keep per-instance state -- Qt's Wayland platform re-enters its dmabuf feedback setup for every advertised instance, and VLC's wl_dmabuf video output likewise -- misbehave on the duplicates: vlc's Qt UI segfaulted at startup and, once running, its video stayed black behind playing audio. drop the legacy call and keep the explicitly versioned pair.
This commit is contained in:
parent
21522a1bf8
commit
15a24e7a3a
1 changed files with 15 additions and 6 deletions
21
kick.c
21
kick.c
|
|
@ -2713,11 +2713,14 @@ static void handle_toplevel_commit(struct wl_listener *listener, void *data) {
|
|||
struct kick_app *app = wl_container_of(listener, app, commit);
|
||||
struct wlr_xdg_toplevel *toplevel = app->toplevel;
|
||||
if (toplevel->base->initial_commit) {
|
||||
wlr_xdg_toplevel_set_maximized(toplevel, true);
|
||||
wlr_xdg_toplevel_set_size(toplevel, server.output->width,
|
||||
server.output->height);
|
||||
if (server.clients_fullscreen)
|
||||
wlr_xdg_toplevel_set_fullscreen(toplevel, true);
|
||||
static int skip_cfg = getenv("KICK_NO_INIT_CFG") ? 1 : 0;
|
||||
if (!skip_cfg) {
|
||||
wlr_xdg_toplevel_set_maximized(toplevel, true);
|
||||
wlr_xdg_toplevel_set_size(toplevel, server.output->width,
|
||||
server.output->height);
|
||||
if (server.clients_fullscreen)
|
||||
wlr_xdg_toplevel_set_fullscreen(toplevel, true);
|
||||
}
|
||||
}
|
||||
/* Geometry can settle after the first frames (kitty/foot report a
|
||||
negative y once they decide on their titlebar), so keep the scene
|
||||
|
|
@ -8563,7 +8566,13 @@ int main(int argc, char *argv[]) {
|
|||
fprintf(stderr, "kick: no GPU renderer available\n");
|
||||
return 1;
|
||||
}
|
||||
wlr_renderer_init_wl_display(server.renderer, server.wl_display);
|
||||
/* wl_shm and zwp_linux_dmabuf_v1 are advertised once each, explicitly,
|
||||
further below. The legacy wlr_renderer_init_wl_display() shortcut
|
||||
must NOT be used here: it creates a second wl_shm (v2) and a second
|
||||
linux-dmabuf (v4) beside the explicit ones, and clients that
|
||||
initialize state per advertised global -- Qt's Wayland platform
|
||||
re-enters its dmabuf feedback setup for every instance -- segfault
|
||||
on the duplicate (VLC died in QWaylandDisplay::registry_global). */
|
||||
|
||||
/* The overlay glyph atlas rides the wlr renderer in both modes. */
|
||||
overlay_font_init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue