Skip to content

Commit 43326d1

Browse files
committed
Add _NET_WM_NAME & _NET_WM_ICON_NAME support
resolves: QubesOS/qubes-issues#9571
1 parent 89d0254 commit 43326d1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

gui-daemon/xside.c

+7
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,9 @@ static void intern_global_atoms(Ghandles *const g) {
600600
{ &g->wm_user_time, "_NET_WM_USER_TIME" },
601601
{ &g->wmDeleteMessage, "WM_DELETE_WINDOW" },
602602
{ &g->net_supported, "_NET_SUPPORTED" },
603+
{ &g->net_wm_name, "_NET_WM_NAME" },
604+
{ &g->net_wm_icon_name, "_NET_WM_ICON_NAME" },
605+
{ &g->utf8_string, "UTF8_STRING" },
603606
};
604607
Atom labels[QUBES_ARRAY_SIZE(atoms_to_intern)];
605608
const char *names[QUBES_ARRAY_SIZE(atoms_to_intern)];
@@ -2925,7 +2928,11 @@ static void handle_wmname(Ghandles * g, struct windowdata *vm_window)
29252928
Xutf8TextListToTextProperty(g->display, list, 1, XUTF8StringStyle,
29262929
&text_prop);
29272930
XSetWMName(g->display, vm_window->local_winid, &text_prop);
2931+
XChangeProperty(g->display, vm_window->local_winid, g->net_wm_name,
2932+
g->utf8_string, 8, PropModeReplace, (unsigned char *) buf, strlen(buf));
29282933
XSetWMIconName(g->display, vm_window->local_winid, &text_prop);
2934+
XChangeProperty(g->display, vm_window->local_winid, g->net_wm_icon_name,
2935+
g->utf8_string, 8, PropModeReplace, (unsigned char *) buf, strlen(buf));
29292936
XFree(text_prop.value);
29302937
}
29312938

gui-daemon/xside.h

+3
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ struct _global_handles {
171171
Atom wm_state_maximized_horz; /* Atom: _NET_WM_STATE_MAXIMIZED_HORZ */
172172
Atom wm_user_time_window; /* Atom: _NET_WM_USER_TIME_WINDOW */
173173
Atom wm_user_time; /* Atom: _NET_WM_USER_TIME */
174+
Atom net_wm_name; /* Atom: _NET_WM_NAME */
175+
Atom net_wm_icon_name; /* Atom: _NET_WM_ICON_NAME */
176+
Atom utf8_string; /* Atom: UTF8_STRING */
174177
int shm_major_opcode; /* MIT-SHM extension opcode */
175178
/* shared memory handling */
176179
struct shm_args_hdr *shm_args; /* shared memory with Xorg */

0 commit comments

Comments
 (0)