diff options
author | Jens Georg <mail@jensge.org> | 2017-02-22 22:16:50 +0100 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2017-03-06 19:05:41 +0000 |
commit | 3b05ffe304d89790e2d46c4e3822c5bf46f1f178 (patch) | |
tree | f0e4c347bae07b93769d6229937da21291582bb4 /src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp | |
parent | ab6f6538aac8e9b8c49c0899d44d091219470603 (diff) | |
download | qtwayland-3b05ffe304d89790e2d46c4e3822c5bf46f1f178.tar.gz |
Fix ivi-shell surface id generation limit
The code tries to calculate 2 to the power of 10, but actually
calculated 2 XOR 10, limiting the actual number of surfaces possible to
use within one application to 8
Change-Id: If16dccaee7aa575c6e0736fb514edb09b4dbee11
Task-number: QTBUG-58934
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Diffstat (limited to 'src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp')
-rw-r--r-- | src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp index 6103e6be..612924d5 100644 --- a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp +++ b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp @@ -91,7 +91,7 @@ bool QWaylandIviShellIntegration::initialize(QWaylandDisplay *display) uint32_t QWaylandIviShellIntegration::getNextUniqueSurfaceId() { const uint32_t PID_MAX_EXPONENTIATION = 22; // 22 bit shift operation - const uint32_t ID_LIMIT = 2 ^ (32 - PID_MAX_EXPONENTIATION); // 10 bit is uniqeu id + const uint32_t ID_LIMIT = 1 << (32 - PID_MAX_EXPONENTIATION); // 10 bit is unique id QMutexLocker locker(&m_mutex); if (m_lastSurfaceId == 0) { |