fix clang warnings

This commit is contained in:
seanpringle
2012-09-25 10:58:13 +10:00
parent f545c2c023
commit 94ab5472b9
2 changed files with 6 additions and 5 deletions

View File

@@ -105,7 +105,7 @@ void action_focus_monitor(void *data, int num, client *cli)
void action_fullscreen(void *data, int num, client *cli) void action_fullscreen(void *data, int num, client *cli)
{ {
if (!cli) return; if (!cli) return;
if (cli->full) GETPROP_LONG(cli->window, atoms[XOAT_SPOT], &cli->spot, 1); if (cli->full && GETPROP_LONG(cli->window, atoms[XOAT_SPOT], &cli->spot, 1));
else SETPROP_LONG(cli->window, atoms[XOAT_SPOT], &cli->spot, 1); else SETPROP_LONG(cli->window, atoms[XOAT_SPOT], &cli->spot, 1);
client_toggle_state(cli, atoms[_NET_WM_STATE_FULLSCREEN]); client_toggle_state(cli, atoms[_NET_WM_STATE_FULLSCREEN]);
client_place_spot(cli, cli->full ? SPOT1: cli->spot, cli->monitor, 1); client_place_spot(cli, cli->full ? SPOT1: cli->spot, cli->monitor, 1);

View File

@@ -63,8 +63,8 @@ client* window_build_client(Window win)
{ {
c->visible = c->attr.map_state == IsViewable ? 1:0; c->visible = c->attr.map_state == IsViewable ? 1:0;
XGetTransientForHint(display, c->window, &c->transient); XGetTransientForHint(display, c->window, &c->transient);
GETPROP_ATOM(win, atoms[_NET_WM_WINDOW_TYPE], &c->type, 1); if (!GETPROP_ATOM(win, atoms[_NET_WM_WINDOW_TYPE], &c->type, 1)) c->type = 0;
GETPROP_WIND(win, atoms[WM_CLIENT_LEADER], &c->leader, 1); if (!GETPROP_WIND(win, atoms[WM_CLIENT_LEADER], &c->leader, 1)) c->leader = None;
c->manage = !c->attr.override_redirect c->manage = !c->attr.override_redirect
&& c->type != atoms[_NET_WM_WINDOW_TYPE_DESKTOP] && c->type != atoms[_NET_WM_WINDOW_TYPE_DESKTOP]
@@ -91,7 +91,8 @@ client* window_build_client(Window win)
if (c->visible) if (c->visible)
{ {
GETPROP_ATOM(c->window, atoms[_NET_WM_STATE], c->states, ATOMLIST); if (!GETPROP_ATOM(c->window, atoms[_NET_WM_STATE], c->states, ATOMLIST))
memset(c->states, 0, sizeof(Atom) * ATOMLIST);
c->urgent = client_has_state(c, atoms[_NET_WM_STATE_DEMANDS_ATTENTION]); c->urgent = client_has_state(c, atoms[_NET_WM_STATE_DEMANDS_ATTENTION]);
c->full = client_has_state(c, atoms[_NET_WM_STATE_FULLSCREEN]); c->full = client_has_state(c, atoms[_NET_WM_STATE_FULLSCREEN]);
c->above = client_has_state(c, atoms[_NET_WM_STATE_ABOVE]); c->above = client_has_state(c, atoms[_NET_WM_STATE_ABOVE]);