mirror of https://github.com/yshui/picom.git
win: address some clang-tidy issues, run clang-format
This commit is contained in:
parent
72ede90147
commit
c8627989ad
12
src/win.c
12
src/win.c
|
@ -369,7 +369,8 @@ bool win_bind_shadow(struct backend_base *b, struct managed_win *w, struct color
|
|||
w->shadow_image = b->ops->render_shadow(b, w->widthb, w->heightb, sctx, c);
|
||||
} else {
|
||||
if (!w->mask_image) {
|
||||
// It's possible we already allocated a mask because of background blur
|
||||
// It's possible we already allocated a mask because of background
|
||||
// blur
|
||||
win_bind_mask(b, w);
|
||||
}
|
||||
w->shadow_image = b->ops->shadow_from_mask(b, w->mask_image, sctx, c);
|
||||
|
@ -1502,12 +1503,11 @@ struct win *add_win_above(session_t *ps, xcb_window_t id, xcb_window_t below) {
|
|||
return NULL;
|
||||
}
|
||||
return add_win_top(ps, id);
|
||||
} else {
|
||||
// we found something from the hash table, so if the stack is
|
||||
// empty, we are in an inconsistent state.
|
||||
assert(!list_is_empty(&ps->window_stack));
|
||||
return add_win(ps, id, w->stack_neighbour.prev);
|
||||
}
|
||||
// we found something from the hash table, so if the stack is
|
||||
// empty, we are in an inconsistent state.
|
||||
assert(!list_is_empty(&ps->window_stack));
|
||||
return add_win(ps, id, w->stack_neighbour.prev);
|
||||
}
|
||||
|
||||
/// Query the Xorg for information about window `win`
|
||||
|
|
|
@ -26,11 +26,12 @@ typedef struct session session_t;
|
|||
typedef struct _glx_texture glx_texture_t;
|
||||
|
||||
#define win_stack_foreach_managed(w, win_stack) \
|
||||
list_foreach(struct managed_win, w, win_stack, base.stack_neighbour) if (w->base.managed)
|
||||
list_foreach(struct managed_win, w, win_stack, \
|
||||
base.stack_neighbour) if ((w)->base.managed)
|
||||
|
||||
#define win_stack_foreach_managed_safe(w, win_stack) \
|
||||
list_foreach_safe(struct managed_win, w, win_stack, \
|
||||
base.stack_neighbour) if (w->base.managed)
|
||||
base.stack_neighbour) if ((w)->base.managed)
|
||||
|
||||
#ifdef CONFIG_OPENGL
|
||||
// FIXME this type should be in opengl.h
|
||||
|
|
Loading…
Reference in New Issue