Initialize output (fixes compiler warning)

This commit is contained in:
Michael Stapelberg 2011-08-24 01:34:56 +02:00
parent 1f028a72b8
commit 27ade541a9
1 changed files with 5 additions and 1 deletions

View File

@ -471,13 +471,17 @@ static void handle_client_message(xcb_client_message_event_t* event) {
} }
DLOG("X window %08x requested docking\n", client); DLOG("X window %08x requested docking\n", client);
i3_output *walk, *output; i3_output *walk, *output = NULL;
SLIST_FOREACH(walk, outputs, slist) { SLIST_FOREACH(walk, outputs, slist) {
if (!walk->active) if (!walk->active)
continue; continue;
DLOG("using output %s\n", walk->name); DLOG("using output %s\n", walk->name);
output = walk; output = walk;
} }
if (output == NULL) {
ELOG("No output found\n");
return;
}
xcb_reparent_window(xcb_connection, xcb_reparent_window(xcb_connection,
client, client,
output->bar, output->bar,