Skip to content

Commit 2af808a

Browse files
committed
Merge remote-tracking branch 'origin/pr/157'
* origin/pr/157: Add `_NET_WM_NAME` & `_NET_WM_ICON_NAME` support Pull request description: resolves: QubesOS/qubes-issues#9571
2 parents 2bde5bf + 43326d1 commit 2af808a

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
@@ -616,6 +616,9 @@ static void intern_global_atoms(Ghandles *const g) {
616616
{ &g->net_supported, "_NET_SUPPORTED" },
617617
{ &g->wm_pid, "_NET_WM_PID" },
618618
{ &g->wm_ping, "_NET_WM_PING" },
619+
{ &g->net_wm_name, "_NET_WM_NAME" },
620+
{ &g->net_wm_icon_name, "_NET_WM_ICON_NAME" },
621+
{ &g->utf8_string, "UTF8_STRING" },
619622
};
620623
Atom labels[QUBES_ARRAY_SIZE(atoms_to_intern)];
621624
const char *names[QUBES_ARRAY_SIZE(atoms_to_intern)];
@@ -3066,7 +3069,11 @@ static void handle_wmname(Ghandles * g, struct windowdata *vm_window)
30663069
Xutf8TextListToTextProperty(g->display, list, 1, XUTF8StringStyle,
30673070
&text_prop);
30683071
XSetWMName(g->display, vm_window->local_winid, &text_prop);
3072+
XChangeProperty(g->display, vm_window->local_winid, g->net_wm_name,
3073+
g->utf8_string, 8, PropModeReplace, (unsigned char *) buf, strlen(buf));
30693074
XSetWMIconName(g->display, vm_window->local_winid, &text_prop);
3075+
XChangeProperty(g->display, vm_window->local_winid, g->net_wm_icon_name,
3076+
g->utf8_string, 8, PropModeReplace, (unsigned char *) buf, strlen(buf));
30703077
XFree(text_prop.value);
30713078
}
30723079

gui-daemon/xside.h

+3
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ struct _global_handles {
189189
Atom wm_user_time; /* Atom: _NET_WM_USER_TIME */
190190
Atom wm_pid; /* Atom: _NET_WM_PID */
191191
Atom wm_ping; /* Atom: _NET_WM_PING */
192+
Atom net_wm_name; /* Atom: _NET_WM_NAME */
193+
Atom net_wm_icon_name; /* Atom: _NET_WM_ICON_NAME */
194+
Atom utf8_string; /* Atom: UTF8_STRING */
192195
int shm_major_opcode; /* MIT-SHM extension opcode */
193196
/* shared memory handling */
194197
struct shm_args_hdr *shm_args; /* shared memory with Xorg */

0 commit comments

Comments
 (0)