summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions/qwaylandxdgshellv5.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecated codeEskil Abrahamsen Blomfeldt2020-07-071-1564/+0
| | | | | | | | | | | | | | | | | XdgShellv5 and XdgShellv6 have been deprecated in the compositor since 5.15, and wl-scaler since 5.13. These are now removed. Since the qwindow-compositor has not been updated for a long time, it depends on the outdated protocols. This change removes it, since it no longer represents best practices. This means we will be missing a proper C++-based compositor for now, so we will have to create a new one later. Change-Id: Icc6ef97c17e553f266c4145abeef26ddd631d6bf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-081-4/+4
| | | | | | Task-number: QTBUG-84469 Change-Id: I4bc7b2eb2913fc828f09f96e21480b76cabf8656 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Compositor: Deprecate XdgShell unstable v5Johan Klokkhammer Helsing2020-02-051-0/+10
| | | | | | | | | | | | | A stable version of XdgShell has been released. Since xdg-shell v5 is quite different from both the stable version and wl-shell with regards to how configure events work, it would be a maintenance burden to keep supporting it in Qt 6. [ChangeLog][Compositor] XdgShellV5 has been deprecated, use XdgShell instead. Task-number: QTBUG-81853 Change-Id: I06ffc676cb8c9c1a46de30eef59ceef8bb0ff7a3 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Doc: Fix documentation warningsTopi Reinio2019-11-131-1/+38
| | | | | | | | | | | | | | | Add missing function and function/qml method parameter documentation, linking issues, and other minor tweaks. QDoc fails to parse a Q_PROPERTY if the property type includes the keyword 'enum' - fix that in the header file for QWaylandXdgToplevel::DecorationMode. These changes bring the currect warning count to zero. Fixes: QTBUG-79817 Change-Id: I302b110eb91858f06e9cd410872a12365d421a8e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Update QtWaylandCompositor license headers to GPL 3v5.14.0-beta2Paul Olav Tvete2019-10-161-15/+5
| | | | | | | | | | | | As announced on the mailing list, QtWaylandCompositor licensing is changing to GPLv3: https://lists.qt-project.org/pipermail/development/2019-October/037666.html Change-Id: I4bdc1aa5914e53ac760acc2b6453355af636baa9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Johan Klokkhammer Helsing2019-09-161-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddatadevice.cpp src/client/qwaylandinputcontext.cpp src/client/qwaylandinputdevice.cpp src/client/qwaylandwindow.cpp src/compositor/compositor_api/compositor_api.pri src/compositor/compositor_api/qwaylandquickitem.cpp Change-Id: Ice0d8c7d869c9c46113d6ee6ba3adf895a71d58f
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-081-3/+3
| |\ | | | | | | | | | Change-Id: I5d587b79b96d2b44f1975419a658c259c63fa30d
| | * Make QT_WAYLAND_COMPOSITOR_QUICK a featureUlf Hermann2019-08-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The define was only set when building Qt, not when including public headers in application code. Therefore, the sizes of objects did not match between the client code that calls new and the constructor inside Qt. Unfortunately, adding the additional members breaks binary compatibility. This has already happened between 5.11 and 5.12. It just wasn't apparent from the headers. If we removed the members again now, we would break binary compatibility again. Therefore, the best course of action seems to be acknowledging the break and adding the members also in the headers. [ChangeLog][Compositor][Important Behavior Changes] Between version 5.11 and 5.12 binary compatibility for the wayland compositor module was broken by adding an additional member to various classes. This was not apparent from user code as the member was behind an #ifdef which would only be set while compiling Qt. As several versions of Qt incompatible to 5.11 have already been released now, rolling back the incompatible change would introduce further incompatibility. Therefore, the change is made consistent by unconditionally adding the member to the headers. Fixes: QTBUG-75677 Change-Id: I3c1ee309ad8e0cd0b6389a76fd1d91e6e2be495c Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | QWaylandXdgShellV5: optimize closeAllPopups()Marc Mutz2019-06-051-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code iterated over QMultiMap::keys(), calling QMultiMap::value() for each key, reversed the list returned by values() and then iterated over it to call sendPopupDone(). The QMultiMap is keyed on a pointer type, so the order of keys is unspecified. We can therefore simply iterate backwards over the QMultiMap, and just call our function that way. The order in which the keys are visited is reversed, but since they are unordered, this does not change behavior. Since we iterate backwards, we will visit popups for the same key in the same order the old code did. Except we don't create 1 + N new containers in doing so. Only problem: well-maintained QMultiMap doesn't have rbegin()/rend(), yet, so roll our own std::make_reverse_iterator for easier porting later. Change-Id: Ibec35cb4262dd5bb19c74821e85baa956f67dd05 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Eradicate Q_FOREACH loops [1/2]: trivial casesMarc Mutz2019-05-211-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch, we port Q_FOREACH loops to C++11 ranged-for loops. All cases are trivial in the sense that either the argument is already const or is trivially marked as const, either by qAsConst(), or, in the case of rvalues, by storing to a const auto temporary first. In addition, all loop bodies are clear enough to confirm that the container we iterate over is not changed under iteration. This does not exclude cases where a loop is prematurely exited just after calling a modifier on the container, as that is safe, if not especially elegant. Change-Id: I87a63f07797437d421567d60e52305391a3c4f21 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | QWaylandXdgShellV5: make xdgSurfaceFromSurface() const-correctMarc Mutz2019-05-171-2/+2
|/ / | | | | | | | | | | | | ... and replace a Q_FOREACH with a C++11 ranged-for loop. Change-Id: I0e77bc51a53c5141217465152be1913539da0968 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Make QtWayland.Compositor available under 1.QT_MINOR_VERSIONJohan Klokkhammer Helsing2019-05-011-3/+5
| | | | | | | | | | | | | | | | | | | | It was already available under 1.13, but this ensures it will stay available for future minor versions of Qt and also use the latest minor version in the examples. Fixes: QTBUG-74042 Change-Id: I4a6a4f762ed0af565af32931971a1df7f33a3ba1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Add convenience for converting wl_resource * to wrapper typesJohan Klokkhammer Helsing2018-11-211-8/+7
| | | | | | | | | | Change-Id: Ieb2f9706ac707ff878165d3f9001e4a28b8ff1ce Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Fix coordinate system inconsistenciesJohan Klokkhammer Helsing2018-11-161-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | Several properties were using pixel coordinates and surface coordinates without converting. [ChangeLog][Compositor] QWaylandSurface::destinationSize has been added which returns the size of the surface that will be displayed on the screen in surface coordinates. [ChangeLog][Compositor] Fixed a bug where QWaylandSurface::inputRegionContains would return true for some points outside surfaces with buffer scale > 1. [ChangeLog][Compositor] Fixed a bug which caused ShellSurfaceItems for surfaces with buffer scale > 1 to move too much when resizing interactively. It also gets rid of all calls to QWaylandSurface::size, which confusingly returns the size of the surface's buffer in pixel coordinates. Most properties now use destionationSize's surface coordinates consistently. Hopefully, QWaylandSurface::size can be renamed or removed in Qt 6. Change-Id: I007256a8df7759cf74fbfd51624fa1f90c083336 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Use customized version of generated files for xdg-shell-v5Johan Klokkhammer Helsing2018-08-141-4/+4
| | | | | | | | | Checking in wayland-scanner and qtwaylandscanner generated files with renamed symbols to avoid conflicts with xdg-shell stable. Task-number: QTBUG-66784 Change-Id: I1b1a055d3be12bfa7d16e7bb7209e96497cbf28c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor API: Deprecate xdg-shell unstable v5Johan Klokkhammer Helsing2018-08-101-0/+12
| | | | | | | | | | | The shell extension is not much used anymore, and needs a lot of hacks to build. It should eventually be removed to ease maintenance. [ChangeLog][Compositor API] xdg-shell unstable v5 is now deprecated. Existing applications should migrate to v6. Change-Id: Ic77ff8e6183c20271a5298952f47ab2789cfab89 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Doc: Add missing dots (qtwayland)Paul Wicking2018-06-191-1/+1
| | | | | | Task-number: QTBUG-68933 Change-Id: I02ba2e659d21923934dab970af23856b45ff1570 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor: Don't call send_configure variants with an invalid sizeJohan Klokkhammer Helsing2018-03-151-0/+4
| | | | | | | | Print a warning and return instead. Change-Id: I1db5109f633ee2dc7d252b387c207f474784da43 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Compositor API: Don't try to configure negative sizesJohan Klokkhammer Helsing2018-03-151-1/+2
| | | | | | Change-Id: Ie9df312a1926ea5190f6e91268b8920ad519d794 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Init variables where they are declared when possible (clang-tidy)Johan Klokkhammer Helsing2018-02-271-15/+1
| | | | | | | | | | | | | | | | | | | | clang-tidy -p compile_commands.json $file \ -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' \ -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' \ -header-filter='qtwayland' \ -fix Afterwards I ran search and replace on the diff to clean up some whitespace errors: - Replaced '(\n\+[^:\n]*)(:\s+\+\s+)' with '$1: ' - Replaced '(\n\+[^,\n]*)(,\s+\+\s+)' with '$1, ' - Replaced '\n\+\s*\n' with '\n' I also had to do some manual edits, because for some reason, this particular clang-tidy check doesn't trigger for some files. Change-Id: I3b3909bac4bf20108bbe8ad1e01bcc54236dae1b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix broken documentationJohan Klokkhammer Helsing2017-12-051-7/+2
| | | | | Change-Id: I16f11c32c861908e34de0cb28c8ad51378aa6e61 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Fix various documentation errors for QML methods and signalsJohan Klokkhammer Helsing2017-11-231-5/+5
| | | | | Change-Id: I9461fae92ec3d41e4f9e866a6a4fa7554a309ecd Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Add documentation for XdgShellV5 signalsJohan Klokkhammer Helsing2017-10-241-0/+92
| | | | | Change-Id: I6bb9385c709537a3ad924ad936bb87747e2ced7a Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Add documentation for XdgSurfaceV5 signalsJohan Klokkhammer Helsing2017-10-201-1/+129
| | | | | Change-Id: If1e3304cb9a8da2aeb20802759370bc2f0f476dd Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Compositor documentation: Specify return types for objectsJohan Klokkhammer Helsing2017-10-171-7/+7
| | | | | | Change-Id: I9ff21c7d8b085be8fbcb102b5284ec1ac5dfb40b Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Documentation: Fix missing renames from Xdg* to Xdg*V5Johan Klokkhammer Helsing2017-10-021-26/+26
| | | | | Change-Id: Ia60e20a15151a76c337872bf46b4d09da519387c Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* The ping method belongs to XdgShellV5, not XdgSurfaceJohan Klokkhammer Helsing2017-09-271-1/+1
| | | | | Change-Id: I9f2ed6411ab0e24a2a6e6f194abe3ffaaba96756 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Fix licensingv5.9.0-beta4Jani Heikkinen2017-05-041-12/+15
| | | | | | | | | | Currently tests are licensed under GPL-EXCEPT, examples under BSD and src under LGPL so replase old license headers with new & proper ones. Also remove old & unused license files Task-number: QTBUG-57147 Change-Id: Ia6a738798736c275dc309ccfa5b627dc2178d241 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: add info about parametersNico Vertriest2017-04-261-4/+4
| | | | | | | | | | qwaylandquickitem.cpp:1076: warning: Undocumented return value qwaylandxdgshellv5.cpp:614: warning: Undocumented parameter 'client' in QWaylandXdgShellV5::ping() qwaylandxdgshellv5.cpp:614: warning: No such parameter 'pong' in QWaylandXdgShellV5::ping() Change-Id: I9d058ba64f75285d1dd0591c2cc21987cabfe4bb Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
* Add missing documentation for XdgShellV5v5.9.0-beta3Johan Klokkhammer Helsing2017-04-211-0/+64
| | | | | | Change-Id: I96fa1d37b42bfc2cc0a10aafbc2021a8d5b8fd16 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Doc: completed undocumented itemsNico Vertriest2017-03-131-3/+3
| | | | | | | | qwaylandseat.cpp:153: warning: Undocumented enum item 'DefaultCapabilities' qwaylandxdgshellv5.cpp:1089: warning: Undocumented parameter 'position' Change-Id: I962c073e016965bc9378f101aca38cd86a7a8047 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Merge remote-tracking branch 'origin/5.8.0' into 5.8Liang Qi2017-01-261-0/+1
|\ | | | | | | | | | | | | Conflicts: src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h Change-Id: Ie45a13d3c866d0503e6e31b2a53b70f3420c5066
| * compositor: Add QWaylandXdgPopupV5 position property notifyv5.8.0Pier Luigi Fiorini2017-01-091-0/+1
| | | | | | | | | | | | | | | | | | 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>
* | compositor: Set windowType property for QWaylandXdgSurfaceV5Pier Luigi Fiorini2017-01-191-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | QWaylandShellSurface has a windowType property, set that instead of keeping the window type as an internal detail. QWaylandXdgSurfaceV5 now behaves like QWaylandWlShellSurface. [ChangeLog][Compositor] QWaylandXdgSurfaceV5 now sets the windowType property and behaves like other shell surface implementations. Change-Id: Iffd91adaff7a2caab3c15b56b839ae2251cf8324 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Fix potential undefined behaviorJohan Klokkhammer Helsing2016-12-091-0/+1
|/ | | | | | | Don't leave QWaylandXdgSurfaceV5Private::m_xdgShell uninitialized. Change-Id: Ib18ebf29d3dbae020f5d48f4c81c01ed2f1c473e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Doc: Added missing documentation for certain parametersNico Vertriest2016-11-031-5/+7
| | | | | | | 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>
* Documentation: Remove tech preview statusJohan Klokkhammer Helsing2016-10-031-2/+2
| | | | | | | | | 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>
* Fix invalid write to random memoryPaul Olav Tvete2016-09-301-1/+3
| | | | | | | | 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-301-3/+3
| | | | | | | | | | | | 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>
* Compositor API: Add closeAllPopups method to QWaylandWlShellJohan Klokkhammer Helsing2016-09-201-0/+10
| | | | | | | | | | 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 the QWaylandXdg* classes to QWaylandXdg*V5Giulio Camuffo2016-09-051-0/+1190
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>