diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2011-12-11 15:54:30 +0200 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2011-12-11 16:02:24 +0200 |
| commit | d2cce3343cdb3a08c3bca78b57826b97ca7b69ed (patch) | |
| tree | 61be1a2d0447460a6c1a2f13b2f350fbd36770c7 /dminiwm.c | |
| parent | 2de3f0e4ebff18227ba10e9a6354bf489ab9e994 (diff) | |
use booleans on config - fix comments
Diffstat (limited to 'dminiwm.c')
| -rw-r--r-- | dminiwm.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -165,7 +165,7 @@ void add_window(Window w) { if(head == NULL) { c->win = w; head = c; - } else if(ATTACH_ASIDE == 0) { + } else if(ATTACH_ASIDE) { for(t=head; t->next; t=t->next); c->prev = t; c->win = w; @@ -181,7 +181,7 @@ void add_window(Window w) { current = c; save_desktop(current_desktop); - if(FOLLOW_MOUSE == 0) + if(FOLLOW_MOUSE) XSelectInput(dis, c->win, EnterWindowMask); } @@ -313,7 +313,7 @@ void client_to_desktop(const Arg arg) { tile(); update_current(); - if(FOLLOW_WINDOW == 0) + if(FOLLOW_WINDOW) change_desktop(arg); } @@ -341,7 +341,7 @@ void tile(void) { client *c; int n = 0; int x = 0; - int y = (TOP_PANEL) ? 0 : PANEL_HEIGHT; + int y = (TOP_PANEL) ? PANEL_HEIGHT : 0; if(head->next == NULL) { XMoveResizeWindow(dis, head->win, 0, y, sw + 2*BORDER_WIDTH, sh + 2*BORDER_WIDTH); @@ -461,11 +461,11 @@ void update_current(void) { XSetWindowBorder(dis, c->win, win_focus); XSetInputFocus(dis, c->win, RevertToParent, CurrentTime); XRaiseWindow(dis, c->win); - if(CLICK_TO_FOCUS == 0) + if(CLICK_TO_FOCUS) XUngrabButton(dis, AnyButton, AnyModifier, c->win); } else { XSetWindowBorder(dis, c->win, win_unfocus); - if(CLICK_TO_FOCUS == 0) + if(CLICK_TO_FOCUS) XGrabButton(dis, AnyButton, AnyModifier, c->win, True, ButtonPressMask|ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, None); } } @@ -608,7 +608,7 @@ void enternotify(XEvent *e) { client *c; XCrossingEvent *ev = &e->xcrossing; - if(FOLLOW_MOUSE == 0) { + if(FOLLOW_MOUSE) { if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root) return; for(c=head; c; c=c->next) @@ -624,7 +624,7 @@ void buttonpressed(XEvent *e) { client *c; XButtonPressedEvent *ev = &e->xbutton; - if(CLICK_TO_FOCUS == 0 && ev->window != current->win && ev->button == Button1) + if(CLICK_TO_FOCUS && ev->window != current->win && ev->button == Button1) for(c=head; c; c=c->next) if(ev->window == c->win) { current = c; |
