Skip to content

Commit

Permalink
Add _NET_WM_NAME & _NET_WM_ICON_NAME support
Browse files Browse the repository at this point in the history
  • Loading branch information
alimirjamali committed Nov 12, 2024
1 parent 89d0254 commit 43326d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gui-daemon/xside.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,9 @@ static void intern_global_atoms(Ghandles *const g) {
{ &g->wm_user_time, "_NET_WM_USER_TIME" },
{ &g->wmDeleteMessage, "WM_DELETE_WINDOW" },
{ &g->net_supported, "_NET_SUPPORTED" },
{ &g->net_wm_name, "_NET_WM_NAME" },
{ &g->net_wm_icon_name, "_NET_WM_ICON_NAME" },
{ &g->utf8_string, "UTF8_STRING" },
};
Atom labels[QUBES_ARRAY_SIZE(atoms_to_intern)];
const char *names[QUBES_ARRAY_SIZE(atoms_to_intern)];
Expand Down Expand Up @@ -2925,7 +2928,11 @@ static void handle_wmname(Ghandles * g, struct windowdata *vm_window)
Xutf8TextListToTextProperty(g->display, list, 1, XUTF8StringStyle,
&text_prop);
XSetWMName(g->display, vm_window->local_winid, &text_prop);
XChangeProperty(g->display, vm_window->local_winid, g->net_wm_name,
g->utf8_string, 8, PropModeReplace, (unsigned char *) buf, strlen(buf));
XSetWMIconName(g->display, vm_window->local_winid, &text_prop);
XChangeProperty(g->display, vm_window->local_winid, g->net_wm_icon_name,
g->utf8_string, 8, PropModeReplace, (unsigned char *) buf, strlen(buf));
XFree(text_prop.value);
}

Expand Down
3 changes: 3 additions & 0 deletions gui-daemon/xside.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ struct _global_handles {
Atom wm_state_maximized_horz; /* Atom: _NET_WM_STATE_MAXIMIZED_HORZ */
Atom wm_user_time_window; /* Atom: _NET_WM_USER_TIME_WINDOW */
Atom wm_user_time; /* Atom: _NET_WM_USER_TIME */
Atom net_wm_name; /* Atom: _NET_WM_NAME */
Atom net_wm_icon_name; /* Atom: _NET_WM_ICON_NAME */
Atom utf8_string; /* Atom: UTF8_STRING */
int shm_major_opcode; /* MIT-SHM extension opcode */
/* shared memory handling */
struct shm_args_hdr *shm_args; /* shared memory with Xorg */
Expand Down

0 comments on commit 43326d1

Please sign in to comment.