Move some default_* functions to backend_common.c
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
b061789a84
commit
7ac351e5b5
|
@ -14,14 +14,6 @@ backend_info_t *backend_list[NUM_BKEND] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
bool default_is_win_transparent(void *backend_data, win *w, void *win_data) {
|
||||
return w->mode != WMODE_SOLID;
|
||||
}
|
||||
|
||||
bool default_is_frame_transparent(void *backend_data, win *w, void *win_data) {
|
||||
return w->frame_opacity != 1;
|
||||
}
|
||||
|
||||
region_t get_damage(session_t *ps) {
|
||||
region_t region;
|
||||
auto buffer_age_fn = backend_list[ps->o.backend]->buffer_age;
|
||||
|
|
|
@ -244,3 +244,11 @@ shadow_picture_err:
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool default_is_win_transparent(void *backend_data, win *w, void *win_data) {
|
||||
return w->mode != WMODE_SOLID;
|
||||
}
|
||||
|
||||
bool default_is_frame_transparent(void *backend_data, win *w, void *win_data) {
|
||||
return w->frame_opacity != 1;
|
||||
}
|
||||
|
|
|
@ -19,3 +19,11 @@ solid_picture(session_t *ps, bool argb, double a, double r, double g, double b);
|
|||
|
||||
xcb_image_t *
|
||||
make_shadow(xcb_connection_t *c, const conv *kernel, double opacity, int width, int height);
|
||||
|
||||
/// The default implementation of `is_win_transparent`, it simply looks at win::mode. So
|
||||
/// this is not suitable for backends that alter the content of windows
|
||||
bool default_is_win_transparent(void *, win *, void *);
|
||||
|
||||
/// The default implementation of `is_frame_transparent`, it uses win::frame_opacity. Same
|
||||
/// caveat as `default_is_win_transparent` applies.
|
||||
bool default_is_frame_transparent(void *, win *, void *);
|
||||
|
|
Loading…
Reference in New Issue