summaryrefslogtreecommitdiffstats
path: root/src/compositor/global
Commit message (Collapse)AuthorAgeFilesLines
* Fix incompatibility between QML and C++ instantiated objectsJohan Klokkhammer Helsing2018-08-291-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a source incompatibility introduced in 9ebba7c3a. In Qt 5.11 it was possible to have the following code: XdgShellV6 { property XdgToplevelV6 top onToplevelCreated: top = toplevel } After, 9ebba7c3a, however, this would fail because XdgToplevel refers to QWaylandXdgToplevelV6ParentClass, while QWaylandXdgShellV6::toplevelCreated emits a QWaylandXdgToplevelV6. It would also break instanceof, i.e.: onToplevelCreated: console.log(toplevel instanceof XdgToplevelV6) This patch reverts to C++ and QML using the same type (no subclassing for QML types), but still lets the items have children in QML by putting the macro inside each class instead. Task-number: QTBUG-70090 Change-Id: I8efa8f68ebc4dc2289b4a9b96402b0c00d45547d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Macro for QML items with data property boilerplatePier Luigi Fiorini2018-06-231-0/+36
| | | | | | | | | This macro gives items the ability to hold children. Use the new macro on various types to let compositors declare children from QML. Change-Id: I291cc69fc11653bc3d677d148e002330a3245173 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Don't call QWaylandCompositorExtension::initialize multiple timesJohan Klokkhammer Helsing2018-05-092-2/+3
| | | | | | | | | QWaylandCompositorExtension::initialize already had a guard to return early if called multiple times, sub-class implementations, however, may not include such checks. Change-Id: I088a240bdf6ebd8b77de7aab9d2c6953e55569e6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use override when applicableJohan Klokkhammer Helsing2018-02-281-2/+2
| | | | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-override. This adds the "override" keyword where it's possible and also removes the "virtual" keyword when redundant. Change-Id: I899950e5cf8782785d30a245a9c69c1720905d50 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Init variables where they are declared when possible (clang-tidy)Johan Klokkhammer Helsing2018-02-271-5/+2
| | | | | | | | | | | | | | | | | | | | 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>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-263-5/+5
| | | | | | | Change-Id: I9699a957430b8d3574ce29acb91b7ada9ea6209b Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix licensingv5.9.0-beta4Jani Heikkinen2017-05-044-48/+60
| | | | | | | | | | 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>
* Replace all occurrences of Q_DECL_OVERRIDE with overrideJohan Klokkhammer Helsing2017-01-232-4/+4
| | | | | Change-Id: I16b7b23efe944b49d1fcc9e7588cdb0a991cebd1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use the feature system internallyLars Knoll2016-11-235-58/+133
| | | | | | | | | 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>
* Include headers with full pathPier Luigi Fiorini2016-10-011-1/+2
| | | | | | | Fix build of programs using the private API outside QtWayland. Change-Id: Ib43ed1be8df8be3cc7b67588003cd7f0a6ff6eb1 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor: make the extensions property list optionalPaul Olav Tvete2016-07-122-0/+7
| | | | | | | | | | Extensions will now automatically add themselves to their parent if they are not inside an extensions [ ... ] array. Change-Id: I26c7f7c2ee023595eb4cd2496dd56e212f05329c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Add QQmlParserStatus interface to QtQuick extensionsPier Luigi Fiorini2016-06-231-0/+1
| | | | | Change-Id: I149dcc36aacf963ba0d4ef62230a491dc8be8046 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Compile with -Wzero-as-null-pointer-constantPaul Olav Tvete2016-05-251-2/+2
| | | | | | | | Task-number: QTBUG-53619 Change-Id: Idf073287f215113431cad64f85628e010176ab74 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove empty private class QWaylandExtensionTemplatePrivateJohan Klokkhammer Helsing2016-05-192-10/+0
| | | | | | | | Previous subclasses are now inheriting directly from QWaylandExtensionPrivate instead. Change-Id: I33ef88867fcf216a7b1441f69b7025bc2a4367dc Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Rename QWaylandExtension to QWaylandCompositorExtensionPaul Olav Tvete2016-05-185-73/+73
| | | | | | | | Since we have QWaylandClientExtension Change-Id: Ie8d60322c8e730bda651e06ed5db0fe1359d946e Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Automatically initialize the quick extension objectsGiulio Camuffo2016-04-292-2/+6
| | | | | | | | | Instead of writing "Component.onCompleted: initialize()" for every extension the compositor has, let them call that automatically. Change-Id: I0b499a38c2b475dc9a7ef27cbacebef19b196dbf Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Rename the quick extension macrosGiulio Camuffo2016-04-291-12/+12
| | | | | | | | | | | | This patch renames Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS to Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CONTAINER_CLASS and Q_COMPOSITOR_DECLARE_QUICK_DATA_CLASS to Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS to reflect better their purpose. Change-Id: I8947f8bd99d12d2dfb8572ee88c129128fe6cb2b Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Forward declare Wayland types in public headers.Volker Krause2016-04-201-1/+2
| | | | | | | | | | This has the nice side-effect that qtwayland now builds with Wayland headers in non-standard locations, as targets including these headers (such as the compositor QML API) no longer need to have Wayland include paths set correctly. Change-Id: Ifc1c71b4d61996a219150173341da461da772d22 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Change constructor argument types for QWaylandExtensionTemplateJohan Klokkhammer Helsing2016-03-081-2/+2
| | | | | | | | | | | | The constructor was using the incomplete type QWaylandExtensionTemplatePrivate, when in fact only QWaylandExtensionPrivate was needed. This was causing compilation issues with clang. Task-number: QTBUG-50265 Change-Id: Ie6ae6ac5aa6bc9f3cc63be181e44071ac9382b94 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Use WaylandCompositor module name for export macroPaul Olav Tvete2016-02-154-11/+11
| | | | | | | Change-Id: Ieb65b66f28986845f50647ae338678f0a1e7a153 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Erik Larsson <erik@ortogonal.com> Reviewed-by: Johan Helsing <johan.helsing@theqtcompany.com>
* Compile fix for namespaced Qt buildsPaul Olav Tvete2015-11-281-0/+4
| | | | | | Change-Id: Ie23f7c01331d5e52dcf30952d7ad9ade6ef5a5e0 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Fix copyright headersPaul Olav Tvete2015-11-093-3/+3
| | | | | | | | Old copyright headers were accidentally used for some new code. Change-Id: I0230d350e59701bc6b383c7c8151d52e34e8e75a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Add warning to private headersPaul Olav Tvete2015-10-231-0/+11
| | | | | | | We mean it. Change-Id: I7381c7aad198dcca485d488571fd12296d07f980 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Rename QWaylandExtensionContainer to QWaylandObjectPaul Olav Tvete2015-10-233-26/+39
| | | | | | | | | | Change the name, and make QWaylandExtension a subclass of QWaylandObject. This way, all extensions can have extensions of their own, without multiply inheriting. Change-Id: Ie06e764412d113f7a62399caa605a48b015c7d24 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Avoid double deletePaul Olav Tvete2015-10-021-3/+1
| | | | | | | | | Extension resources are destroyed by Wayland, and we delete the corresponding classes when that happens. This means that we must not delete the extensions when the container is deleted. Change-Id: I0842e40ab8e8861a623d0fcb47dfd3cf71417d4f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Rename QtCompositor to QtWaylandCompositorJørgen Lind2015-09-102-2/+2
| | | | | | | enable building QtWaylandCompositor by default Change-Id: I7cf34052b304ca9fef55b7e30ef6a6367b5d75f1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Cleanup QWaylandQuickCompositorExtension fileJørgen Lind2015-09-041-8/+2
| | | | Change-Id: I3f0e5a41f0bb15311bd48775be10d81548caf1e3
* Macro for QML extension boilerplateJørgen Lind2015-08-282-1/+112
| | | | | | | defines which gives type sub-classes which adds desired functionality for extensions in QML Change-Id: I3973e07e0daf0c27813b3405b9188281092f4375
* Make the default wl_shell available from QMLJørgen Lind2015-08-283-17/+104
| | | | | | | | | | | | | | This finaly ties together how to use QWaylandQuickItems with different shells It was required to decouple QWaylandView from the QWaylandQuickItem since QML doesn't play to well with muliple inheritance. The QWaylandQuickItem can be retrieved from the QWaylandView which is now conveniently a QObject. Also the QWaylandQuickItem owns the QWaylandView. This architecture also leaves room for creating a QWaylandWidget :) Change-Id: Ib8a00e6f17f0f1bfc3ff244753f021c76db22cb1
* Remove automatic initialisation of extensionsJørgen Lind2015-08-282-3/+3
| | | | | | | | | | It is the specific compositor application responsibillity to create the specific extensions. Some of the extensions are picked up with the QWaylandExtension::findIn(QWaylandExtensionContainer *) function to work around missing events/apis. It should be a goal not to have these calles in the base implementation of QWayland[Compositor|Surface|Input..]. Change-Id: Iacd576f2e8a79ca0165b858b1e8f44cddad48d93
* Fix Compile errors and warningsPaul Olav Tvete2015-08-281-4/+4
| | | | Change-Id: I2caba2c9de7823214f20529437453c3df02b7b37
* rename QWaylandExtensionTemplate::get to findInJørgen Lind2015-08-281-1/+1
| | | | Change-Id: I7fcfd2e4974cf1b5b32592a6d5c03ed335a9f446
* Improve QWaylandExtensionJørgen Lind2015-08-283-53/+34
| | | | | | | | By using curiously recurring template pattern we can generate a getter which is very convenient, and all QWaylandExtensions should have this casting operation Change-Id: Idb5a786655f2e106cf5388b11ed71e8b6ddddec0
* Public input apisJørgen Lind2015-08-281-1/+1
| | | | Change-Id: I60ec2fd9f4afe54198d9c476b28f9f15a661e9ca
* Rework how we manage extensionsJørgen Lind2015-08-284-1/+304
| | | | Change-Id: If2cbf096e7419bc1bda007d5167ce39d1a5d50ae
* LGPL v3 license change for Qt Wayland CompositorJørgen Lind2015-07-241-30/+26
| | | | Change-Id: I84ed248b471464214d935352768f300d4b90dec3
* Update copyright headersJani Heikkinen2015-02-171-4/+4
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I5a74d32515c3f1fe7aa1916f4241c92832510f8c Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-09-191-1/+3
|\ | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwlcompositor.cpp Change-Id: Ica26e33eb2b77ed5be0e84e8f4256d2e85abfaf5
| * Compile with protected visibilityThiago Macieira2014-08-191-1/+3
| | | | | | | | | | Change-Id: I64fc922122e407487083c86d2a9617beea32507b Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Expose surface's client to QMLPier Luigi Fiorini2014-08-171-2/+0
|/ | | | | | | | | | | | | | | Introduce QWaylandClient class that wraps wl_client credentials and has a method to destroy the client. Add QWaylandClient object as a QWaylandSurface property. This come in handy for example when the compositor wants to kill the process of an unresponsive surface or wants to know client credentails. WaylandClient typedef is now useless thus is replaced by QWaylandClient. Change-Id: I997ec459af0f19baef67e7420c90937b197b2e1d Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Remove QWaylandResourceCollection.Robin Burchell2014-08-153-175/+1
| | | | | | | Dead code, apparently previously related to clipboard. Change-Id: I7b29a8d1730d7b28365cb293df95c6b71b8fdbc0 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Remove unused QtWayland::ObjectJan Arne Petersen2013-08-222-70/+0
| | | | | Change-Id: I671a22602b1590a8ff5a7055cc2d9c6ca29a691f Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Adapted Surface and Region to use the qtwaylandscanner.Samuel Rødal2013-04-231-30/+0
| | | | | | | | This requires some slight additions to the qtwaylandscanner to handle the pattern of the wl_resource not being owned by the generated class. Change-Id: Ia49c8129cee3a203ca9a727e83fafd3dfc653e75 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Adapted code to use qtwaylandscanner.Samuel Rødal2013-04-172-8/+14
| | | | | | | | | | | | We include the wayland.xml since we need to generate bindings for the core protocol as well. Also, WAYLANDSOURCES has been split into WAYLANDSERVERSOURCES and WAYLANDCLIENTSOURCES since we need to produce different output in the server and client cases. Change-Id: I0bd493d41ca6b26dfd2d9b1463d4b762786537f9 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Qt-ify the QtCompositor moduleAndy Nichols2013-02-085-11/+29
| | | | | | | | | | | | | | | | | | | | Currently the QtCompositor library and API do not follow the Qt API naming conventions. This commit intends to fix these inconsistencies. filenames start with q headers containing private API's end in _p public API classes begin with Q use the qt namespace macros where necessary Wayland namespace is now QtWayland wayland_wrapper classes are now private API's It's important to make these changes not just for stylistic reasons, but also because when qmake builds the module in checks for these conventions to determine how to deploy the include files. Change-Id: I8bfadeceda92a0f52cb73c704551da75540e7587 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-254-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie65cbe0c622780d2f0672bce19d267d1167620ff Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Sync up with the latest wayland developments.Hannu Lyytinen2012-04-192-9/+5
| | | | | | | | | | This commit makes the qtwayland module compatible with wayland sha1 677c5180e67be18b7a0867fafb7f205b57a6e9ff. Change-Id: I5af0510034b7e4a038313b80f1f6e0b18fa48eb3 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Don't use poor mans inheritance for waylandobjectJørgen Lind2012-04-111-8/+5
| | | | | | | | | We'r programming in C++ afterall :) This will let us use virtual functions in subclasses and multiple inheritance. Change-Id: I69647fa3197cbb33fb70e771470d7af07f8011f5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Introduced WaylandClient API to keep track of clients.Samuel Rødal2012-03-291-0/+2
| | | | | | | | | Makes it easier to keep track of which surfaces belong to a given client, and the client associated with a given surface. WaylandClient is an opaque type, representing an underlying wl_client *. Change-Id: If21a2e02eb13a860e6ac641875bdcca67a53fdf5 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Improve wayland_cast and introduce resolve to simplify code.Samuel Rødal2012-03-021-16/+26
| | | | | | | Resolves the wl_resource by accessing the data member. Change-Id: I10912acea0a3ca6abbc067d07d43a46ec65a77aa Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>