summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add mode support to QWaylandOutputPier Luigi Fiorini2016-10-0319-138/+565
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0317-32/+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-0132-798/+941
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Update git ignore listPier Luigi Fiorini2016-10-011-4/+7
| | | | | Change-Id: I923d42ecc85e798d8f848cd77f847e2a7c9a9559 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-3017-91/+485
| | | | | | | | | 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>
* Make the custom extension example more interestingPaul Olav Tvete2016-09-3011-95/+470
| | | | | | | Define a protocol that does something visible. Change-Id: I29133eeffbb2c98a61ee59b241dcf6a6a0f543cb Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* C++ API and tests for the ivi-application extensionJohan Klokkhammer Helsing2016-09-3011-1/+863
| | | | | | | | | 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>
* Follow surface isMapped property renamePier Luigi Fiorini2016-09-301-2/+2
| | | | | | | | With b7075b72200b7b087e2c34fa449737970981ccea the QWaylandSurface::isMapped property was renamed to hasContent but this example wasn't updated. Change-Id: I9b13fa3a17ffcc3d6d8be19b59552f61b25bb64b Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor: Base shell classPier Luigi Fiorini2016-09-3017-72/+331
| | | | | | | | | | | | 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>
* Compositor: Add a spanning screens exampleJohan Klokkhammer Helsing2016-09-275-0/+201
| | | | | | | | | This example shows how one application can be displayed full screen spanning two screens. The intended use case is for running applications with lots of scrolling content, such as a web browser. Change-Id: Icba2715aa7ccd79c9d44c7e1d621bfdd9e51e66c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-205-2/+43
|\ | | | | | | | | | | | | Conflicts: src/compositor/extensions/qwaylandxdgshell.cpp Change-Id: Ic45b930e01fec803287d63b6f2347f45b7638ffc
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-174-2/+37
| |\ | | | | | | | | | Change-Id: If43a69c30682eab4a40149a03c619047e84c9f6d
| | * Merge remote-tracking branch 'origin/5.6.2' into 5.6Liang Qi2016-09-161-0/+30
| | |\ | | | | | | | | | | | | Change-Id: I011101285c6aa594aea81271c86887c669a41e9e
| | | * Add changes file for 5.6.2v5.6.2Antti Kokko2016-09-131-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibb98081ddd226187212936949ca70bf1339c05aa Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| | * | 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>
* | | 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-208-45/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Warn if using QWaylandClientExtension without a Wayland pluginJohan Klokkhammer Helsing2016-09-191-0/+5
| | | | | | | | | | | | | | | | | | Change-Id: Ibbf6acab4af45a6b17089bd3809c33a199dc89f6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | | Only bind the extension oncePaul Olav Tvete2016-09-181-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I014269a19ca569298df91c2c329193e5ee5ff9c5 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Cleanup and null ptr checkPaul Olav Tvete2016-09-181-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't crash if we ask for the surface before the window is created. Also clean up NULL/0/nullptr and a c-style cast. Change-Id: I2a5a66ee76a3a12c8ca32847dbe30cc640e924c2 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Fix FramelessWindowHintPaul Olav Tvete2016-09-182-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | setFlags() works just like setWindowState(): we have to use the supplied parameter because the window's state hasn't been updated yet. Change-Id: I223e01ef192f30911697e449669e745f0ad59d99 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | | Simplify custom-extension examplePaul Olav Tvete2016-09-0816-70/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't confuse people by creating the extension inside a platform plugin. It's only necessary when modifying Qt's default behaviour, and we're not going to teach that in this example. Also remove the load/unload extension logic from the qml example. Don't make people believe that they have to use a loader. Change-Id: Id263bb7d77fba176bfb8b6843a6ece9a0a203754 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | | Rename QWaylandView::attach() to bufferCommitted()Paul Olav Tvete2016-09-084-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0514-448/+448
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Don't assume we always have a shellPaul Olav Tvete2016-09-052-4/+3
| | | | | | | | | | | | | | | | | | | | | The mininimal-cpp compositor example does not have any shell extensions. Change-Id: Ifec2822ef4f5944eed02c19ddfc47419051364a4 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Merge remote-tracking branch 'qt/5.7' into 5.8v5.8.0-alpha1Liang Qi2016-08-2865-289/+1254
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Merge remote-tracking branch 'qt/5.6' into 5.7Paul Olav Tvete2016-08-264-8/+26
| |\| | | | | | | | | | Change-Id: I6784a53fcc2f0f68b8e916181cb8cdef263782b8
| | * Merge remote-tracking branch 'qt/5.6.2' into 5.6Paul Olav Tvete2016-08-263-7/+17
| | |\ | | | | | | | | | | | | Change-Id: Ie6ec1ae90396619214cf1f29ae9595c5f1915e10
| | | * Client: Fix keyboard focus logic and crashJohan Klokkhammer Helsing2016-08-263-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous solution did not check for nullptr before dereferencing, which caused a crash. Furthermore, it checked the new ShellSurface's shellManagesActiveState before deciding whether to unfocus the old one. Task-number: QTBUG-55526 Change-Id: I410b6200a5b7b86806f70970730045a4a25f21db Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * | Pass TRANSIENT_INACTIVE flag for windows with WA_ShowWithoutActivatingMartin Gräßlin2016-08-261-1/+9
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting a transient window also evaluate the state of the window attribute WA_ShowWithoutActivating. If that flag is set the transient should get the inactive flag as well. Task-number: QTBUG-55403 Change-Id: I757e5527e78f730a440e26abb52e84c9b2bb2f3a Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| * | Doc: Language editVenugopal Shivashankar2016-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | Removed a misplaced article. Change-Id: Ic78170156569b75d9ff577c8a34fd1bda48859c3 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-2326-61/+73
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/compositor/compositor.pro tests/auto/compositor/compositor/compositor.pro Change-Id: Id9f3cf97ca3b600bdafba846908643ff0f8964b9
| | * Fix autotest directory structurePaul Olav Tvete2016-08-1926-57/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | The client and server parts are separate modules, so they need separate top-level directories under tests/auto. This also makes it easier to add new tests later. Change-Id: I393341b6f4e8fc3afa480653f3482192e002e425 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| | * Fix crash on client exitWieland Hagen2016-08-181-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backported fix from the 5.7 branch. Original patches: 93ca929fb9caf347150 and d6fe7b6165859e17f03 Change-Id: Iaec5acb314d3bbc199e962a5dc27a70f0d2df655 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> 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>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-1122-57/+966
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddisplay.cpp src/client/qwaylanddisplay_p.h src/client/qwaylandxdgpopup_p.h Change-Id: If86ea09971773dc6c541f07819459a90e8ab73a0
| | * Client: Fix popup position for xdg shellJohan Klokkhammer Helsing2016-08-106-1/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Popups used xdg_surface instead of xdg_popup. It's not possible to set a position for an xdg_surface, because it's supposed to be a top level window (in xdg shell v5). Consequently, popups were treated as top level windows and positioned randomly on Weston. Using xdg_popup instead solves the problem. Task-number: QTBUG-55063 Change-Id: I223348677ef8a1ef1eee6a4c389276a6c802bcb5 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>