From 551d48783658323f221b87813b4d84bc76d0e969 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sun, 21 Oct 2018 22:07:48 +0100 Subject: [PATCH] Remove some unused parameters Signed-off-by: Yuxuan Shui --- src/compton.c | 6 +++--- src/win.c | 6 +++--- src/win.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compton.c b/src/compton.c index 87d1611..5a1d7aa 100644 --- a/src/compton.c +++ b/src/compton.c @@ -1134,7 +1134,7 @@ paint_preprocess(session_t *ps, win *list) { if (w->frame_opacity == 1) *tmp = win_get_bounding_shape_global_by_val(w); 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_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)) { region_t reg_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_subtract(®_blur, ®_blur, ®_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); } else { // 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 l = extents.left; const int b = extents.bottom; diff --git a/src/win.c b/src/win.c index ab205f2..6ba9fd6 100644 --- a/src/win.c +++ b/src/win.c @@ -19,7 +19,7 @@ /// Generate a "return by value" function, from a function that returns the /// region via a region_t pointer argument. /// 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; \ pixman_region32_init(&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. */ -void win_get_region_noframe_local(session_t *ps, win *w, region_t *res) { - const margin_t extents = win_calc_frame_extents(ps, w); +void win_get_region_noframe_local(win *w, region_t *res) { + const margin_t extents = win_calc_frame_extents(w); int x = extents.left; int y = extents.top; diff --git a/src/win.h b/src/win.h index 63b8df4..5e8b835 100644 --- a/src/win.h +++ b/src/win.h @@ -329,7 +329,7 @@ void add_damage_from_win(session_t *ps, win *w); * * 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. */ @@ -367,7 +367,7 @@ win_get_bounding_shape_global_by_val(win *w) { * _NET_FRAME_EXTENTS and the X window border width. */ 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; result.top = max_i(result.top, w->g.border_width); result.left = max_i(result.left, w->g.border_width);