summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandcompositor.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Subsurface implementation, with C++ APIPaul Olav Tvete2016-02-041-2/+12
| | | | | | | | | This adds support for subsurfaces to QWaylandCompositor and QWaylandSurface. Task-number: QTBUG-49809 Change-Id: I2fa9ee4dcd1f48a2a28dab536f9cd6edc716e42b Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
* update plugins.qmltypesShawn Rutledge2016-01-051-1/+2
| | | | | | | | | This requires a couple of null pointer checks because of the platform plugin that qmlplugindump uses. Change-Id: Icb7c0ac1c71ddf69f6c3d9e0013dd6b5e2ef5ab9 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Try to get wl_display from the platform pluginPaul Olav Tvete2015-11-061-2/+6
| | | | | | | | | Some platforms require that the platform plugin creates the wl_display. If so, use that one. Change-Id: Ice7e0f79d525c0c7c1f79794dd6719ff8c3c7c80 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Add documentation to Qt Wayland CompositorEskil Abrahamsen Blomfeldt2015-10-261-7/+227
| | | | | | | | | | | This adds some preliminary documentation for the Qt Wayland Compositor. There are a few classes which remain undocumented. The documentation in some areas may be a bit minimal, but this can be expanded gradually with code examples and more details. Change-Id: I5d285a5a25e8602ac2fdddc84c3fd217e7b77c95 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Rename QWaylandExtensionContainer to QWaylandObjectPaul Olav Tvete2015-10-231-2/+2
| | | | | | | | | | 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>
* Add a setDefaultOutput function to QWaylandCompositorJørgen Lind2015-09-181-0/+10
| | | | | | | | | Have to remove the assert in QWaylandCompositorPrivate::addOutput since setDefault output can also add outputs now, and it might be called by both Change-Id: Ic2a321fde37917427dfb68b38dd3e6af2ed20368 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Simplify the construction of pure-qmlJørgen Lind2015-09-181-1/+4
| | | | | | | | | Make it possible that an WaylandOutput item is declared as a child of a WaylandCompositor item. This is mostly usefull for examples, since output handling will likely be event driven in a propper compositor Change-Id: I3238b079e41a49f69cbd9255818588674b364fb2 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Remove the QWaylandOutputSpaceJørgen Lind2015-09-181-37/+6
| | | | | | | | We don't need this abstraction anymore since we don't have global coordinates in the core api anymore Change-Id: I553a736a0e71026447d6a0af3f8a64607b8c8f06 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* New API for drag and dropPaul Olav Tvete2015-09-171-24/+0
| | | | | | | Let the compositor implementation keep all the GUI state. Change-Id: I73a865fa3407340276d6765e10378b8e23a76fe2 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Remove QWaylandCompositor::cleanupGraphicsResources()Jørgen Lind2015-09-151-9/+1
| | | | | | | | it is not needed anymore since the QWaylandView holds a reference to the buffer and the QWaylandQuickItem owns the texture Change-Id: I0a4da028cf1cecf4b0710b96737dfc1035e5f1f9 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Rename QtCompositor to QtWaylandCompositorJørgen Lind2015-09-101-11/+11
| | | | | | | enable building QtWaylandCompositor by default Change-Id: I7cf34052b304ca9fef55b7e30ef6a6367b5d75f1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Move the createDefaultSurface function to QWaylandCompositorPrivateJørgen Lind2015-09-101-11/+16
| | | | | | | | | | Its really not meant to be reimplemented by other classes than QWaylandCompositor or QWaylandQuickCompositor because of the createSurface signal. If someone really wants to use the virtual function then they can subclass the private Change-Id: Iad88fde3fc999ac18bdc57bd37864884865a962a Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Remove legacy namingJørgen Lind2015-09-101-5/+0
| | | | | Change-Id: Ibf7fad69085b4439b7d5cc3fd1a7aa24ed9e03c3 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Make it possible to connect to a createSurface signalJørgen Lind2015-09-041-6/+34
| | | | | | | | | | | | Remove the QWaylandSurface factory function from QWaylandCompositor. Add a default constructor to QWaylandSurface and a initialize function. Add som housekeeping code in debug builds that ensures the user calls initialize. Add a fallback factory function on the compositor if the user is fine with getting the default implementation of QWaylandSurface or QWaylandQuickSurface Change-Id: Ib9289c323b6723f0d1119a484cf9e0c26c95b549
* Rename primary(Output|OutputSpace) to default(Output|OutputSpace)Jørgen Lind2015-09-041-6/+6
| | | | Change-Id: I0bbe6dd6bd8e9f6972cc88b832029ac98aa2af49
* Make it possible to construct QWaylandOutputJørgen Lind2015-09-041-7/+1
| | | | | | | | | | | | | | | This requires QWaylandOutput to be initialized. This will happend when the QWaylandCompositor of the QWaylandOutputSpace that is set on the QWaylandOutput is created. QWaylandCompositor will send or post a Polish event to the QWaylandOutput which again will call QWaylandOutput::initialize. This function will create the global that will be put on the wl_displays registry This makes it possible to Create WaylandOutputs in QML (see the pure-qml example) and also gives a better programming model in C++ Change-Id: Iaf907ae18a283678eda6d04390dc9790ae0bced8
* Add way for classes to get polish events on compositor initiazliationJørgen Lind2015-09-041-0/+16
| | | | | | | When the compositor has been created the wl_display and registry has been initialized. When this is done other globals can be created. Change-Id: Ifb8a0757877963a35bfa2a896ddb8f28a0b69d64
* Make Manufacturer & Model modifiable properties of QWaylandOutputJørgen Lind2015-09-021-4/+2
| | | | | | This to make construction look nicer and make them modifyable from QML Change-Id: I5f5ffffb34f664914cdb531736c42a6873bfe18c
* Enable the HW integration extension by default againJørgen Lind2015-08-311-1/+24
| | | | Change-Id: I8b0f5bd6e8ec179ab3de87228fa7569870778a8f
* Make the default wl_shell available from QMLJørgen Lind2015-08-281-2/+1
| | | | | | | | | | | | | | 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-281-47/+2
| | | | | | | | | | 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
* Remove the qt_sub_surface extensionJørgen Lind2015-08-281-3/+0
| | | | Change-Id: I380590722f2c95ff68972f5b3c94a7cc4cfe016f
* Move QWaylandKeyboardPrivate away from wayland_wrapperJørgen Lind2015-08-281-2/+2
| | | | Change-Id: I77dce1eecdda21f4a9907d1cd7fafe23de326136
* Remove QtWayland::InputDeviceJørgen Lind2015-08-281-1/+0
| | | | | | | and add QWaylandInputDevicePrivate. Also make sure noone holds a reference to the private instance. Change-Id: Ic2327595d58d6308e1e2699370f53aef47061b04
* Use QWaylandClient in constructor of QWaylandSurfaceJørgen Lind2015-08-281-1/+1
| | | | | | instead of struct ::wl_client * Change-Id: I606a813e84eeec8134e6ece428f42a53e1ba0189
* Remove QtWayland::Compositor and add QWaylandCompositorPrivateJørgen Lind2015-08-281-51/+387
| | | | | | Embrace PIMPL Change-Id: I8c8b5971e15c208317ff33231bda1513e7b8d489
* Remove QtWayland::SurfaceJørgen Lind2015-08-281-2/+8
| | | | | | | | Its enough to have QWaylandSurface and QWaylandSurfacePrivate. Also don't pass QWaylandSurfacePrivate around, but pass QWaylandSurface and then use the QWaylandSurfacePrivate::get function. Change-Id: I915cc9d7b4497ad1c6f1f2dee61d9d0db069ba6b
* Remove some deprecated apisJørgen Lind2015-08-281-70/+0
| | | | Change-Id: I6a0f68fa6c8fb79cd81daf1315c2b3b041a25de2
* Remove the QWaylandCompositor::createView virtual functionJørgen Lind2015-08-281-12/+0
| | | | | | | | | Views are just a representation of the QWaylandSurface, and many different types of view "sub-classes" will exist depending on its perticular use. Dont enforce just one view implementation for one compositor. Change-Id: Ie237a73e63638e70713f89b479fb1b248426c9ac
* Rename QWaylandSurfaceView to QWaylandViewJørgen Lind2015-08-281-5/+5
| | | | | | and rename QWaylandSurfaceItem to QWaylandQuickView Change-Id: I989b482eb79df06e9f265bc2b0ef6b3dce7509d6
* Public input apisJørgen Lind2015-08-281-14/+31
| | | | Change-Id: I60ec2fd9f4afe54198d9c476b28f9f15a661e9ca
* Rework how we manage extensionsJørgen Lind2015-08-281-26/+3
| | | | Change-Id: If2cbf096e7419bc1bda007d5167ce39d1a5d50ae
* Introducing QWaylandOutputSpaceJørgen Lind2015-08-281-50/+28
| | | | | | | | | | Its purpose is to make it possible to have multiscreen environments, and also multiple multioutput environments It is also an abstraction to make it clear that outputs are arranged in a 2d space Change-Id: I418509996a03b2ca1a12aec9c9e25e143a15a10f
* Move the output from QWaylandSurface to the QWaylandSurfaceViewJørgen Lind2015-08-281-15/+6
| | | | | | | | | and add a property called primaryOutput on the QWaylandSurface. Also add some bookkeeping in QtWayland::Output so it knows what surfaces and views it currently holds, sending the enter and leave events automatically. Change-Id: Ib6efbc6f8157657fb4451b751bba1cb5345b7906
* Make it possible to set a QWaylandSurface on the QWaylandSurfaceViewJørgen Lind2015-08-281-2/+10
| | | | | | This will allow us to use QWaylandSurfaceItem from within QML Change-Id: I6ecfbf3a5de5f5a748a6a85295b9741316fef976
* Deprecate the cursor change request and make it a signalJørgen Lind2015-08-281-0/+2
| | | | Change-Id: Icafab695071259e2112e9742ba46a19c1dc74586
* Make it possible for QWaylandSurfaceItem to children of arbitrary itemsJørgen Lind2015-08-281-3/+2
| | | | | | | | | | | The main problem is that the position of the QWaylandSurfaceItem is changed through the position of the views setPos function. However, it might be that we don't want the surface position to map it directly. Rename QWaylandSurfaceView::setPos to setRequestedPos Then let the compositors choose what to do with this position Change-Id: I43c74baad688d2f3e49ca091bbf436c718e81318
* Make QWaylandCompositor inherit QObjectJørgen Lind2015-08-281-22/+40
| | | | | | | | | | | | | | | | | And remove the constructor arguments, and just having parent as a constructor argument. This requires QWaylandCompositor to have a create semantic familiar from QWindow and QOpenGLContext. On create the native wayland socket is created and initialized. Also the virtual functions surfaceCreated and surfaceAboutToBeDestroyed have been converted to signals, removing the need to subclass QWaylandCompositor Examples have been changed to avoid having two super classes inheriting QObject. This is done by either making the QWindow subclass a member or making the QWaylandCompositor a member. Change-Id: I317d37e2adca15bfe4e1904e20ab0d83943b2d45
* Add createSurface factory function on QWaylandCompositorJørgen Lind2015-08-281-0/+6
| | | | | | This simplifies subclassing the compositor getting Change-Id: I392b84febae62df042b23fa806360bc068bf984f
* Move surface management to outputsJørgen Lind2015-08-281-24/+23
| | | | Change-Id: I427e576a4e0834d6266af2670f7ff47e078153d4
* LGPL v3 license change for Qt Wayland CompositorJørgen Lind2015-07-241-27/+23
| | | | Change-Id: I84ed248b471464214d935352768f300d4b90dec3
* Add 3 QList::reserve() callsSergio Martins2015-06-081-0/+1
| | | | | Change-Id: Ic89d25a4497ffaffb3f6b688f4c5ecc5128e9642 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Move surfaces to outputsPier Luigi Fiorini2015-04-211-5/+14
| | | | | | | | | Moving surfaces to belong to a specific output. Surfaces can be viewed on a different output anyway. Change-Id: I9ef76300f85190d84b83431374e76e581786e4e7 Done-with: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/client/qwaylandshmbackingstore.cpp src/client/qwaylandwindow.cpp Change-Id: I795fd08f0fc5d3cb5ed55bf16e724f66b7567723
| * Use Qt foreach instead of C++11 specific range-base for loopOlivier Blin2015-03-241-1/+1
| | | | | | | | | | | | | | To fix build with compilers without C++11 support. Change-Id: If5a5d5d874b196f60bcc5b7bd5a543b58f9c89a3 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* | 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>
* | Add QWaylandOutput to support multiple outputsPier Luigi Fiorini2015-02-081-11/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new QWaylandOutput class to support multiple outputs. Each QWaylandOutput need a window for rendering. Rename OutputGlobal to Output and Output to OutputResource. Add support for physical size, mode and available geometry. Use better defaults for geometry and refreshRate from the QWindow if available. A window is no longer passed to QWaylandCompositor constructor and all output related methods are removed, however one or more outputs are required for hardware integration. QWaylandCompositor returns a list of outputs and offers an API to add or remove outputs. Hardware integrations can run headless. Change-Id: I742996571ddb78328f7bfa4f79b25a81995279e1 Done-with: Jan Arne Petersen <jan.petersen@kdab.com> Done-with: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Support for multiple input devicesMikko Levonmaa2014-10-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows the registration of multiple input devices for the compositor via private APIs. Since the Qt stack does not support separate input devices via the QPA, the identification of each device (wl_seat) is left up to the implementor. The compositor will identify input event via the QWaylandInputDevice::isOwner method. Usually this will happen when an item on the UI has received an event and would like to send it to the client surface. See QWaylandSurfaceItem for more details. Includes basic unit tests Change-Id: I7ee1db49388713bf3076c23cf8f8a165aefc2fe0 Reviewed-by: Mikko Levonmaa <mikko.levonmaa@lge.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-09-191-5/+1
|\| | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwlcompositor.cpp Change-Id: Ica26e33eb2b77ed5be0e84e8f4256d2e85abfaf5
| * compositor: Do not access members after deleting an instanceLaszlo Agocs2014-08-231-1/+1
| | | | | | | | | | Change-Id: I4edb73d0b4476492db8e6993e06cd6402cd55180 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>