KNF, no binary change.
From Pierre Riteau. Thanks!
This commit is contained in:
parent
6c44f202a4
commit
4539521994
@ -15,7 +15,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: client.c,v 1.20 2008/05/15 21:56:21 okan Exp $
|
||||
* $Id: client.c,v 1.21 2008/05/15 22:18:00 oga Exp $
|
||||
*/
|
||||
|
||||
#include "headers.h"
|
||||
@ -330,9 +330,9 @@ client_maximize(struct client_ctx *cc)
|
||||
cc->geom.x = Conf.gap_left;
|
||||
cc->geom.y = Conf.gap_top;
|
||||
cc->geom.height = rootwin_geom.height -
|
||||
(Conf.gap_top + Conf.gap_bottom);
|
||||
(Conf.gap_top + Conf.gap_bottom);
|
||||
cc->geom.width = rootwin_geom.width -
|
||||
(Conf.gap_left + Conf.gap_right);
|
||||
(Conf.gap_left + Conf.gap_right);
|
||||
cc->flags |= CLIENT_DOMAXIMIZE;
|
||||
}
|
||||
|
||||
@ -726,7 +726,7 @@ client_vertmaximize(struct client_ctx *cc)
|
||||
cc->savegeom = cc->geom;
|
||||
cc->geom.y = cc->bwidth + Conf.gap_top;
|
||||
cc->geom.height = display_height -
|
||||
(Conf.gap_top + Conf.gap_bottom);
|
||||
(Conf.gap_top + Conf.gap_bottom);
|
||||
cc->flags |= CLIENT_DOVMAXIMIZE;
|
||||
}
|
||||
|
||||
@ -768,7 +768,7 @@ client_gethints(struct client_ctx *cc)
|
||||
|
||||
mha = XInternAtom(X_Dpy, "_MOTIF_WM_HINTS", False);
|
||||
if (xu_getprop(cc, mha, mha, PROP_MWM_HINTS_ELEMENTS,
|
||||
(u_char **)&mwmh) == MWM_NUMHINTS)
|
||||
(u_char **)&mwmh) == MWM_NUMHINTS)
|
||||
if (mwmh->flags & MWM_HINTS_DECORATIONS &&
|
||||
!(mwmh->decorations & MWM_DECOR_ALL) &&
|
||||
!(mwmh->decorations & MWM_DECOR_BORDER))
|
||||
|
@ -15,7 +15,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: conf.c,v 1.28 2008/04/16 13:47:29 oga Exp $
|
||||
* $Id: conf.c,v 1.29 2008/05/15 22:18:00 oga Exp $
|
||||
*/
|
||||
|
||||
#include "headers.h"
|
||||
@ -396,8 +396,8 @@ void conf_unbind(struct conf *c, struct keybinding *unbind)
|
||||
continue;
|
||||
|
||||
if ((key->keycode != 0 && key->keysym == NoSymbol &&
|
||||
key->keycode == unbind->keycode) ||
|
||||
key->keysym == unbind->keysym)
|
||||
key->keycode == unbind->keycode) ||
|
||||
key->keysym == unbind->keysym)
|
||||
TAILQ_REMOVE(&c->keybindingq, key, entry);
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ font_init(struct screen_ctx *sc)
|
||||
errx(1, "XftDrawCreate");
|
||||
|
||||
if (!XAllocNamedColor(X_Dpy, DefaultColormap(X_Dpy, sc->which),
|
||||
"black", &xcolor, &tmp))
|
||||
"black", &xcolor, &tmp))
|
||||
errx(1, "XAllocNamedColor");
|
||||
|
||||
sc->xftcolor.color.red = xcolor.red;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: grab.c,v 1.9 2008/04/15 20:24:41 oga Exp $
|
||||
* $Id: grab.c,v 1.10 2008/05/15 22:18:00 oga Exp $
|
||||
*/
|
||||
|
||||
#include "headers.h"
|
||||
@ -292,8 +292,7 @@ grab_label(struct client_ctx *cc)
|
||||
XMapRaised(X_Dpy, sc->searchwin);
|
||||
|
||||
XGetInputFocus(X_Dpy, &focuswin, &focusrevert);
|
||||
XSetInputFocus(X_Dpy, sc->searchwin,
|
||||
RevertToPointerRoot, CurrentTime);
|
||||
XSetInputFocus(X_Dpy, sc->searchwin, RevertToPointerRoot, CurrentTime);
|
||||
|
||||
for (;;) {
|
||||
XMaskEvent(X_Dpy, LabelMask, &e);
|
||||
@ -301,7 +300,7 @@ grab_label(struct client_ctx *cc)
|
||||
switch (e.type) {
|
||||
case KeyPress:
|
||||
if (input_keycodetrans(e.xkey.keycode, e.xkey.state,
|
||||
&ctl, &chr, 0) < 0)
|
||||
&ctl, &chr, 0) < 0)
|
||||
continue;
|
||||
|
||||
switch (ctl) {
|
||||
@ -348,9 +347,8 @@ grab_label(struct client_ctx *cc)
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
XSetInputFocus(X_Dpy, focuswin,
|
||||
focusrevert, CurrentTime);
|
||||
out:
|
||||
XSetInputFocus(X_Dpy, focuswin, focusrevert, CurrentTime);
|
||||
XUnmapWindow(X_Dpy, sc->searchwin);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: group.c,v 1.11 2008/04/16 13:38:09 oga Exp $
|
||||
* $Id: group.c,v 1.12 2008/05/15 22:18:00 oga Exp $
|
||||
*/
|
||||
|
||||
#include "headers.h"
|
||||
@ -272,10 +272,10 @@ group_menu(XButtonEvent *e)
|
||||
XCALLOC(mi, struct menu);
|
||||
if (gc->hidden)
|
||||
snprintf(mi->text, sizeof(mi->text), "%d: [%s]",
|
||||
gc->shortcut, gc->name);
|
||||
gc->shortcut, gc->name);
|
||||
else
|
||||
snprintf(mi->text, sizeof(mi->text), "%d: %s",
|
||||
gc->shortcut, gc->name);
|
||||
gc->shortcut, gc->name);
|
||||
mi->ctx = gc;
|
||||
TAILQ_INSERT_TAIL(&menuq, mi, entry);
|
||||
}
|
||||
@ -295,7 +295,7 @@ group_menu(XButtonEvent *e)
|
||||
else
|
||||
_group_hide(gc);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
|
||||
TAILQ_REMOVE(&menuq, mi, entry);
|
||||
xfree(mi);
|
||||
|
@ -14,7 +14,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: search.c,v 1.8 2008/04/15 20:24:41 oga Exp $
|
||||
* $Id: search.c,v 1.9 2008/05/15 22:18:00 oga Exp $
|
||||
*/
|
||||
|
||||
#include "headers.h"
|
||||
@ -104,7 +104,7 @@ search_start(struct menu_q *menuq,
|
||||
switch (e.type) {
|
||||
case KeyPress:
|
||||
if (input_keycodetrans(e.xkey.keycode, e.xkey.state,
|
||||
&ctl, &chr, 1) < 0)
|
||||
&ctl, &chr, 1) < 0)
|
||||
continue;
|
||||
|
||||
switch (ctl) {
|
||||
@ -184,8 +184,8 @@ search_start(struct menu_q *menuq,
|
||||
if (TAILQ_EMPTY(&resultq) && list) {
|
||||
/* Copy them all over. */
|
||||
TAILQ_FOREACH(mi, menuq, entry)
|
||||
TAILQ_INSERT_TAIL(&resultq, mi,
|
||||
resultentry);
|
||||
TAILQ_INSERT_TAIL(&resultq, mi,
|
||||
resultentry);
|
||||
|
||||
listing = 1;
|
||||
} else if (mutated)
|
||||
@ -209,7 +209,7 @@ search_start(struct menu_q *menuq,
|
||||
}
|
||||
|
||||
dx = MAX(dx, font_width(font, text,
|
||||
MIN(strlen(text), MENU_MAXENTRY)));
|
||||
MIN(strlen(text), MENU_MAXENTRY)));
|
||||
dy += fontheight;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: util.c,v 1.8 2008/04/15 21:20:56 oga Exp $
|
||||
* $Id: util.c,v 1.9 2008/05/15 22:18:00 oga Exp $
|
||||
*/
|
||||
|
||||
#include "headers.h"
|
||||
@ -49,9 +49,9 @@ u_exec(char *argstr)
|
||||
char *tmp;
|
||||
|
||||
while (ap < end && (*ap = strsep(&argstr, " \t")) != NULL) {
|
||||
if(**ap == '\0')
|
||||
if (**ap == '\0')
|
||||
continue;
|
||||
ap++;
|
||||
ap++;
|
||||
if (argstr != NULL) {
|
||||
/* deal with quoted strings */
|
||||
switch(argstr[0]) {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: xevents.c,v 1.12 2008/04/16 13:35:37 oga Exp $
|
||||
* $Id: xevents.c,v 1.13 2008/05/15 22:18:00 oga Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -342,7 +342,7 @@ xev_handle_buttonpress(struct xevent *xev, XEvent *ee)
|
||||
client_lower(cc);
|
||||
break;
|
||||
}
|
||||
out:
|
||||
out:
|
||||
xev_register(xev);
|
||||
}
|
||||
|
||||
@ -422,7 +422,7 @@ xev_handle_keyrelease(struct xevent *xev, XEvent *ee)
|
||||
*/
|
||||
client_mtf(NULL);
|
||||
|
||||
out:
|
||||
out:
|
||||
xev_register(xev);
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $Id: xutil.c,v 1.5 2008/04/15 20:24:41 oga Exp $
|
||||
* $Id: xutil.c,v 1.6 2008/05/15 22:18:00 oga Exp $
|
||||
*/
|
||||
|
||||
#include "headers.h"
|
||||
@ -25,15 +25,15 @@ int
|
||||
xu_ptr_grab(Window win, int mask, Cursor curs)
|
||||
{
|
||||
return (XGrabPointer(X_Dpy, win, False, mask,
|
||||
GrabModeAsync, GrabModeAsync,
|
||||
None, curs, CurrentTime) == GrabSuccess ? 0 : -1);
|
||||
GrabModeAsync, GrabModeAsync,
|
||||
None, curs, CurrentTime) == GrabSuccess ? 0 : -1);
|
||||
}
|
||||
|
||||
int
|
||||
xu_ptr_regrab(int mask, Cursor curs)
|
||||
{
|
||||
return (XChangeActivePointerGrab(X_Dpy, mask,
|
||||
curs, CurrentTime) == GrabSuccess ? 0 : -1);
|
||||
curs, CurrentTime) == GrabSuccess ? 0 : -1);
|
||||
}
|
||||
|
||||
void
|
||||
@ -46,8 +46,8 @@ int
|
||||
xu_btn_grab(Window win, int mask, u_int btn)
|
||||
{
|
||||
return (XGrabButton(X_Dpy, btn, mask, win,
|
||||
False, ButtonMask, GrabModeAsync,
|
||||
GrabModeSync, None, None) == GrabSuccess ? 0 : -1);
|
||||
False, ButtonMask, GrabModeAsync,
|
||||
GrabModeSync, None, None) == GrabSuccess ? 0 : -1);
|
||||
}
|
||||
|
||||
void
|
||||
@ -110,7 +110,7 @@ xu_getprop(struct client_ctx *cc, Atom atm, Atom type, long len, u_char **p)
|
||||
int format;
|
||||
|
||||
if (XGetWindowProperty(X_Dpy, cc->win, atm, 0L, len, False, type,
|
||||
&realtype, &format, &n, &extra, p) != Success || *p == NULL)
|
||||
&realtype, &format, &n, &extra, p) != Success || *p == NULL)
|
||||
return (-1);
|
||||
|
||||
if (n == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user