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