diff --git a/autotests/integration/decoration_input_test.cpp b/autotests/integration/decoration_input_test.cpp index 174548fd80..145dfc8a2d 100644 --- a/autotests/integration/decoration_input_test.cpp +++ b/autotests/integration/decoration_input_test.cpp @@ -496,8 +496,6 @@ void DecorationInputTest::testResizeOutsideWindow() QVERIFY(window->isDecorated()); QVERIFY(!window->noBorder()); window->move(workspace()->activeOutput()->geometry().center() - QPoint(window->width() / 2, window->height() / 2)); - QVERIFY(window->frameGeometry() != window->inputGeometry()); - QVERIFY(window->inputGeometry().contains(window->frameGeometry())); QSignalSpy interactiveMoveResizeStartedSpy(window, &Window::interactiveMoveResizeStarted); // go to border diff --git a/autotests/integration/inputmethod_test.cpp b/autotests/integration/inputmethod_test.cpp index 254b5a5b78..e1068a0938 100644 --- a/autotests/integration/inputmethod_test.cpp +++ b/autotests/integration/inputmethod_test.cpp @@ -149,7 +149,7 @@ void InputMethodTest::testOpenClose() Test::render(surface.get(), toplevelConfigureRequestedSpy.last().first().value(), Qt::red); QVERIFY(frameGeometryChangedSpy.wait()); - QCOMPARE(window->frameGeometry().height(), 1024 - keyboardClient->inputGeometry().height()); + QCOMPARE(window->frameGeometry().height(), 1024 - keyboardClient->frameGeometry().height()); // Hide the keyboard textInput->hideInputPanel(); diff --git a/src/window.cpp b/src/window.cpp index c985c503c6..d936696c9f 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -395,8 +395,7 @@ bool Window::hitTest(const QPointF &point) const if (m_surface && m_surface->isMapped()) { return m_surface->inputSurfaceAt(mapToLocal(point)); } - const QPointF relativePoint = point - inputGeometry().topLeft(); - return relativePoint.x() >= 0 && relativePoint.y() >= 0 && relativePoint.x() < inputGeometry().width() && relativePoint.y() < inputGeometry().height(); + return exclusiveContains(m_bufferGeometry, point); } QPointF Window::mapToFrame(const QPointF &point) const @@ -414,14 +413,6 @@ QPointF Window::mapFromLocal(const QPointF &point) const return point + bufferGeometry().topLeft(); } -QRectF Window::inputGeometry() const -{ - if (isDecorated()) { - return frameGeometry() + decoration()->resizeOnlyBorders(); - } - return bufferGeometry(); -} - bool Window::isLocalhost() const { if (!m_clientMachine) { diff --git a/src/window.h b/src/window.h index 3abbc6894f..60e26ac2cb 100644 --- a/src/window.h +++ b/src/window.h @@ -588,13 +588,7 @@ public: * Default implementation returns a margins object with all margins set to 0. */ QMargins frameMargins() const; - /** - * The geometry of the Window which accepts input events. This might be larger - * than the actual geometry, e.g. to support resizing outside the window. - * - * Default implementation returns same as geometry. - */ - virtual QRectF inputGeometry() const; + virtual QSizeF minSize() const; virtual QSizeF maxSize() const; QSizeF size() const;