diff --git a/ROADMAP.md b/ROADMAP.md index 1dd7eda..a64d536 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -34,8 +34,12 @@ positions are tracked in `WWindow` (backend-neutral). The only concern is matching restored sessions to native XDG clients via `app_id` instead of `WM_CLASS`. +- [x] Save/restore state for Wayland native clients: `PropGetWMClass` already + returns the XDG `app_id` on Wayland. Session save no longer bails when + `GetCommandForWindow` returns NULL (external Wayland clients have no ICCCM + command). Restore matches by `app_id` via instance+class without requiring + a command. - [ ] Test: save session, restart compositor, verify window positions restored -- [ ] Add `app_id` to session file alongside `WM_CLASS` for native XDG clients - [ ] Verify dock state persistence (icon layout in `~/GNUstep/Defaults/`) ### 1.2 Multi-Monitor diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index d3f4038..379abeb 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -7067,14 +7067,14 @@ wl_prop_get_wm_class(WNativeWindow win, if (v && v->xw_surface) { *wm_class = strdup(v->xw_surface->class ? v->xw_surface->class : "x11-client"); *wm_instance = strdup(v->xw_surface->instance ? v->xw_surface->instance : "x11-client"); - return 0; + return 1; } const char *app_id = (v && v->xdg_surface && v->xdg_surface->toplevel && v->xdg_surface->toplevel->app_id) ? v->xdg_surface->toplevel->app_id : "wayland-client"; *wm_class = strdup(app_id); *wm_instance = strdup(app_id); - return 0; + return 1; } static Bool