Commit e9fd5728 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[effects/zoom] Set wrap mode for cursor texture

With the Oxygen cursor theme, a visual glitch can appear in the
bottom-left corner of the cursor when the screen is zoomed in.

The reason for that is we're using GL_REPEAT for GL_TEXTURE_WRAP_S
and GL_TEXTURE_WRAP_T. So, when the linear filter samples neighboring
texels in the bottom, it can sample some texels from the top (because of

To fix that, we have to set the wrap mode to GL_CLAMP_TO_EDGE.

BUG: 338254
FIXED-IN: 5.14.0

Test Plan:


Tried other cursor themes(Breeze and Adwaita), everything looks okay.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision:
parent b3e3cf86
......@@ -192,8 +192,10 @@ void ZoomEffect::recreateTexture()
imageWidth = cursor.image().width();
imageHeight = cursor.image().height();
cursorHotSpot = cursor.hotSpot();
if (effects->isOpenGLCompositing())
if (effects->isOpenGLCompositing()) {
texture.reset(new GLTexture(cursor.image()));
if (effects->compositingType() == XRenderCompositing)
xrenderPicture.reset(new XRenderPicture(cursor.image()));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment