struct ws_win *
find_window(xcb_window_t id)
{
- struct ws_win *win;
+ struct ws_win *win = NULL;
int i, j, num_screens;
xcb_query_tree_reply_t *qtr;
if (id == win->id || id == win->frame)
return (win);
- /* win NULL */
/* If window isn't top-level, try to find managed ancestor. */
qtr = xcb_query_tree_reply(conn, xcb_query_tree(conn, id), NULL);
DNPRINTF(SWM_D_STACK, "stack_master: workspace: %d, rot: %s, "
"flip: %s\n", ws->idx, YESNO(rot), YESNO(flip));
+ memset(&cell, 0, sizeof(cell));
+
/* Prepare tiling variables, if needed. */
if ((winno = count_win(ws, false)) > 0) {
/* Find first tiled window. */
SIMPLEQ_HEAD(event_queue, event) events = SIMPLEQ_HEAD_INITIALIZER(events);
xcb_generic_event_t *
-get_next_event(bool wait)
+get_next_event(bool dowait)
{
struct event *ep;
xcb_generic_event_t *evt;
evt = ep->ev;
SIMPLEQ_REMOVE_HEAD(&events, entry);
free(ep);
- } else if (wait)
+ } else if (dowait)
evt = xcb_wait_for_event(conn);
else
evt = xcb_poll_for_event(conn);
struct ws_win *
manage_window(xcb_window_t id, int spawn_pos, bool mapping)
{
- struct ws_win *win, *ww;
+ struct ws_win *win = NULL, *ww;
struct swm_region *r;
struct pid_e *p;
struct quirk *qp;