Make SurfaceItemX11 schedule a repaint if the shape changes
This commit is contained in:
parent
94d30c2268
commit
54bbfde2f3
2 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue