X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=spectrwm.c;h=932f11ff7550d15e180d74ad466fa5b3b43491ad;hb=5f8042da0ee96bb4475049d901659e4ca26c625c;hp=267d0148c463b4afbc99bd1b60e5072e5b9f5423;hpb=42610fddc37e9af64d0ebf3a274b16c96200b46c;p=spectrwm.git diff --git a/spectrwm.c b/spectrwm.c index 267d014..932f11f 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -851,7 +851,6 @@ get_swm_iconic(struct ws_win *win) int32_t v = 0; xcb_get_property_reply_t *pr = NULL; - pr = xcb_get_property_reply(conn, xcb_get_property(conn, 0, win->id, a_swm_iconic, XCB_ATOM_INTEGER, 0, 1), NULL); @@ -3029,7 +3028,6 @@ swapwin(struct swm_region *r, union arg *args) struct ws_win *cur_focus; struct ws_win_list *wl; - DNPRINTF(SWM_D_WS, "swapwin: id: %d, screen[%d]:%dx%d+%d+%d, ws: %d\n", args->id, r->s->idx, WIDTH(r), HEIGHT(r), X(r), Y(r), r->ws->idx); @@ -3523,7 +3521,7 @@ stack_master(struct workspace *ws, struct swm_geometry *g, int rot, int flip) int w_inc = 1, h_inc, w_base = 1, h_base; int hrh, extra = 0, h_slice, last_h = 0; int split, colno, winno, mwin, msize, mscale; - int remain, missing, v_slice, reconfigure; + int remain, missing, v_slice, reconfigure = 0; int bordered = 1; DNPRINTF(SWM_D_STACK, "stack_master: workspace: %d, rot: %s, " @@ -4434,7 +4432,6 @@ wkill(struct swm_region *r, union arg *args) xcb_flush(conn); } - int floating_toggle_win(struct ws_win *win) { @@ -4898,7 +4895,6 @@ move_step(struct swm_region *r, union arg *args) move(win, args); } - /* user/key callable function IDs */ enum keyfuncid { KF_BAR_TOGGLE, @@ -6507,7 +6503,6 @@ struct config_option configopt[] = { { "layout", setlayout, 0 }, }; - int conf_load(char *filename, int keymapping) { @@ -6515,7 +6510,7 @@ conf_load(char *filename, int keymapping) char *line, *cp, *optsub, *optval; size_t linelen, lineno = 0; int wordlen, i, optidx; - struct config_option *opt; + struct config_option *opt = NULL; DNPRINTF(SWM_D_CONF, "conf_load: begin\n"); @@ -6564,7 +6559,7 @@ conf_load(char *filename, int keymapping) filename, lineno, wordlen, cp); goto out; } - if (keymapping && strcmp(opt->optname, "bind")) { + if (keymapping && opt && strcmp(opt->optname, "bind")) { warnx("%s: line %zd: invalid option %.*s", filename, lineno, wordlen, cp); goto out; @@ -6916,7 +6911,6 @@ manage_window(xcb_window_t id, uint16_t mapped) update_window(win); } - /* Select which X events to monitor and set border pixel color. */ wa[0] = win->s->c[SWM_S_COLOR_UNFOCUS].pixel; wa[1] = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_PROPERTY_CHANGE | @@ -7570,12 +7564,14 @@ propertynotify(xcb_property_notify_event_t *e) focus_flush(); return; } else if (e->state == XCB_PROPERTY_NEW_VALUE) { + win->ws->focus_pending = get_focus_prev(win); unfocus_win(win); unmap_window(win); if (win->ws->r) { - focus_win(get_focus_prev(win)); stack(); + focus_win(win->ws->focus_pending); + win->ws->focus_pending = NULL; focus_flush(); } }