X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=spectrwm.c;h=829bba0a53c88c8901eb97c9f41ffbcef6e5ff7c;hb=9daf16e4b60699b18c80c9cdb4494af10140f840;hp=2324a486159cf05eba8799fd2589b54bcea61f37;hpb=9a58fa26bae6925b4db8055a9e130139b8ce579d;p=spectrwm.git diff --git a/spectrwm.c b/spectrwm.c index 2324a48..829bba0 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -2997,6 +2997,7 @@ cycle_layout(struct swm_region *r, union arg *args) ws->cur_layout = &layouts[0]; stack(); + bar_update(); if (focus_mode == SWM_FOCUS_DEFAULT) event_drain(XCB_ENTER_NOTIFY); @@ -7471,6 +7472,19 @@ setup_globals(void) if ((clock_format = strdup("%a %b %d %R %Z %Y")) == NULL) err(1, "setup_globals: strdup: failed to allocate memory."); + + if ((syms = xcb_key_symbols_alloc(conn)) == NULL) + errx(1, "unable to allocate key symbols"); + + astate = get_atom_from_string("WM_STATE"); + aprot = get_atom_from_string("WM_PROTOCOLS"); + adelete = get_atom_from_string("WM_DELETE_WINDOW"); + takefocus = get_atom_from_string("WM_TAKE_FOCUS"); + a_wmname = get_atom_from_string("WM_NAME"); + a_netwmname = get_atom_from_string("_NET_WM_NAME"); + a_utf8_string = get_atom_from_string("UTF8_STRING"); + a_string = get_atom_from_string("STRING"); + a_swm_iconic = get_atom_from_string("_SWM_ICONIC"); } void @@ -7614,19 +7628,6 @@ main(int argc, char *argv[]) errx(1, "can not get XCB connection"); xfd = xcb_get_file_descriptor(conn); - syms = xcb_key_symbols_alloc(conn); - if (!syms) - errx(1, "unable to allocate key symbols"); - - astate = get_atom_from_string("WM_STATE"); - aprot = get_atom_from_string("WM_PROTOCOLS"); - adelete = get_atom_from_string("WM_DELETE_WINDOW"); - takefocus = get_atom_from_string("WM_TAKE_FOCUS"); - a_wmname = get_atom_from_string("WM_NAME"); - a_netwmname = get_atom_from_string("_NET_WM_NAME"); - a_utf8_string = get_atom_from_string("UTF8_STRING"); - a_string = get_atom_from_string("STRING"); - a_swm_iconic = get_atom_from_string("_SWM_ICONIC"); /* look for local and global conf file */ pwd = getpwuid(getuid());