- Add --glx-fshader-win, which specifies a custom fragment shader for painting windows. compton-default-fshader-win.glsl is the shader with default behavior, and compton-fake-transparency-fshader-win.glsl provides a template of fake transparency. (#183) - Add --force-win-blend to force all windows to be painted with blending. - Add --no-fading-destroyed-argb, as a workaround of bugs in some WMs. (#193)
This commit is contained in:
@ -675,20 +675,37 @@ static win *
|
||||
paint_preprocess(session_t *ps, win *list);
|
||||
|
||||
static void
|
||||
render(session_t *ps, int x, int y, int dx, int dy, int wid, int hei,
|
||||
render_(session_t *ps, int x, int y, int dx, int dy, int wid, int hei,
|
||||
double opacity, bool argb, bool neg,
|
||||
Picture pict, glx_texture_t *ptex,
|
||||
XserverRegion reg_paint, const reg_data_t *pcache_reg);
|
||||
XserverRegion reg_paint, const reg_data_t *pcache_reg
|
||||
#ifdef CONFIG_VSYNC_OPENGL_GLSL
|
||||
, const glx_prog_main_t *pprogram
|
||||
#endif
|
||||
);
|
||||
|
||||
#ifdef CONFIG_VSYNC_OPENGL_GLSL
|
||||
#define \
|
||||
render(ps, x, y, dx, dy, wid, hei, opacity, argb, neg, pict, ptex, reg_paint, pcache_reg, pprogram) \
|
||||
render_(ps, x, y, dx, dy, wid, hei, opacity, argb, neg, pict, ptex, reg_paint, pcache_reg, pprogram)
|
||||
#else
|
||||
#define \
|
||||
render(ps, x, y, dx, dy, wid, hei, opacity, argb, neg, pict, ptex, reg_paint, pcache_reg, pprogram) \
|
||||
render_(ps, x, y, dx, dy, wid, hei, opacity, argb, neg, pict, ptex, reg_paint, pcache_reg)
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
win_render(session_t *ps, win *w, int x, int y, int wid, int hei, double opacity, XserverRegion reg_paint, const reg_data_t *pcache_reg, Picture pict) {
|
||||
win_render(session_t *ps, win *w, int x, int y, int wid, int hei,
|
||||
double opacity, XserverRegion reg_paint, const reg_data_t *pcache_reg,
|
||||
Picture pict) {
|
||||
const int dx = (w ? w->a.x: 0) + x;
|
||||
const int dy = (w ? w->a.y: 0) + y;
|
||||
const bool argb = (w && w->mode == WMODE_ARGB);
|
||||
const bool argb = (w && (WMODE_ARGB == w->mode || ps->o.force_win_blend));
|
||||
const bool neg = (w && w->invert_color);
|
||||
|
||||
render(ps, x, y, dx, dy, wid, hei, opacity, argb, neg,
|
||||
pict, (w ? w->paint.ptex: ps->root_tile_paint.ptex), reg_paint, pcache_reg);
|
||||
pict, (w ? w->paint.ptex: ps->root_tile_paint.ptex),
|
||||
reg_paint, pcache_reg, (w ? &ps->o.glx_prog_win: NULL));
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
Reference in New Issue
Block a user