wl_backend: fix prop_get_wm_class return value (0=fail, 1=success) — broke session save
This commit is contained in:
parent
0abaf1fefa
commit
0a03ff03d7
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue