Rename X11Window::geometryShapeChanged to X11Window::shapeChanged

This commit is contained in:
Vlad Zahorodnii 2023-06-01 21:57:33 +03:00
parent e5478e2d90
commit db0447b52a
6 changed files with 17 additions and 18 deletions

View file

@ -370,7 +370,7 @@ bool X11Window::windowEvent(xcb_generic_event_t *e)
default: {
if (eventType == Xcb::Extensions::self()->shapeNotifyEvent()) {
detectShape();
Q_EMIT geometryShapeChanged(frameGeometry());
Q_EMIT shapeChanged();
}
if (eventType == Xcb::Extensions::self()->damageNotifyEvent()) {
damageNotifyEvent();
@ -692,7 +692,7 @@ void X11Window::configureNotifyEvent(xcb_configure_notify_event_t *e)
Q_EMIT bufferGeometryChanged(old);
Q_EMIT clientGeometryChanged(old);
Q_EMIT frameGeometryChanged(old);
Q_EMIT geometryShapeChanged(old);
Q_EMIT shapeChanged();
}
}

View file

@ -207,7 +207,7 @@ SurfaceItemXwayland::SurfaceItemXwayland(X11Window *window, Scene *scene, Item *
: SurfaceItemWayland(window->surface(), scene, parent)
, m_window(window)
{
connect(window, &X11Window::geometryShapeChanged, this, &SurfaceItemXwayland::discardQuads);
connect(window, &X11Window::shapeChanged, this, &SurfaceItemXwayland::discardQuads);
}
QVector<QRectF> SurfaceItemXwayland::shape() const

View file

@ -19,8 +19,8 @@ SurfaceItemX11::SurfaceItemX11(X11Window *window, Scene *scene, Item *parent)
{
connect(window, &Window::bufferGeometryChanged,
this, &SurfaceItemX11::handleBufferGeometryChanged);
connect(window, &X11Window::geometryShapeChanged,
this, &SurfaceItemX11::handleGeometryShapeChanged);
connect(window, &X11Window::shapeChanged,
this, &SurfaceItemX11::handleShapeChanged);
m_damageHandle = xcb_generate_id(kwinApp()->x11Connection());
xcb_damage_create(kwinApp()->x11Connection(), m_damageHandle, window->frameId(),
@ -146,7 +146,7 @@ void SurfaceItemX11::handleBufferGeometryChanged(const QRectF &old)
setSize(m_window->bufferGeometry().size());
}
void SurfaceItemX11::handleGeometryShapeChanged()
void SurfaceItemX11::handleShapeChanged()
{
scheduleRepaint(boundingRect());
discardQuads();

View file

@ -42,7 +42,7 @@ public:
private Q_SLOTS:
void handleBufferGeometryChanged(const QRectF &old);
void handleGeometryShapeChanged();
void handleShapeChanged();
protected:
std::unique_ptr<SurfacePixmap> createPixmap() override;

View file

@ -326,7 +326,7 @@ X11Window::X11Window()
connect(clientMachine(), &ClientMachine::localhostChanged, this, &X11Window::updateCaption);
connect(options, &Options::configChanged, this, &X11Window::updateMouseGrab);
connect(options, &Options::condensedTitleChanged, this, &X11Window::updateCaption);
connect(this, &X11Window::geometryShapeChanged, this, &X11Window::discardShapeRegion);
connect(this, &X11Window::shapeChanged, this, &X11Window::discardShapeRegion);
if (kwinApp()->operationMode() == Application::OperationModeX11) {
connect(this, &X11Window::moveResizeCursorChanged, this, [this](CursorShape cursor) {
@ -1315,7 +1315,7 @@ void X11Window::updateDecoration(bool check_workspace_pos, bool force)
destroyDecoration();
}
if (!noBorder()) {
createDecoration(oldgeom);
createDecoration();
} else {
destroyDecoration();
}
@ -1333,7 +1333,7 @@ void X11Window::invalidateDecoration()
updateDecoration(true, true);
}
void X11Window::createDecoration(const QRectF &oldgeom)
void X11Window::createDecoration()
{
std::shared_ptr<KDecoration2::Decoration> decoration(Workspace::self()->decorationBridge()->createDecoration(this));
if (decoration) {
@ -1345,19 +1345,18 @@ void X11Window::createDecoration(const QRectF &oldgeom)
moveResize(QRectF(calculateGravitation(false), clientSizeToFrameSize(clientSize())));
maybeCreateX11DecorationRenderer();
Q_EMIT geometryShapeChanged(oldgeom);
Q_EMIT shapeChanged();
}
void X11Window::destroyDecoration()
{
QRectF oldgeom = moveResizeGeometry();
if (isDecorated()) {
QPointF grav = calculateGravitation(true);
setDecoration(nullptr);
maybeDestroyX11DecorationRenderer();
moveResize(QRectF(grav, clientSizeToFrameSize(clientSize())));
if (!isDeleted()) {
Q_EMIT geometryShapeChanged(oldgeom);
Q_EMIT shapeChanged();
}
}
m_decoInputExtent.reset();
@ -1448,7 +1447,7 @@ void X11Window::setClientFrameExtents(const NETStrut &strut)
moveResize(moveResizeGeometry());
// This will invalidate the window quads cache.
Q_EMIT geometryShapeChanged(frameGeometry());
Q_EMIT shapeChanged();
}
/**
@ -1563,7 +1562,7 @@ void X11Window::updateShape()
// Decoration mask (i.e. 'else' here) setting is done in setMask()
// when the decoration calls it or when the decoration is created/destroyed
updateInputShape();
Q_EMIT geometryShapeChanged(frameGeometry());
Q_EMIT shapeChanged();
}
static Xcb::Window shape_helper_window(XCB_WINDOW_NONE);
@ -4353,7 +4352,7 @@ void X11Window::moveResizeInternal(const QRectF &rect, MoveResizeMode mode)
if (oldOutput != m_output) {
Q_EMIT outputChanged();
}
Q_EMIT geometryShapeChanged(oldFrameGeometry);
Q_EMIT shapeChanged();
}
void X11Window::updateServerGeometry()

View file

@ -358,7 +358,7 @@ Q_SIGNALS:
* Emitted whenever the Client's block compositing state changes.
*/
void blockingCompositingChanged(KWin::X11Window *client);
void geometryShapeChanged(const QRectF &old);
void shapeChanged();
private:
void exportMappingState(int s); // ICCCM 4.1.3.1, 4.1.4, NETWM 2.5.1
@ -437,7 +437,7 @@ private:
void maybeCreateX11DecorationRenderer();
void maybeDestroyX11DecorationRenderer();
void updateDecoration(bool check_workspace_pos, bool force = false);
void createDecoration(const QRectF &oldgeom);
void createDecoration();
void destroyDecoration();
QWindow *findInternalWindow() const;