mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
cvsimport
This commit is contained in:
26
menu.c
26
menu.c
@ -126,7 +126,7 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, const char *prompt,
|
||||
if (xu_ptr_grab(sc->menuwin, MENUGRABMASK,
|
||||
Conf.cursor[CF_QUESTION]) < 0) {
|
||||
XUnmapWindow(X_Dpy, sc->menuwin);
|
||||
return (NULL);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
XGetInputFocus(X_Dpy, &focuswin, &focusrevert);
|
||||
@ -180,7 +180,7 @@ out:
|
||||
XUnmapWindow(X_Dpy, sc->menuwin);
|
||||
XUngrabKeyboard(X_Dpy, CurrentTime);
|
||||
|
||||
return (mi);
|
||||
return(mi);
|
||||
}
|
||||
|
||||
static struct menu *
|
||||
@ -210,7 +210,7 @@ menu_complete_path(struct menu_ctx *mc)
|
||||
else if (!mr->abort)
|
||||
strlcpy(mr->text, mc->searchstr, sizeof(mr->text));
|
||||
free(path);
|
||||
return (mr);
|
||||
return(mr);
|
||||
}
|
||||
|
||||
static struct menu *
|
||||
@ -225,7 +225,7 @@ menu_handle_key(XEvent *e, struct menu_ctx *mc, struct menu_q *menuq,
|
||||
wchar_t wc;
|
||||
|
||||
if (menu_keycode(&e->xkey, &ctl, chr) < 0)
|
||||
return (NULL);
|
||||
return(NULL);
|
||||
|
||||
switch (ctl) {
|
||||
case CTL_ERASEONE:
|
||||
@ -266,7 +266,7 @@ menu_handle_key(XEvent *e, struct menu_ctx *mc, struct menu_q *menuq,
|
||||
mi->dummy = 1;
|
||||
}
|
||||
mi->abort = 0;
|
||||
return (mi);
|
||||
return(mi);
|
||||
case CTL_WIPE:
|
||||
mc->searchstr[0] = '\0';
|
||||
mc->changed = 1;
|
||||
@ -281,7 +281,7 @@ menu_handle_key(XEvent *e, struct menu_ctx *mc, struct menu_q *menuq,
|
||||
if ((mc->flags & CWM_MENU_FILE) &&
|
||||
(strncmp(mc->searchstr, mi->text,
|
||||
strlen(mi->text))) == 0)
|
||||
return (menu_complete_path(mc));
|
||||
return(menu_complete_path(mc));
|
||||
|
||||
/*
|
||||
* Put common prefix of the results into searchstr
|
||||
@ -306,7 +306,7 @@ menu_handle_key(XEvent *e, struct menu_ctx *mc, struct menu_q *menuq,
|
||||
mi->text[0] = '\0';
|
||||
mi->dummy = 1;
|
||||
mi->abort = 1;
|
||||
return (mi);
|
||||
return(mi);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -329,7 +329,7 @@ menu_handle_key(XEvent *e, struct menu_ctx *mc, struct menu_q *menuq,
|
||||
mc->listing = 0;
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -497,7 +497,7 @@ menu_handle_release(XEvent *e, struct menu_ctx *mc, struct menu_q *resultq)
|
||||
mi->text[0] = '\0';
|
||||
mi->dummy = 1;
|
||||
}
|
||||
return (mi);
|
||||
return(mi);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -517,7 +517,7 @@ menu_calc_entry(struct menu_ctx *mc, int x, int y)
|
||||
if (mc->hasprompt && entry == 0)
|
||||
entry = -1;
|
||||
|
||||
return (entry);
|
||||
return(entry);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -597,12 +597,12 @@ menu_keycode(XKeyEvent *ev, enum ctltype *ctl, char *chr)
|
||||
}
|
||||
|
||||
if (*ctl != CTL_NONE)
|
||||
return (0);
|
||||
return(0);
|
||||
|
||||
if (XLookupString(ev, chr, 32, &ks, NULL) < 0)
|
||||
return (-1);
|
||||
return(-1);
|
||||
|
||||
return (0);
|
||||
return(0);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user