6#include <QtCore/qsize.h>
7#include <QtCore/qdebug.h>
9#include <QtWaylandClient/private/qwaylanddisplay_p.h>
10#include <QtWaylandClient/private/qwaylandwindow_p.h>
11#include <QtWaylandClient/private/qwaylandabstractdecoration_p.h>
24 public QtWayland::ivi_controller
39 m_iviController->initialize();
59uint32_t QWaylandIviShellIntegration::getNextUniqueSurfaceId()
61 const uint32_t PID_MAX_EXPONENTIATION = 22;
62 const uint32_t ID_LIMIT = 1 << (32 - PID_MAX_EXPONENTIATION);
63 const std::lock_guard<QRecursiveMutex> locker(m_mutex);
65 if (m_lastSurfaceId == 0) {
68 m_lastSurfaceId = env.
toUInt(&
ok, 10);
70 m_useEnvSurfaceId =
true;
72 m_lastSurfaceId = getpid();
74 return m_lastSurfaceId;
77 if (m_useEnvSurfaceId) {
81 if (m_surfaceNumber >= ID_LIMIT) {
82 qWarning(
"IVI surface id counter overflow\n");
85 m_lastSurfaceId += (m_surfaceNumber << PID_MAX_EXPONENTIATION);
88 return m_lastSurfaceId;
96 uint32_t surfaceId = getNextUniqueSurfaceId();
100 struct ivi_surface *surface = surface_create(surfaceId,
window->wlSurface());
101 if (!m_iviController->isActive())
104 struct ::ivi_controller_surface *controller = m_iviController->ivi_controller::surface_create(surfaceId);
111 transientPos -=
parent->geometry().topLeft();
112 transientPos.
setX(transientPos.
x() +
parent->decoration()->margins().left());
113 transientPos.
setY(transientPos.
y() +
parent->decoration()->margins().top());
116 iviSurface->ivi_controller_surface::set_destination_rectangle(transientPos.
x(),
uint toUInt(bool *ok=nullptr, int base=10) const
Returns the byte array converted to an {unsigned int} using base base, which is ten by default.
QObject * parent() const
Returns a pointer to the parent object.
\inmodule QtCore\reentrant
constexpr int x() const noexcept
Returns the x coordinate of this point.
constexpr void setY(int y) noexcept
Sets the y coordinate of this point to the given y coordinate.
constexpr int y() const noexcept
Returns the y coordinate of this point.
constexpr void setX(int x) noexcept
Sets the x coordinate of this point to the given x coordinate.
QWaylandShellSurface * createShellSurface(QWaylandWindow *window) override
QWaylandIviShellIntegration()
struct wl_display * display
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)