Drop support for Composite < 0.2

Rational: current workaround for Composite < 0.2 doesn't work with the
GLX backend, it also doesn't handle window border properly. Plus,
Composite 0.2 came out more than a decade ago, it's safe to assume
everyone has it.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-03-05 22:13:22 +00:00
parent eed5ea719e
commit d0fd21e167
5 changed files with 12 additions and 16 deletions

View File

@ -234,15 +234,19 @@ static inline bool paint_isvalid(session_t *ps, const paint_t *ppaint) {
*/
void paint_one(session_t *ps, win *w, const region_t *reg_paint) {
// Fetch Pixmap
if (!w->paint.pixmap && ps->has_name_pixmap) {
if (!w->paint.pixmap) {
w->paint.pixmap = xcb_generate_id(ps->c);
set_ignore_cookie(
ps, xcb_composite_name_window_pixmap(ps->c, w->id, w->paint.pixmap));
}
xcb_drawable_t draw = w->paint.pixmap;
if (!draw)
draw = w->id;
if (!draw) {
log_error("Failed to get pixmap from window %#010x (%s), window won't be "
"visible",
w->id, w->name);
return;
}
// XRender: Build picture
if (bkend_use_xrender(ps) && !w->paint.pict) {