mirror of
https://github.com/yshui/picom.git
synced 2024-11-03 04:33:49 -05:00
win: address some clang-tidy issues, run clang-format
This commit is contained in:
parent
72ede90147
commit
c8627989ad
2 changed files with 9 additions and 8 deletions
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);
|
w->shadow_image = b->ops->render_shadow(b, w->widthb, w->heightb, sctx, c);
|
||||||
} else {
|
} else {
|
||||||
if (!w->mask_image) {
|
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);
|
win_bind_mask(b, w);
|
||||||
}
|
}
|
||||||
w->shadow_image = b->ops->shadow_from_mask(b, w->mask_image, sctx, c);
|
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 NULL;
|
||||||
}
|
}
|
||||||
return add_win_top(ps, id);
|
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`
|
/// Query the Xorg for information about window `win`
|
||||||
|
|
|
@ -26,11 +26,12 @@ typedef struct session session_t;
|
||||||
typedef struct _glx_texture glx_texture_t;
|
typedef struct _glx_texture glx_texture_t;
|
||||||
|
|
||||||
#define win_stack_foreach_managed(w, win_stack) \
|
#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) \
|
#define win_stack_foreach_managed_safe(w, win_stack) \
|
||||||
list_foreach_safe(struct managed_win, 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
|
#ifdef CONFIG_OPENGL
|
||||||
// FIXME this type should be in opengl.h
|
// FIXME this type should be in opengl.h
|
||||||
|
|
Loading…
Reference in a new issue