Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add _NET_WM_NAME & _NET_WM_ICON_NAME support #157

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions gui-daemon/xside.c
Original file line number Diff line number Diff line change
@@ -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)];
@@ -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);
}

3 changes: 3 additions & 0 deletions gui-daemon/xside.h
Original file line number Diff line number Diff line change
@@ -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 */