Remove some unused parameters

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2018-10-21 22:07:48 +01:00
parent f519ee53c1
commit 551d487836
3 changed files with 8 additions and 8 deletions

View File

@ -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(&reg_noframe);
win_get_region_noframe_local(ps, w, &reg_noframe);
win_get_region_noframe_local(w, &reg_noframe);
pixman_region32_translate(&reg_noframe, w->g.x, w->g.y);
pixman_region32_subtract(&reg_blur, &reg_blur, &reg_noframe);
pixman_region32_fini(&reg_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;

View File

@ -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;

View File

@ -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);