Skip to content

Commit

Permalink
Keep the real wm name on the supporting window
Browse files Browse the repository at this point in the history
  • Loading branch information
baskerville committed Aug 30, 2013
1 parent f98770b commit d454596
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bspwm.c
Expand Up @@ -214,7 +214,7 @@ void setup(void)
ewmh->_NET_WM_WINDOW_TYPE_TOOLBAR};

xcb_ewmh_set_supported(ewmh, default_screen, LENGTH(net_atoms), net_atoms);
ewmh_set_supporting();
ewmh_set_supporting(motion_recorder);

xcb_intern_atom_reply_t *iar = xcb_intern_atom_reply(dpy, xcb_intern_atom(dpy, 0, strlen("_COMPTON_SHADOW"), "_COMPTON_SHADOW"), NULL);

Expand Down
14 changes: 6 additions & 8 deletions ewmh.c
Expand Up @@ -17,10 +17,8 @@ void ewmh_init(void)

void ewmh_update_wm_name(void)
{
if (wm_name != NULL) {
if (wm_name != NULL)
xcb_ewmh_set_wm_name(ewmh, root, strlen(wm_name), wm_name);
xcb_ewmh_set_wm_name(ewmh, motion_recorder, strlen(wm_name), wm_name);
}
}

void ewmh_update_active_window(void)
Expand Down Expand Up @@ -115,11 +113,11 @@ void ewmh_update_client_list(void)
xcb_ewmh_set_client_list_stacking(ewmh, default_screen, num_clients, wins);
}

void ewmh_set_supporting(void)
void ewmh_set_supporting(xcb_window_t win)
{
pid_t wm_pid = getpid();
xcb_ewmh_set_supporting_wm_check(ewmh, root, motion_recorder);
xcb_ewmh_set_supporting_wm_check(ewmh, motion_recorder, motion_recorder);
xcb_ewmh_set_wm_name(ewmh, motion_recorder, strlen(WM_NAME), WM_NAME);
xcb_ewmh_set_wm_pid(ewmh, motion_recorder, wm_pid);
xcb_ewmh_set_supporting_wm_check(ewmh, root, win);
xcb_ewmh_set_supporting_wm_check(ewmh, win, win);
xcb_ewmh_set_wm_name(ewmh, win, strlen(WM_NAME), WM_NAME);
xcb_ewmh_set_wm_pid(ewmh, win, wm_pid);
}
2 changes: 1 addition & 1 deletion ewmh.h
Expand Up @@ -15,6 +15,6 @@ void ewmh_update_current_desktop(void);
void ewmh_set_wm_desktop(node_t *, desktop_t *);
void ewmh_update_desktop_names(void);
void ewmh_update_client_list(void);
void ewmh_set_supporting(void);
void ewmh_set_supporting(xcb_window_t);

#endif

0 comments on commit d454596

Please sign in to comment.