Commit a3cf1b92 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

Drop AbstractClient::isInitialPositionSet()

It's the same as AbstractClient::isPlaceable(), which is a more generic
flag to indicate if the window can be placed.
parent 7f4d1120
......@@ -78,7 +78,7 @@ AbstractClient::AbstractClient()
connect(this, &AbstractClient::frameGeometryChanged, this,
[this] (Toplevel *c, const QRect &old) {
Q_UNUSED(c)
if (isOnScreenDisplay() && !frameGeometry().isEmpty() && old.size() != frameGeometry().size() && !isInitialPositionSet()) {
if (isOnScreenDisplay() && !frameGeometry().isEmpty() && old.size() != frameGeometry().size() && isPlaceable()) {
GeometryUpdatesBlocker blocker(this);
const QRect area = workspace()->clientArea(PlacementArea, Screens::self()->current(), desktop());
Placement::self()->place(this, area);
......
......@@ -819,10 +819,6 @@ public:
bool unresponsive() const;
virtual bool isInitialPositionSet() const {
return false;
}
/**
* Default implementation returns @c null.
* Mostly intended for X11 clients, from EWMH:
......
......@@ -253,7 +253,7 @@ void PlasmaSurfaceTest::testOSDPlacementManualPosition()
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
QVERIFY(c);
QVERIFY(c->isInitialPositionSet());
QVERIFY(!c->isPlaceable());
QCOMPARE(c->windowType(), NET::OnScreenDisplay);
QVERIFY(c->isOnScreenDisplay());
QCOMPARE(c->frameGeometry(), QRect(50, 70, 100, 50));
......
......@@ -40,7 +40,6 @@ public:
bool takeFocus() override { return false; }
bool wantsInput() const override { return false; }
bool isInputMethod() const override { return true; }
bool isInitialPositionSet() const override { return true; }
NET::WindowType windowType(bool /*direct*/, int /*supported_types*/) const override;
QRect inputGeometry() const override;
......
......@@ -127,11 +127,6 @@ bool LayerShellV1Client::isResizable() const
return false;
}
bool LayerShellV1Client::isInitialPositionSet() const
{
return true;
}
bool LayerShellV1Client::takeFocus()
{
setActive(true);
......
......@@ -37,7 +37,6 @@ public:
bool isMovable() const override;
bool isMovableAcrossScreens() const override;
bool isResizable() const override;
bool isInitialPositionSet() const override;
bool takeFocus() override;
bool wantsInput() const override;
StrutRect strutRect(StrutArea area) const override;
......
......@@ -721,9 +721,6 @@ void Workspace::addShellClient(AbstractClient *client)
if (client->isPlaceable()) {
const QRect area = clientArea(PlacementArea, Screens::self()->current(), client->desktop());
bool placementDone = false;
if (client->isInitialPositionSet()) {
placementDone = true;
}
if (client->isFullScreen()) {
placementDone = true;
}
......
......@@ -284,11 +284,6 @@ QRect XdgSurfaceClient::adjustMoveResizeGeometry(const QRect &rect) const
return geometry;
}
bool XdgSurfaceClient::isInitialPositionSet() const
{
return m_plasmaShellSurface ? m_plasmaShellSurface->isPositionSet() : false;
}
void XdgSurfaceClient::requestGeometry(const QRect &rect)
{
WaylandClient::requestGeometry(rect);
......@@ -1189,7 +1184,7 @@ void XdgToplevelClient::initialize()
{
blockGeometryUpdates(true);
bool needsPlacement = !isInitialPositionSet();
bool needsPlacement = isPlaceable();
updateDecoration(false, false);
......
......@@ -57,7 +57,6 @@ public:
QRect frameRectToBufferRect(const QRect &rect) const override;
QRect inputGeometry() const override;
QMatrix4x4 inputTransformation() const override;
bool isInitialPositionSet() const override;
void destroyClient() override;
void setVirtualKeyboardGeometry(const QRect &geo) override;
......
Markdown is supported
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