xwayland: handle unset _NET_WM_NAME

The spec says [1]:

> If set, the Window Manager should use this in preference to WM_NAME.

However we overwrite WM_NAME with NULL when _NET_WM_NAME is unset.
Fix this by storing both WM_NAME and _NET_WM_NAME, so that we
handle properly all combinations of events (e.g. a client setting
both and later clearing one).

[1]: https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html#id-1.6.2
This commit is contained in:
Simon Ser 2025-05-01 15:11:36 +02:00
parent 2420bfef0b
commit af34aaad53
2 changed files with 28 additions and 12 deletions

View file

@ -232,6 +232,8 @@ struct wlr_xwayland_surface {
void *data;
struct {
char *wm_name, *net_wm_name;
struct wl_listener surface_commit;
struct wl_listener surface_map;
struct wl_listener surface_unmap;