scripting: Drop Window.geometry property

remotes/origin/work/apol/screencast-formats
Vlad Zahorodnii 3 years ago
parent e75496d97f
commit 72b7bda18e
  1. 18
      autotests/integration/xdgshellwindow_test.cpp
  2. 2
      src/window.cpp
  3. 13
      src/window.h

@ -1613,10 +1613,10 @@ void TestXdgShellWindow::testMaximizeHorizontal()
QVERIFY(!states.testFlag(Test::XdgToplevel::State::Maximized));
// Draw contents of the maximized window.
QSignalSpy geometryChangedSpy(window, &Window::geometryChanged);
QSignalSpy frameGeometryChangedSpy(window, &Window::frameGeometryChanged);
shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last().at(0).value<quint32>());
Test::render(surface.get(), QSize(1280, 600), Qt::blue);
QVERIFY(geometryChangedSpy.wait());
QVERIFY(frameGeometryChangedSpy.wait());
QCOMPARE(window->size(), QSize(1280, 600));
QCOMPARE(window->requestedMaximizeMode(), MaximizeHorizontal);
QCOMPARE(window->maximizeMode(), MaximizeHorizontal);
@ -1634,7 +1634,7 @@ void TestXdgShellWindow::testMaximizeHorizontal()
// Draw contents of the restored window.
shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last().at(0).value<quint32>());
Test::render(surface.get(), QSize(800, 600), Qt::blue);
QVERIFY(geometryChangedSpy.wait());
QVERIFY(frameGeometryChangedSpy.wait());
QCOMPARE(window->size(), QSize(800, 600));
QCOMPARE(window->requestedMaximizeMode(), MaximizeRestore);
QCOMPARE(window->maximizeMode(), MaximizeRestore);
@ -1692,10 +1692,10 @@ void TestXdgShellWindow::testMaximizeVertical()
QVERIFY(!states.testFlag(Test::XdgToplevel::State::Maximized));
// Draw contents of the maximized window.
QSignalSpy geometryChangedSpy(window, &Window::geometryChanged);
QSignalSpy frameGeometryChangedSpy(window, &Window::frameGeometryChanged);
shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last().at(0).value<quint32>());
Test::render(surface.get(), QSize(800, 1024), Qt::blue);
QVERIFY(geometryChangedSpy.wait());
QVERIFY(frameGeometryChangedSpy.wait());
QCOMPARE(window->size(), QSize(800, 1024));
QCOMPARE(window->requestedMaximizeMode(), MaximizeVertical);
QCOMPARE(window->maximizeMode(), MaximizeVertical);
@ -1713,7 +1713,7 @@ void TestXdgShellWindow::testMaximizeVertical()
// Draw contents of the restored window.
shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last().at(0).value<quint32>());
Test::render(surface.get(), QSize(800, 600), Qt::blue);
QVERIFY(geometryChangedSpy.wait());
QVERIFY(frameGeometryChangedSpy.wait());
QCOMPARE(window->size(), QSize(800, 600));
QCOMPARE(window->requestedMaximizeMode(), MaximizeRestore);
QCOMPARE(window->maximizeMode(), MaximizeRestore);
@ -1771,10 +1771,10 @@ void TestXdgShellWindow::testMaximizeFull()
QVERIFY(states.testFlag(Test::XdgToplevel::State::Maximized));
// Draw contents of the maximized window.
QSignalSpy geometryChangedSpy(window, &Window::geometryChanged);
QSignalSpy frameGeometryChangedSpy(window, &Window::frameGeometryChanged);
shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last().at(0).value<quint32>());
Test::render(surface.get(), QSize(1280, 1024), Qt::blue);
QVERIFY(geometryChangedSpy.wait());
QVERIFY(frameGeometryChangedSpy.wait());
QCOMPARE(window->size(), QSize(1280, 1024));
QCOMPARE(window->requestedMaximizeMode(), MaximizeFull);
QCOMPARE(window->maximizeMode(), MaximizeFull);
@ -1792,7 +1792,7 @@ void TestXdgShellWindow::testMaximizeFull()
// Draw contents of the restored window.
shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last().at(0).value<quint32>());
Test::render(surface.get(), QSize(800, 600), Qt::blue);
QVERIFY(geometryChangedSpy.wait());
QVERIFY(frameGeometryChangedSpy.wait());
QCOMPARE(window->size(), QSize(800, 600));
QCOMPARE(window->requestedMaximizeMode(), MaximizeRestore);
QCOMPARE(window->maximizeMode(), MaximizeRestore);

@ -85,8 +85,6 @@ Window::Window()
{
connect(this, &Window::bufferGeometryChanged, this, &Window::inputTransformationChanged);
// Only for compatibility reasons, drop in the next major release.
connect(this, &Window::frameGeometryChanged, this, &Window::geometryChanged);
connect(this, &Window::geometryShapeChanged, this, &Window::discardShapeRegion);
connect(this, &Window::clientStartUserMovedResized, this, &Window::moveResizedChanged);

@ -460,14 +460,6 @@ class KWIN_EXPORT Window : public QObject
*/
Q_PROPERTY(bool modal READ isModal NOTIFY modalChanged)
/**
* The geometry of this Window. Be aware that depending on resize mode the frameGeometryChanged
* signal might be emitted at each resize step or only at the end of the resize operation.
*
* @deprecated Use frameGeometry
*/
Q_PROPERTY(QRectF geometry READ frameGeometry WRITE moveResize NOTIFY frameGeometryChanged)
/**
* The geometry of this Window. Be aware that depending on resize mode the frameGeometryChanged
* signal might be emitted at each resize step or only at the end of the resize operation.
@ -1439,11 +1431,6 @@ Q_SIGNALS:
void opacityChanged(KWin::Window *window, qreal oldOpacity);
void damaged(KWin::Window *window);
void inputTransformationChanged();
/**
* This signal is emitted when the Window's frame geometry changes.
* @deprecated since 5.19, use frameGeometryChanged instead
*/
void geometryChanged();
void geometryShapeChanged(KWin::Window *window, const QRectF &old);
void windowClosed(KWin::Window *window, KWin::Deleted *deleted);
void windowShown(KWin::Window *window);

Loading…
Cancel
Save