X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=spectrwm.c;h=b527e918a8fbc316a16f7befb5d630811b9eebf7;hb=eaf3f323529b0d4ef7fb53026f63b0bc90ea6b6d;hp=02be1c50df35a78d36d85a13228a395e09a3fe48;hpb=0cf556e88932d5f98b79f9e4cce54a6ebb3f17a9;p=spectrwm.git diff --git a/spectrwm.c b/spectrwm.c index 02be1c5..b527e91 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -2918,9 +2918,7 @@ stack_master(struct workspace *ws, struct swm_geometry *g, int rot, int flip) if (w_inc > 1 && w_inc < v_slice) { /* adjust for window's requested size increment */ remain = (win_g.w - w_base) % w_inc; - missing = w_inc - remain; win_g.w -= remain; - extra += remain; } msize = win_g.w; @@ -3297,7 +3295,7 @@ pressbutton(struct swm_region *r, union arg *args) void raise_toggle(struct swm_region *r, union arg *args) { - if (r && r->ws == NULL) + if (r == NULL || r->ws == NULL) return; r->ws->always_raise = !r->ws->always_raise; @@ -3359,7 +3357,7 @@ uniconify(struct swm_region *r, union arg *args) DNPRINTF(SWM_D_MISC, "uniconify\n"); - if (r && r->ws == NULL) + if (r == NULL || r->ws == NULL) return; /* make sure we have anything to uniconify */ @@ -5757,7 +5755,7 @@ manage_window(Window id) Atom *prot = NULL, *pp; unsigned char ws_idx_str[SWM_PROPLEN], *prop = NULL; struct swm_region *r; - long mask; + long mask = 0; const char *errstr; XWindowChanges wc; struct pid_e *p; @@ -5944,7 +5942,7 @@ manage_window(Window id) if (border_me) { bzero(&wc, sizeof wc); wc.border_width = border_width; - mask = CWBorderWidth; + mask |= CWBorderWidth; XConfigureWindow(display, win->id, mask, &wc); }