Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gl: fix for correct display of window borders during animation #1293

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/opengl.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,10 +797,7 @@ bool glx_bind_pixmap(session_t *ps, glx_texture_t **pptex, xcb_pixmap_t pixmap,

glTexParameteri(ptex->target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(ptex->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
if (repeat) {
glTexParameteri(ptex->target, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(ptex->target, GL_TEXTURE_WRAP_T, GL_REPEAT);
} else {
if (!repeat) {
glTexParameteri(ptex->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(ptex->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
}
Expand Down
8 changes: 4 additions & 4 deletions src/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ void paint_one(session_t *ps, struct win *w, const region_t *reg_paint) {
// Let glx_bind_pixmap() determine pixmap size, because if the user
// is resizing windows, the width and height we get may not be up-to-date,
// causing the jittering issue M4he reported in #7.
if (!paint_bind_tex(ps, &w->paint, 0, 0, false, 0, w->a.visual,
if (!paint_bind_tex(ps, &w->paint, 0, 0, true, 0, w->a.visual,
(!ps->o.glx_no_rebind_pixmap && w->pixmap_damaged))) {
log_error("Failed to bind texture for window %#010x.", win_id(w));
}
Expand Down Expand Up @@ -763,7 +763,7 @@ static bool win_build_shadow(session_t *ps, struct win *w, double opacity) {
*/
static inline void win_paint_shadow(session_t *ps, struct win *w, region_t *reg_paint) {
// Bind shadow pixmap to GLX texture if needed
paint_bind_tex(ps, &w->shadow_paint, 0, 0, false, 32, 0, false);
paint_bind_tex(ps, &w->shadow_paint, 0, 0, true, 32, 0, false);

if (!paint_isvalid(ps, &w->shadow_paint)) {
log_error("Window %#010x is missing shadow data.", win_id(w));
Expand Down Expand Up @@ -1287,8 +1287,8 @@ void paint_all(session_t *ps, struct win *t) {
}
glXWaitX();
assert(ps->tgt_buffer.pixmap);
paint_bind_tex(ps, &ps->tgt_buffer, ps->root_width, ps->root_height,
false, ps->c.screen_info->root_depth,
paint_bind_tex(ps, &ps->tgt_buffer, ps->root_width, ps->root_height, true,
ps->c.screen_info->root_depth,
ps->c.screen_info->root_visual, !ps->o.glx_no_rebind_pixmap);
if (ps->o.vsync_use_glfinish) {
glFinish();
Expand Down