summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-08-19 13:06:08 +0200
committerPaul Olav Tvete <paul.tvete@qt.io>2016-08-22 11:31:18 +0000
commitb7075b72200b7b087e2c34fa449737970981ccea (patch)
treeaeae0620bd3c64a8f836619d68ae5b4fd139dbf6 /src/compositor/extensions
parent768a28b284fa806cba38f864c56ba2e2c37296f2 (diff)
Rename QWaylandSurface::isMapped to hasContent
It was potentially misleading, since "mapped" is already used with a slightly different meaning in the Wayland protocol. In the protocol, mapped means that the surface should be rendered. The renamed property, on the other hand, is true if the surface has a buffer with contents attached and committed. In some cases this is not the same, i.e. the drag icon after dropping, or xdg_popups after popup_done. Change-Id: Idc359433c6130e3815de57b21d4edb13e318887d Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Diffstat (limited to 'src/compositor/extensions')
-rw-r--r--src/compositor/extensions/qwaylandwlshellintegration.cpp10
-rw-r--r--src/compositor/extensions/qwaylandwlshellintegration_p.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/compositor/extensions/qwaylandwlshellintegration.cpp b/src/compositor/extensions/qwaylandwlshellintegration.cpp
index ee4783ba9..1acc01dd7 100644
--- a/src/compositor/extensions/qwaylandwlshellintegration.cpp
+++ b/src/compositor/extensions/qwaylandwlshellintegration.cpp
@@ -111,8 +111,8 @@ void WlShellIntegration::handleSetPopup(QWaylandSeat *seat, QWaylandSurface *par
if (!popupShellSurfaces.contains(m_shellSurface)) {
popupShellSurfaces.append(m_shellSurface);
- QObject::connect(m_shellSurface->surface(), &QWaylandSurface::mappedChanged,
- this, &WlShellIntegration::handleSurfaceUnmapped);
+ QObject::connect(m_shellSurface->surface(), &QWaylandSurface::hasContentChanged,
+ this, &WlShellIntegration::handleSurfaceHasContentChanged);
}
}
@@ -120,8 +120,8 @@ void WlShellIntegration::handlePopupClosed()
{
handlePopupRemoved();
if (m_shellSurface)
- QObject::disconnect(m_shellSurface->surface(), &QWaylandSurface::mappedChanged,
- this, &WlShellIntegration::handleSurfaceUnmapped);
+ QObject::disconnect(m_shellSurface->surface(), &QWaylandSurface::hasContentChanged,
+ this, &WlShellIntegration::handleSurfaceHasContentChanged);
}
void WlShellIntegration::handlePopupRemoved()
@@ -141,7 +141,7 @@ void WlShellIntegration::handleShellSurfaceDestroyed()
m_shellSurface = nullptr;
}
-void WlShellIntegration::handleSurfaceUnmapped()
+void WlShellIntegration::handleSurfaceHasContentChanged()
{
if (!m_shellSurface || !m_shellSurface->surface()->size().isEmpty())
return;
diff --git a/src/compositor/extensions/qwaylandwlshellintegration_p.h b/src/compositor/extensions/qwaylandwlshellintegration_p.h
index 69bbbcd9c..f68040cdf 100644
--- a/src/compositor/extensions/qwaylandwlshellintegration_p.h
+++ b/src/compositor/extensions/qwaylandwlshellintegration_p.h
@@ -69,7 +69,7 @@ private Q_SLOTS:
void handleStartResize(QWaylandSeat *seat, QWaylandWlShellSurface::ResizeEdge edges);
void handleSetPopup(QWaylandSeat *seat, QWaylandSurface *parent, const QPoint &relativeToParent);
void handleShellSurfaceDestroyed();
- void handleSurfaceUnmapped();
+ void handleSurfaceHasContentChanged();
void adjustOffsetForNextFrame(const QPointF &offset);
private: