X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=spectrwm.c;h=ab82ff1bb75ebb8bc20827827d3fdba9062cadb7;hb=f6733e1aa641ae84bb9b76267a7adde30a7f71bc;hp=07c3d74057413ea64ffffded0df6d4661fa1054f;hpb=cee196007501b8ef81b6713d284eef09fa929b6e;p=spectrwm.git diff --git a/spectrwm.c b/spectrwm.c index 07c3d74..ab82ff1 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -356,12 +356,6 @@ XFontSetExtents *bar_fs_extents; char *bar_fonts; struct passwd *pwd; -#define SWM_MENU_FN (2) -#define SWM_MENU_NB (4) -#define SWM_MENU_NF (6) -#define SWM_MENU_SB (8) -#define SWM_MENU_SF (10) - /* layout manager data */ struct swm_geometry { int x; @@ -1278,12 +1272,12 @@ plain_stacker(struct workspace *ws) void custom_region(char *val) { - unsigned int sidx, x, y, w, h; - int num_screens; + unsigned int x, y, w, h; + int sidx, num_screens; xcb_screen_t *screen; num_screens = xcb_setup_roots_length(xcb_get_setup(conn)); - if (sscanf(val, "screen[%u]:%ux%u+%u+%u", &sidx, &w, &h, &x, &y) != 5) + if (sscanf(val, "screen[%d]:%ux%u+%u+%u", &sidx, &w, &h, &x, &y) != 5) errx(1, "invalid custom region, " "should be 'screen[]:x++"); if (sidx < 1 || sidx > num_screens) @@ -5481,8 +5475,8 @@ updatenumlockmask(void) void grabkeys(void) { - int num_screens; - unsigned int j, k; + int num_screens, k; + unsigned int j; xcb_keycode_t *code; unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask | LockMask }; @@ -6338,7 +6332,7 @@ manage_window(xcb_window_t id) xcb_window_t trans = XCB_WINDOW_NONE; struct workspace *ws; struct ws_win *win, *ww; - int i, ws_idx, border_me = 0; + int ws_idx, border_me = 0; xcb_atom_t ws_idx_atom = XCB_ATOM_NONE; char ws_idx_str[SWM_PROPLEN], *prop = NULL; size_t proplen; @@ -6346,7 +6340,7 @@ manage_window(xcb_window_t id) const char *errstr; struct pid_e *p; struct quirk *qp; - uint32_t event_mask; + uint32_t event_mask, i; xcb_atom_t prot; xcb_get_property_reply_t *gpr; xcb_icccm_get_wm_protocols_reply_t wpr; @@ -6743,7 +6737,8 @@ void buttonpress(xcb_button_press_event_t *e) { struct ws_win *win; - int i, action; + int i; + unsigned int action; DNPRINTF(SWM_D_EVENT, "buttonpress: window 0x%x, detail: %u\n", e->event, e->detail);