Commit 54bbfde2 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Make SurfaceItemX11 schedule a repaint if the shape changes

parent 94d30c22
......@@ -18,7 +18,7 @@ SurfaceItemX11::SurfaceItemX11(Window *window, Item *parent)
connect(window, &Window::bufferGeometryChanged,
this, &SurfaceItemX11::handleBufferGeometryChanged);
connect(window, &Window::geometryShapeChanged,
this, &SurfaceItemX11::discardQuads);
this, &SurfaceItemX11::handleGeometryShapeChanged);
m_damageHandle = xcb_generate_id(kwinApp()->x11Connection());
xcb_damage_create(kwinApp()->x11Connection(), m_damageHandle, window->frameId(),
......@@ -123,6 +123,12 @@ void SurfaceItemX11::handleBufferGeometryChanged(Window *window, const QRect &ol
setSize(window->bufferGeometry().size());
}
void SurfaceItemX11::handleGeometryShapeChanged()
{
scheduleRepaint(boundingRect());
discardQuads();
}
QRegion SurfaceItemX11::shape() const
{
const QRect clipRect = window()->clientGeometry().translated(-window()->bufferGeometry().topLeft());
......
......@@ -37,6 +37,7 @@ public:
private Q_SLOTS:
void handleBufferGeometryChanged(Window *window, const QRect &old);
void handleGeometryShapeChanged();
protected:
SurfacePixmap *createPixmap() override;
......
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