summaryrefslogtreecommitdiffstats
path: root/examples/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'examples/wayland')
-rw-r--r--examples/wayland/minimal-cpp/compositor.h4
-rw-r--r--examples/wayland/minimal-cpp/window.cpp2
-rw-r--r--examples/wayland/qwindow-compositor/compositor.cpp4
-rw-r--r--examples/wayland/qwindow-compositor/compositor.h2
-rw-r--r--examples/wayland/qwindow-compositor/window.cpp2
5 files changed, 7 insertions, 7 deletions
diff --git a/examples/wayland/minimal-cpp/compositor.h b/examples/wayland/minimal-cpp/compositor.h
index f06421320..3c0c80e0e 100644
--- a/examples/wayland/minimal-cpp/compositor.h
+++ b/examples/wayland/minimal-cpp/compositor.h
@@ -71,11 +71,11 @@ public:
QOpenGLTexture *getTexture();
int iviId() const { return m_iviId; }
- QRect globalGeometry() const { return QRect(globalPosition(), surface()->size()); }
+ QRect globalGeometry() const { return QRect(globalPosition(), surface()->destinationSize()); }
void setGlobalPosition(const QPoint &globalPos) { m_pos = globalPos; m_positionSet = true; }
QPoint globalPosition() const { return m_pos; }
QPoint mapToLocal(const QPoint &globalPos) const;
- QSize size() const { return surface() ? surface()->size() : QSize(); }
+ QSize size() const { return surface() ? surface()->destinationSize() : QSize(); }
void initPosition(const QSize &screenSize, const QSize &surfaceSize);
diff --git a/examples/wayland/minimal-cpp/window.cpp b/examples/wayland/minimal-cpp/window.cpp
index 673e15fd8..f345bd51f 100644
--- a/examples/wayland/minimal-cpp/window.cpp
+++ b/examples/wayland/minimal-cpp/window.cpp
@@ -95,7 +95,7 @@ void Window::paintGL()
GLuint textureId = texture->textureId();
QWaylandSurface *surface = view->surface();
if (surface && surface->hasContent()) {
- QSize s = surface->size();
+ QSize s = surface->destinationSize();
view->initPosition(size(), s);
QPointF pos = view->globalPosition();
QRectF surfaceGeometry(pos, s);
diff --git a/examples/wayland/qwindow-compositor/compositor.cpp b/examples/wayland/qwindow-compositor/compositor.cpp
index f25e67d87..199de22e2 100644
--- a/examples/wayland/qwindow-compositor/compositor.cpp
+++ b/examples/wayland/qwindow-compositor/compositor.cpp
@@ -79,7 +79,7 @@ QOpenGLTexture *View::getTexture()
if (newContent) {
m_texture = buf.toOpenGLTexture();
if (surface()) {
- m_size = surface()->size();
+ m_size = surface()->destinationSize();
m_origin = buf.origin() == QWaylandSurface::OriginTopLeft
? QOpenGLTextureBlitter::OriginTopLeft
: QOpenGLTextureBlitter::OriginBottomLeft;
@@ -96,7 +96,7 @@ QOpenGLTextureBlitter::Origin View::textureOrigin() const
QSize View::size() const
{
- return surface() ? surface()->size() : m_size;
+ return surface() ? surface()->destinationSize() : m_size;
}
bool View::isCursor() const
diff --git a/examples/wayland/qwindow-compositor/compositor.h b/examples/wayland/qwindow-compositor/compositor.h
index 2a395a1ab..8f18dc53d 100644
--- a/examples/wayland/qwindow-compositor/compositor.h
+++ b/examples/wayland/qwindow-compositor/compositor.h
@@ -82,7 +82,7 @@ public:
void setParentView(View *parent) { m_parentView = parent; }
View *parentView() const { return m_parentView; }
QPointF parentPosition() const { return m_parentView ? (m_parentView->position() + m_parentView->parentPosition()) : QPointF(); }
- QSize windowSize() { return m_xdgSurface ? m_xdgSurface->windowGeometry().size() : surface() ? surface()->size() : m_size; }
+ QSize windowSize() { return m_xdgSurface ? m_xdgSurface->windowGeometry().size() : surface() ? surface()->destinationSize() : m_size; }
QPoint offset() const { return m_offset; }
qreal animationFactor() const {return m_animationFactor; }
diff --git a/examples/wayland/qwindow-compositor/window.cpp b/examples/wayland/qwindow-compositor/window.cpp
index 80aeec4c3..b8b8e52ec 100644
--- a/examples/wayland/qwindow-compositor/window.cpp
+++ b/examples/wayland/qwindow-compositor/window.cpp
@@ -180,7 +180,7 @@ void Window::startResize(int edge, bool anchored)
m_grabState = ResizeGrab;
m_resizeEdge = edge;
m_resizeAnchored = anchored;
- m_resizeAnchorPosition = getAnchorPosition(m_mouseView->position(), edge, m_mouseView->surface()->size());
+ m_resizeAnchorPosition = getAnchorPosition(m_mouseView->position(), edge, m_mouseView->surface()->destinationSize());
}
void Window::startDrag(View *dragIcon)