Remove some unused parameters
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
f519ee53c1
commit
551d487836
|
@ -1134,7 +1134,7 @@ paint_preprocess(session_t *ps, win *list) {
|
||||||
if (w->frame_opacity == 1)
|
if (w->frame_opacity == 1)
|
||||||
*tmp = win_get_bounding_shape_global_by_val(w);
|
*tmp = win_get_bounding_shape_global_by_val(w);
|
||||||
else {
|
else {
|
||||||
win_get_region_noframe_local(ps, w, tmp);
|
win_get_region_noframe_local(w, tmp);
|
||||||
pixman_region32_intersect(tmp, tmp, &w->bounding_shape);
|
pixman_region32_intersect(tmp, tmp, &w->bounding_shape);
|
||||||
pixman_region32_translate(tmp, w->g.x, w->g.y);
|
pixman_region32_translate(tmp, w->g.x, w->g.y);
|
||||||
}
|
}
|
||||||
|
@ -1378,7 +1378,7 @@ win_blur_background(session_t *ps, win *w, xcb_render_picture_t tgt_buffer,
|
||||||
if (win_is_solid(ps, w)) {
|
if (win_is_solid(ps, w)) {
|
||||||
region_t reg_noframe;
|
region_t reg_noframe;
|
||||||
pixman_region32_init(®_noframe);
|
pixman_region32_init(®_noframe);
|
||||||
win_get_region_noframe_local(ps, w, ®_noframe);
|
win_get_region_noframe_local(w, ®_noframe);
|
||||||
pixman_region32_translate(®_noframe, w->g.x, w->g.y);
|
pixman_region32_translate(®_noframe, w->g.x, w->g.y);
|
||||||
pixman_region32_subtract(®_blur, ®_blur, ®_noframe);
|
pixman_region32_subtract(®_blur, ®_blur, ®_noframe);
|
||||||
pixman_region32_fini(®_noframe);
|
pixman_region32_fini(®_noframe);
|
||||||
|
@ -1521,7 +1521,7 @@ paint_one(session_t *ps, win *w, const region_t *reg_paint) {
|
||||||
paint_region(ps, w, 0, 0, wid, hei, dopacity, reg_paint, pict);
|
paint_region(ps, w, 0, 0, wid, hei, dopacity, reg_paint, pict);
|
||||||
} else {
|
} else {
|
||||||
// Painting parameters
|
// Painting parameters
|
||||||
const margin_t extents = win_calc_frame_extents(ps, w);
|
const margin_t extents = win_calc_frame_extents(w);
|
||||||
const int t = extents.top;
|
const int t = extents.top;
|
||||||
const int l = extents.left;
|
const int l = extents.left;
|
||||||
const int b = extents.bottom;
|
const int b = extents.bottom;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
/// Generate a "return by value" function, from a function that returns the
|
/// Generate a "return by value" function, from a function that returns the
|
||||||
/// region via a region_t pointer argument.
|
/// region via a region_t pointer argument.
|
||||||
/// Function signature has to be (win *, region_t *)
|
/// Function signature has to be (win *, region_t *)
|
||||||
#define gen_by_val(fun) void region_t fun##_by_val(win *w) { \
|
#define gen_by_val(fun) region_t fun##_by_val(win *w) { \
|
||||||
region_t ret; \
|
region_t ret; \
|
||||||
pixman_region32_init(&ret); \
|
pixman_region32_init(&ret); \
|
||||||
fun(w, &ret); \
|
fun(w, &ret); \
|
||||||
|
@ -97,8 +97,8 @@ static void win_get_region_local(session_t *ps, win *w, region_t *res) {
|
||||||
/**
|
/**
|
||||||
* Get a rectangular region a window occupies, excluding frame and shadow.
|
* Get a rectangular region a window occupies, excluding frame and shadow.
|
||||||
*/
|
*/
|
||||||
void win_get_region_noframe_local(session_t *ps, win *w, region_t *res) {
|
void win_get_region_noframe_local(win *w, region_t *res) {
|
||||||
const margin_t extents = win_calc_frame_extents(ps, w);
|
const margin_t extents = win_calc_frame_extents(w);
|
||||||
|
|
||||||
int x = extents.left;
|
int x = extents.left;
|
||||||
int y = extents.top;
|
int y = extents.top;
|
||||||
|
|
|
@ -329,7 +329,7 @@ void add_damage_from_win(session_t *ps, win *w);
|
||||||
*
|
*
|
||||||
* Return region in global coordinates.
|
* Return region in global coordinates.
|
||||||
*/
|
*/
|
||||||
void win_get_region_noframe_local(session_t *ps, win *w, region_t *);
|
void win_get_region_noframe_local(win *w, region_t *);
|
||||||
/**
|
/**
|
||||||
* Retrieve frame extents from a window.
|
* Retrieve frame extents from a window.
|
||||||
*/
|
*/
|
||||||
|
@ -367,7 +367,7 @@ win_get_bounding_shape_global_by_val(win *w) {
|
||||||
* _NET_FRAME_EXTENTS and the X window border width.
|
* _NET_FRAME_EXTENTS and the X window border width.
|
||||||
*/
|
*/
|
||||||
static inline margin_t __attribute__((pure))
|
static inline margin_t __attribute__((pure))
|
||||||
win_calc_frame_extents(session_t *ps, const win *w) {
|
win_calc_frame_extents(const win *w) {
|
||||||
margin_t result = w->frame_extents;
|
margin_t result = w->frame_extents;
|
||||||
result.top = max_i(result.top, w->g.border_width);
|
result.top = max_i(result.top, w->g.border_width);
|
||||||
result.left = max_i(result.left, w->g.border_width);
|
result.left = max_i(result.left, w->g.border_width);
|
||||||
|
|
Loading…
Reference in New Issue