[client] wayland: set the application icon
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / idd (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run

This commit is contained in:
Geoffrey McRae
2026-07-17 03:12:06 +10:00
parent aa25b0cfe3
commit f77986b863
12 changed files with 191 additions and 3 deletions

View File

@@ -142,6 +142,11 @@ static bool libdecor_shellInit(
libdecor_frame_set_title(state.libdecorFrame, title);
libdecor_frame_map(state.libdecorFrame);
// Get the xdg_toplevel for icon setting
struct xdg_surface * xdgSurface = libdecor_frame_get_xdg_surface(state.libdecorFrame);
if (xdgSurface)
wlWm.xdgToplevel = xdg_surface_get_toplevel(xdgSurface);
if (fullscreen)
libdecor_frame_set_fullscreen(state.libdecorFrame, NULL);

View File

@@ -149,6 +149,7 @@ bool xdg_shellInit(struct wl_display * display, struct wl_surface * surface,
xdg_toplevel_add_listener(state.toplevel, &xdgToplevelListener, NULL);
xdg_toplevel_set_title(state.toplevel, title);
xdg_toplevel_set_app_id(state.toplevel, appId);
wlWm.xdgToplevel = state.toplevel;
if (fullscreen)
xdg_toplevel_set_fullscreen(state.toplevel, NULL);