summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove QWaylandWindow::shellManagesActiveStateJohan Klokkhammer Helsing2016-11-1011-18/+38
| | | | | | | | | | | | If m_shellSurface was deleted, there was no way for QWaylandDisplay to know whether the shell handled window deactivation or not. The shell integration now always handles the window active state. The default implementation of QWaylandShellIntegration will make a window active on keyboard focus. Change-Id: I80cfce9976b1d3c57094fdd8980c9110b873f239 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Follow the protocol for nested xdg_popupsJohan Klokkhammer Helsing2016-11-102-4/+21
| | | | | | | | The previous implementation sent the wrong parent for nested popups and used a new serial for each popup instead of reusing the one for the current grab. Change-Id: I22b1cbe997a64562d47275821c9146157c51bc42 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'qt/5.7' into 5.8Paul Olav Tvete2016-11-1022-19/+110
|\ | | | | | | Change-Id: Ibfe6fe6ed983b537d55544883b7dc75e5cc3fc37
| * Merge remote-tracking branch 'qt/5.6' into 5.7Paul Olav Tvete2016-11-1022-18/+121
| |\ | | | | | | | | | Change-Id: I1efd16d6c5f939d61001376c3b010eae1927595b
| | * Client: Cleanup mouse state after dragJohan Klokkhammer Helsing2016-11-102-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes an issue where dragging with the mouse would cause the next touch event to not generate a synthesized mouse press event. The touchDrag test can now be run directly after the mouseDrag test without failing. Task-number: QTBUG-56187 Change-Id: I53cc5f90fc8d8672936b23f54a017687d41c31fc Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Client: Fix touch getting stuck after drag-and-dropJohan Klokkhammer Helsing2016-11-093-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | wl_touch.up is not sent by compositors when dragging, so release all touch points when the drag ends. Task-number: QTBUG-56187 Change-Id: I1c3d03c72e75a551355c50bb5d82433f5e2e35f0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Don't create new xdg surfaces in updateTransientParentJohan Klokkhammer Helsing2016-11-091-1/+3
| | | | | | | | | | | | | | | Change-Id: I1644a75269fec40644f02eeb275d9e6b98995c0e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Fix build when some features are disabledPaul Olav Tvete2016-11-0720-13/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make QtWaylandClient compile when Qt is configured with: -no-opengl -no-accessibility -D QT_NO_CLIPBOARD -D QT_NO_DRAGANDDROP -D QT_NO_SESSIONMANAGER Task-number: QTBUG-56192 Change-Id: Idc6aae6b36a35515109a27bed31a22e3e909ef27 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| | * Client: Call parent requestUpdate after changing subsurface positionJohan Klokkhammer Helsing2016-10-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling setPosition on a child window would not send the appropriate commit request after the wl_subsurface.set_position request. Task-number: QTBUG-52118 Change-Id: I792016ce7e0a5a2efd3a32a98727b43ee0275b0e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| | * Client: Remove windows from keyboard focus list when destroyedJohan Klokkhammer Helsing2016-10-243-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the undefined behavior in tst_WaylandClient::touchDrag and mouseDrag Note: The test still fails if run twice in a row, but it appears to be deterministic. Task-number: QTBUG-56187 Change-Id: Ib45d82224f004d1324f2ce4d6b7df05ee36c04f5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 0049240a2b7d8691f09224e1542919ddbbb0d864) Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| | * Don't return a null QMimeData from the clipboardGiulio Camuffo2016-10-172-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation for QClipboard::mimeData() doesn't say that the returned value can be null, and some clients just dereference that without checking. So instead return an empty QMimeData. Change-Id: Ieec3140af4e7f33cde98ed96fd96b2674d0d0f9f Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * | Call formatWindowTitle on the window titleMartin Gräßlin2016-10-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to QWidget::setWindowTitle documentation the QPA plugin is responsible for adding the application name to the window title. As it's supposed to be done for Unix platform the Wayland QPA also needs to perform this task. Task-number: QTBUG-56475 Change-Id: Ib261c68d08ca06d1ec4734c8c215a4ceb059fae3 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | | Don't ignore wl_surface:attach with null bufferJohan Klokkhammer Helsing2016-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Update the bufferRef to null so the surface gets hidden. This fixes an issue with popups not popping down properly. Change-Id: Ie6781c0e935998035e06c8498035d786f06a1fe0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Doc: Added missing documentation for certain parametersNico Vertriest2016-11-035-19/+21
| | | | | | | | | | | | | | | | | | | | | Change-Id: I6f30d9032a9f5f432aacee1b05439445933fb9d0 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* | | Fix memory leaksGiulio Camuffo2016-11-032-47/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several fields in QWaylandIntegration were never deleted, so use QScopedPointer to handle that. Also use QScopedPointer for all the heap allocated fields of the class. Change-Id: I4c33be4157a6e17abfa1610f84ef9a88afe5f38a Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | QML Compositors: Switch touch events on by defaultJohan Klokkhammer Helsing2016-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously sending multi-touch to clients would only be possible after setting touchEventsEnabled on ShellSurffaceItem. Change-Id: I53b9d024ceee0abfe35d9761a5ddbec2b91a37db Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | | Compositor: Switch keyboard focus on touch inputJohan Klokkhammer Helsing2016-11-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When touchEventsEnabled is set to true on ShellSurfaceItem, touching a client did not switch the keyboard focus to that client. Consequently, touching inside a TextField would not switch the focus to that client, causing keyboard and virtual keyboard input to be delivered to the wrong client. Task-number: QTBUG-56836 Change-Id: I47134dfeb80d25e995baf91e51977dacb7087bb7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | use modularized platformsupport modulesv5.8.0-beta1Oswald Buddenhagen2016-10-2219-22/+28
| | | | | | | | | | | | | | | Change-Id: I7883470e22deb089240d86df7dc2d625a107a53e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Don't try to deliver event to destroyed windowPaul Olav Tvete2016-10-112-2/+4
| | | | | | | | | | | | | | | Change-Id: If1c57250e2dc9e0d55767bbdfb15c3e3f5d9b333 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Client: Remove windows from keyboard focus list when destroyedJohan Klokkhammer Helsing2016-10-113-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the undefined behavior in tst_WaylandClient::touchDrag and mouseDrag Note: The test still fails if run twice in a row, but it appears to be deterministic. Task-number: QTBUG-56187 Change-Id: Ib45d82224f004d1324f2ce4d6b7df05ee36c04f5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Rename QWaylandSurface::throttlingView to primaryViewJohan Klokkhammer Helsing2016-10-0710-13/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And make sure QWaylandWlShellIntegration and QWaylandXdgShellV5Integration only send configure events if they have the primary view. Also add a convenience, QWaylandView::isPrimary. Change-Id: Ib3a9615f46c8c43897c7fac22f832d2581190c0a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Fix advance() documentationPaul Olav Tvete2016-10-071-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | Focus less on how the function is implemented and more on what it does. Change-Id: I3fff4a142e730431056cac1d2173e0d82440f8ec Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Fix race condition on mFrameCallbackPaul Olav Tvete2016-10-062-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | Don't try to destroy the callback from two different threads. This caused a crash with brcm-egl. Change-Id: Idcb18fca9ed7f84902b88212c0cebd67932a59d3 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Fix crash on client hidePaul Olav Tvete2016-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to check whether the buffer has content. Having a reference to a null buffer is just as bad as not having a buffer at all. Change-Id: I0bd31d0a70da2e21cda69e67d75ea5c8659c7c2a Task-number: QTBUG-56377 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Make sure we send frameSwapped signalsJohan Klokkhammer Helsing2016-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWaylandWindow::deliverUpdateRequest() may trigger a new requestUpdate, so we must clear the mUpdateRequested flag first, so we don't accidentally clear the flag that belongs to the next update. Fixes missing updates on brcm-egl. Change-Id: Ib0decd5e8eb58505ccb94e93de494163ce0fd2ec Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Document 3rd party code in Qt WaylandKai Koehne2016-10-044-0/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately the QPA plugin for Qt Wayland does not have a dedicated help, which is why everything is right now crammed into the compositor documentaton. Change-Id: Iddc4d67a817f2cc3bb334b2f040fa55230b5da4f Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | | Update plugins.qmltypesPier Luigi Fiorini2016-10-041-47/+121
| | | | | | | | | | | | | | | | | | Change-Id: I37087d2ec0905c63cdbb4783daf4a5e34b50ad12 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Add missing constructor implementationPaul Olav Tvete2016-10-041-0/+8
| | | | | | | | | | | | | | | Change-Id: I981ba99a33a5cb6dc5494ef3f72e70f1dfabfdbe Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Add QML API and documentation for ivi-applicationJohan Klokkhammer Helsing2016-10-046-1/+192
| | | | | | | | | | | | | | | Change-Id: I65504503f07477b05f7e645ee61544e62e728bdc Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Add mode support to QWaylandOutputPier Luigi Fiorini2016-10-037-121/+471
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Outputs usually have more than one mode, add an API to support them. When sizeFollowsWindow is true, modes are replaced by one with the window size and refresh rate. In that circumstance the mode changes when the window is resized. The sizeFollowsWindow property default value is no longer true. The setGeometry() method is gone as it doesn't make sense now, the setWidth() and setHeight() methods are now private slots to resize the resolution as the window resizes (and sizeFollowsWindow is true). Refresh rate is expressed in mHz rather than Hz just like the Wayland protocol. A compositor implementation may choose to add modes if it has access to hardware information, it will call addMode() for each mode and then invoke the setCurrentMode() method that sends the modes list to the client. The preferred mode is indicated with a boolean parameter to the addMode() method. Change-Id: Iffed4784ccef695c276ebd800172957f4cff3324 Task-number: QTBUG-49814 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Documentation: Remove tech preview statusJohan Klokkhammer Helsing2016-10-0316-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove "preliminary" and add "since 5.8". Also remove notice from readme about the API being in tech preview. Change-Id: I4ef1ffa4e23661f5a1e28c9e3207678be5b0435c Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Compositor: Send touch events to the surface pressedJohan Klokkahmmer Helsing2016-10-039-150/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the API so that QWaylandTouch does not make assumptions about touch focus, and consequently enables writing compositors where multiple clients can receive touch input at the same time. Task-number: QTBUG-56237 Change-Id: I21fe6d9b5ac65e9f910f64cc4a02824119571c52 Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Expose native buffer handlesPaul Olav Tvete2016-10-035-9/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is required for making accelerated compositors that do not use OpenGL. Change-Id: I76c735a971dc62344080aececc087c0495925b87 Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Refactor buffer handlingPaul Olav Tvete2016-10-0126-754/+919
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot support bindToTexture() functions. On some platforms the texture is provided by the driver. Therefore, the HW integration must always provide a texture. This has the added bonus of unifying the two separate code paths that were introduced when EGLStream support was added. Add a separate buffer manager that owns all buffers. Don't destroy buffer objects on release. The client will probably attach them again later. Also, release shm buffers immediately after uploading to texture (needs to be documented that image() will not work afterwards). Make the old SurfaceBuffer class into an abstract base class, so we can store state in the buffer class instead of having to map from the wl_resource in each buffer integration. Move the shared memory buffer handling into a separate subclass. Change-Id: I81e471d13c92913d31ea1efe487f93fa908b5e0c Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Include headers with full pathPier Luigi Fiorini2016-10-0110-15/+16
| | | | | | | | | | | | | | | | | | | | | Fix build of programs using the private API outside QtWayland. Change-Id: Ib43ed1be8df8be3cc7b67588003cd7f0a6ff6eb1 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Compositor: implement wl_shell maximize and fullscreenPier Luigi Fiorini2016-09-302-1/+72
| | | | | | | | | | | | | | | Change-Id: Iabdad67adfb9ef9574c89b1a72d1bf12406d985e Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Make QWaylandKeymap a QObjectJohan Klokkhammer Helsing2016-09-3014-86/+392
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to use defaultSeat declaratively by allowing it to be uninitialized until the QWaylandCompositor::create has been called. Change-Id: I962cc7cc82a0bbc9240abb50cf92dee77e4a0ba6 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | C++ API and tests for the ivi-application extensionJohan Klokkhammer Helsing2016-09-307-0/+671
| | | | | | | | | | | | | | | | | | | | | | | | | | | Note, this is only an implementation of the ivi-application extension, not ivi-controller which contains layer management interfaces. Task-number: QTBUG-53149 Change-Id: Ic5a31156de1768f846b714a9aee9bbf8a945cbbe Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Fix invalid write to random memoryPaul Olav Tvete2016-09-302-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | A wrong static_cast QWaylandSurface to a QWaylandCompositor led to wl_display_next_serial() incrementing an arbitrary value. Change-Id: I6ff92b8fd86fcef38fb10db2524dcf5aefae6d0a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Compositor: Base shell classPier Luigi Fiorini2016-09-3015-69/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Standard shell class with focus policy shared by all protocol implementations. The automatic focus policy gives focus to windows automatically as they are created, while the manual policy allows a compositor to decide what to do. Change-Id: Ica71271174b30e28217e31c53f1c8dd576752c5e Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Update xdg-shell protocol fileKai Koehne2016-09-281-26/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | Update xdb-shell.xml file to one from tag v1.9.0 in qtwebengine-protocols.git. This includes switch to MIT license, and also some doc updates. Change-Id: Ia4a565d73f2b25f8a2c41d0cde4c48ac5a793279 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Update ivi-application protocol to version 1.9.1Kai Koehne2016-09-281-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | This updates the license to MIT, which all of Wayland moves to. Change-Id: I91080d787f2930620941b421bf44164e02fcf637 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Return serial from sendTouchPointEventJohan Klokkhammer Helsing2016-09-285-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that sendFullTouchEvent does not return any serial, because it might result in multiple events being sent with different serials, choosing one doesn't make sense and returning a vector of them seems a little over the top since they won't be used most of the time. Change-Id: Ie38b57dae1c7553668b04d4a62f5a074d78f63dd Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Compositor: Return event serials from mouse press functionsJohan Klokkhammer Helsing2016-09-282-8/+20
| | | | | | | | | | | | | | | Change-Id: Idbfa41edc7bad23dcd606da56b99a85367006fe8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-204-2/+13
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/extensions/qwaylandxdgshell.cpp Change-Id: Ic45b930e01fec803287d63b6f2347f45b7638ffc
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-173-2/+7
| |\| | | | | | | | | | Change-Id: If43a69c30682eab4a40149a03c619047e84c9f6d
| | * Fix build with QT_NO_ACCESSIBILITYSamuli Piippo2016-09-162-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | The accessibility() function is ifdef'd in the base class, which makes build fail when Q_DECL_OVERRIDE is used here. Change-Id: Ic3d800ccf32b39f5bc8d3f94d222bc0d34457057 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Remove or add window decorations when toggling fullscreenJohan Klokkhammer Helsing2016-09-051-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-55343 Change-Id: I38e94a70585ba93d40de22698fda80530cf2156d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | Add missing mouse ungrab when touch endsJohan Klokkhammer Helsing2016-09-151-0/+6
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-54453 Change-Id: Ie8fadd89797cd7c9ff5bf00924706bd662bbd22d Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
| * | Doc: Add missing docs for a few QML typesVenugopal Shivashankar2016-09-021-20/+73
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-53147 Change-Id: I9d806a3ba7cdd8deec6e3928c157b43409c82630 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>