diff options
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -172,7 +172,7 @@ void win_init(win_t *win) void win_open(win_t *win) { int c, i, j, n; - long parent; + Window parent; win_env_t *e; XClassHint classhint; unsigned long *icon_data; @@ -188,7 +188,7 @@ void win_open(win_t *win) XSetWindowAttributes attrs; e = &win->env; - parent = options->embed != 0 ? options->embed : RootWindow(e->dpy, e->scr); + parent = options->embed ? options->embed : RootWindow(e->dpy, e->scr); sizehints.flags = PWinGravity; sizehints.win_gravity = NorthWestGravity; @@ -199,16 +199,16 @@ void win_open(win_t *win) else gmask = XParseGeometry(options->geometry, &win->x, &win->y, &win->w, &win->h); - if ((gmask & WidthValue) != 0) + if (gmask & WidthValue) sizehints.flags |= USSize; else win->w = WIN_WIDTH; - if ((gmask & HeightValue) != 0) + if (gmask & HeightValue) sizehints.flags |= USSize; else win->h = WIN_HEIGHT; - if ((gmask & XValue) != 0) { - if ((gmask & XNegative) != 0) { + if (gmask & XValue) { + if (gmask & XNegative) { win->x += e->scrw - win->w; sizehints.win_gravity = NorthEastGravity; } @@ -216,8 +216,8 @@ void win_open(win_t *win) } else { win->x = 0; } - if ((gmask & YValue) != 0) { - if ((gmask & YNegative) != 0) { + if (gmask & YValue) { + if (gmask & YNegative) { win->y += e->scrh - win->h; sizehints.win_gravity = sizehints.win_gravity == NorthEastGravity ? SouthEastGravity : SouthWestGravity; @@ -322,7 +322,7 @@ void win_open(win_t *win) CLEANUP void win_close(win_t *win) { - int i; + unsigned int i; for (i = 0; i < ARRLEN(cursors); i++) XFreeCursor(win->env.dpy, cursors[i].icon); @@ -360,7 +360,7 @@ void win_toggle_fullscreen(win_t *win) cm->window = win->xwin; cm->message_type = atoms[ATOM__NET_WM_STATE]; cm->format = 32; - cm->data.l[0] = 2; // toggle + cm->data.l[0] = 2; /* toggle */ cm->data.l[1] = atoms[ATOM__NET_WM_STATE_FULLSCREEN]; XSendEvent(win->env.dpy, DefaultRootWindow(win->env.dpy), False, |