summaryrefslogtreecommitdiffstats
path: root/src/compositor
Commit message (Collapse)AuthorAgeFilesLines
* compositor: Add QWaylandXdgPopupV5 position property notifyv5.8.0Pier Luigi Fiorini2017-01-092-1/+3
| | | | | | | | | The property changes at initialization time hence it needs to notify changes. Change-Id: I5f6bc51da69abce387ac31cecfff4c7362501eb0 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix crash on client exit with popupPaul Olav Tvete2016-11-251-1/+1
| | | | | Change-Id: Ideb7a07dbeae5829334a8d8ce685c6bbdfd495d2 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Doc: Drop the dummy "Tech. Preview" node from the navigation breadcrumbVenugopal Shivashankar2016-11-241-1/+0
| | | | | | | Qt Wayland Compositor is a fully supported add-on module now. Change-Id: Icd742e019be4b516227f9e4a976dcd87014e3251 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use new feature system, part 2Lars Knoll2016-11-236-19/+20
| | | | | | | | | Convert all uses of QT_NO_FOO to proper QT_CONFIG(foo) checks. Change-Id: Id0f0b3325c246567a43d6b2d71b0d69e5535e648 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Use the feature system internallyLars Knoll2016-11-2342-132/+199
| | | | | | | | | Get rid of almost all DEFINES += ... in the pro files, instead use the proper QT_CONFIG() macro to determine whether a feature is available. Change-Id: I867769be2085c6ba93b6815e223e2b89edcb245d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Move qtwayland over to use the new configuration systemLars Knoll2016-11-234-14/+104
| | | | | | | | | | | | | Re-use configuration results from qtbase where possible and move all pkg-config handling over to be done at configuration time. Since waylandclient and waylandcompositor are two independent libs, this required some duplication of features and libraries used by both in the configure.json files. Change-Id: I1f3ec56c85cb780324cc7634a3ad7951125853a0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Only send mouse move event when mouse movesPaul Olav Tvete2016-11-222-1/+8
| | | | | | | | | Qt Quick recently changed to send hover events 60 times per second even if the mouse doesn't move. Make sure we only send mouse move events over the Wayland protocol if the mouse actually moved. Change-Id: Ic196512dde1718de461eb2c64cec2e95e220ce89 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Don't crash when surface is destroyedPaul Olav Tvete2016-11-175-16/+17
| | | | | Change-Id: I082c3bb0003265c625d165e1463951842a730c11 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Fix crash with nested xdg popupsPaul Olav Tvete2016-11-171-2/+6
| | | | | | | | | | | Popups that are children of popups would get a null parent in pure-qml. This would cause a crash in XdgPopupV5Integration. This change fixes pure-qml to set the parent correctly, and also adds null pointer checks to XdgPopupV5Integration. Change-Id: Ica5bd6c1a0853fbec1b30bc6ffff806b2cfd15f8 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Declare QWaylandOutputMode as a movable typePaul Olav Tvete2016-11-151-0/+1
| | | | | | | Based on API review comment from Lars. Change-Id: Id48a24218a3bce18d002fc4555b3c332b4b0fa49 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Add missing override to initialize in QWaylandIviSurfaceRobert Loehning2016-11-141-1/+1
| | | | | Change-Id: I341a8969bcdf31a84e29778312e249277797e510 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor: Set view output in QWaylandQuickItem::init()Johan Klokkhammer Helsing2016-11-142-1/+8
| | | | | | | | | This fixes a crash when the constructor of QWaylandXdgPopupV5Integration tries to access the output scale factor. Change-Id: I3cafee7a47b18e1025044b35d4578c7a6258eee4 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* 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>
* 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>
* 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 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>
* Document 3rd party code in Qt WaylandKai Koehne2016-10-041-0/+14
| | | | | | | | | 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>
* 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-045-1/+187
| | | | | 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-033-2/+25
| | | | | | | | | 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-0118-485/+551
| | | | | | | | | | | | | | | | | | | | | | | | | 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-015-7/+8
| | | | | | | 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-3013-86/+390
| | | | | | | | | 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-3014-69/+326
| | | | | | | | | | | | 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>
* 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-201-0/+6
|\ | | | | | | | | | | | | Conflicts: src/compositor/extensions/qwaylandxdgshell.cpp Change-Id: Ic45b930e01fec803287d63b6f2347f45b7638ffc
| * 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>
* | Emit signals for compositor propertiesPier Luigi Fiorini2016-09-202-3/+31
| | | | | | | | | | | | | | | | Allow property binding from QML and add a created property that is set to true after the initialization. Change-Id: I923eedc793660b4ea18372eb0182eae0bcca436d Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Compositor API: Add closeAllPopups method to QWaylandWlShellJohan Klokkhammer Helsing2016-09-206-27/+58
| | | | | | | | | | | | | | | | | | | | The WlShell implementation now matches xdg shell. Also adds a convenience method to QWaylandWlShell to get all popups. QWaylandWlShellIntegration and qwindow-compositor uses this new API. Change-Id: Ibfe3323ad7f56d43379785582b9be6801905a485 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | Rename QWaylandView::attach() to bufferCommitted()Paul Olav Tvete2016-09-083-7/+11
| | | | | | | | | | | | | | | | | | | | The old name was wrong on two counts: first of all, the function is called on wl_surface.commit, not attach. Secondly, the imperative tense made it look like a function that can be called by the user. Change-Id: Icd872d430062e67154bd50ca7d79881ea9874152 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | Rename the QWaylandXdg* classes to QWaylandXdg*V5Giulio Camuffo2016-09-056-380/+380
| | | | | | | | | | | | | | | | This frees the QWaylandXdg name for the hopefully coming stable version of xdg-shell. Change-Id: I9beb9b035c6497fb45bee5c9104485b564ca0619 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'qt/5.7' into 5.8v5.8.0-alpha1Liang Qi2016-08-2816-161/+185
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/compositor_api/qwaylandseat.cpp src/compositor/compositor_api/qwaylandview.cpp tests/auto/compositor/compositor.pro tests/auto/compositor/compositor/testinputdevice.cpp tests/auto/compositor/compositor/testinputdevice.h tests/auto/compositor/testinputdevice.cpp tests/auto/compositor/testinputdevice.h tests/auto/compositor/testseat.cpp tests/auto/compositor/testseat.h Change-Id: I98e045908dd964e5d4120bd35e71b8839c0d923a
| * Doc: Language editVenugopal Shivashankar2016-08-241-1/+1
| | | | | | | | | | | | | | Removed a misplaced article. Change-Id: Ic78170156569b75d9ff577c8a34fd1bda48859c3 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Fix incorrect documentation for QWaylandInputDeviceJohan Klokkhammer Helsing2016-08-181-1/+1
| | | | | | | | | | | | | | | | A QWaylandInputDevice is not actually an input device, but a group of keyboards, pointer and touch devices. Change-Id: Ib22f8cc71670cf83c70798d9eb24d48a04398b22 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Doc: Language editsVenugopal Shivashankar2016-08-1715-151/+167
| | | | | | | | | | | | | | Task-number: QTBUG-53147 Change-Id: I353cf18b9661b5eb2371072f8091dc890fc7fcf0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * Doc: minor link issues in qtwaylandNico Vertriest2016-08-104-12/+19
| | | | | | | | | | Change-Id: I0dd4d0262818ee622f9572506d4025e586f5674b Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | Remove QWaylandView from the QML APIPaul Olav Tvete2016-08-226-17/+90
| | | | | | | | | | | | | | | | | | | | QWaylandQuickItem already encapsulates the view. Also rename the confusing 'discardFrontBuffers' property to 'allowDiscardFrontBuffer' Change-Id: Ibd74ad54bfe3d5187c2ed91ff0378b45e144e109 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Rename QWaylandSurface::isMapped to hasContentJohan Klokkhammer Helsing2016-08-227-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | compositor: Add shell property to xdg-shellPier Luigi Fiorini2016-08-152-0/+44
| | | | | | | | | | | | | | | | | | Add a shell property to QWaylandXdgSurface and QWaylandXdgPopup like QWaylandWlShellSurface. Change-Id: Id321f2ba8a48284c31fe67c4600c86f5c134b68d Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>