summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandcompositor.h
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Use the feature system internallyLars Knoll2016-11-231-1/+1
| | | | | | | | | 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>
* Emit signals for compositor propertiesPier Luigi Fiorini2016-09-201-2/+7
| | | | | | | | 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: rename QWaylandInputDevice to QWaylandSeatJohan Klokkhammer Helsing2016-08-111-9/+9
| | | | | | | | | | | | The name QWaylandInputDevice could be confusing and misleading: - A QWaylandInputDevice was not one input device, but a collection of many. - Classes that sounded like they should inherit from it did not, i.e: QWaylandKeyboard, QWaylandPointer and QWaylandTouch. - The Wayland protocol already has another term for this, which is seat. Change-Id: I9d9690d5b378075d9dddaeb8cf18395c7f47603e Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Rename createSurface and similar signalsJohan Klokkhammer Helsing2016-08-031-1/+1
| | | | | | | | | | | * createSurface -> surfaceRequested * createXdgSurface -> xdgSurfaceRequested * createXdgPopup -> xdgPopupRequested * createShellSurface -> wlShellSurfaceRequested * shellSurfaceCreated -> wlShellSurfaceCreated Change-Id: I715a927242130d7504955002a6a64a2bac516d46 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Emit signals when outputs are added or removedPier Luigi Fiorini2016-06-091-0/+4
| | | | | Change-Id: Ib9267dca4a1adf3283241b5b6d4062ea0292977c Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.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>
* Rename QWaylandExtension to QWaylandCompositorExtensionPaul Olav Tvete2016-05-181-1/+1
| | | | | | | | Since we have QWaylandClientExtension Change-Id: Ie8d60322c8e730bda651e06ed5db0fe1359d946e Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Fix text-input support for new APIJan Arne Petersen2016-04-181-0/+3
| | | | | | | | | | | | | | | | Update text input support to upstream text-input protocol v2 from wayland-protocols. Remove support for input-method protocol for now. Map text-input protocol on compositor side to the Qt input method API, this allows to use any qt platform input method on compositor side (especially qtvirtualkeyboard). Add support for qtvirtualkeyboard to pure-qml example. Implement all missing functions of the text-input protocol. Change-Id: I597451ff65454a63dff86026b6a8d1ffbe07ce02 Done-with: Zeno Endemann <zeno.endemann@kdab.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Add API to grab a surface's contentGiulio Camuffo2016-04-181-0/+4
| | | | | | | | This patch adds a new QWaylandSurfaceGrabber class. The user can use it to grab a surface's content, and get a QImage with the data. Change-Id: I25dd72a8ba39201cd91addbfc976b93ca1e05112 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Initial compositor support for xdg-shell wayland extensionJohan Klokkhammer Helsing2016-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xdg-shell is an extension to the wayland protocol providing functionality suited towards traditional desktop environments. Most of the examples from Weston now require xdg-shell, ivi-shell or some other custom extension. In order for our compositor-api to support those examples and many real-world applications, we needed a compositor implementation of xdg-shell. This commit adds a class QWaylandXdgShell, along with QWaylandXdgSurface and QWaylandXdgPopup. These clases are used almost exactly like the corresponding QWaylandShell* variants. qwindow-compositor has been updated to use the new functionality. qwindow-compositor now only sets focus on surfaces that have a role. weston-terminal was crashing because we set keyboard focus on the cursor surface. Keyboard focus handling has been slightly changed. Most of the functionality has been moved from QWaylandKeyboard::setFocus to QWaylandInputDevice::setKeyboardFocus. This is done in order to track where the keyboard focus should have been, in case the input device (seat) does not currently have a keyboard capability. If a keyboard capability is later set on the input device, its focus will automatically be set to the value stored in QWaylandInputDevice. The reason for the change in keyboard focus handling is that we need to know if an xdgSurface has keyboard focus in order to know whether to send the Activated state in configure events. The Activated state tells the client to draw itself as having focus (i.e. title bar not grayed out). Change-Id: I1b1ca9a4223e87f5ade1e0f4c975979a400c38cb Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Use WaylandCompositor module name for export macroPaul Olav Tvete2016-02-151-1/+1
| | | | | | | 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>
* Subsurface implementation, with C++ APIPaul Olav Tvete2016-02-041-0/+1
| | | | | | | | | This adds support for subsurfaces to QWaylandCompositor and QWaylandSurface. Task-number: QTBUG-49809 Change-Id: I2fa9ee4dcd1f48a2a28dab536f9cd6edc716e42b Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
* Rename QWaylandExtensionContainer to QWaylandObjectPaul Olav Tvete2015-10-231-1/+1
| | | | | | | | | | 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-1/+2
| | | | | | | | | 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/+2
| | | | | | | | | 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-10/+2
| | | | | | | | 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-7/+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-1/+0
| | | | | | | | 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-3/+3
| | | | | | | 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-4/+1
| | | | | | | | | | 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>
* Make it possible to connect to a createSurface signalJørgen Lind2015-09-041-1/+4
| | | | | | | | | | | | 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-7/+8
| | | | Change-Id: I0bbe6dd6bd8e9f6972cc88b832029ac98aa2af49
* Make it possible to construct QWaylandOutputJørgen Lind2015-09-041-4/+3
| | | | | | | | | | | | | | | 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
* Move the curser surface signal to QWaylandInputDeviceJørgen Lind2015-09-041-2/+1
| | | | Change-Id: Ib2b1ee81a5216e348e6014927c1cc818f848384b
* Make Manufacturer & Model modifiable properties of QWaylandOutputJørgen Lind2015-09-021-3/+1
| | | | | | 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-0/+4
| | | | Change-Id: I8b0f5bd6e8ec179ab3de87228fa7569870778a8f
* Remove automatic initialisation of extensionsJørgen Lind2015-08-281-19/+0
| | | | | | | | | | 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 QtWayland::Compositor and add QWaylandCompositorPrivateJørgen Lind2015-08-281-15/+8
| | | | | | Embrace PIMPL Change-Id: I8c8b5971e15c208317ff33231bda1513e7b8d489
* Move some virtual functions into protected scoping.Jørgen Lind2015-08-281-4/+4
| | | | | | | Users should not call these functions, but they should be able to sub-class QWaylandCompositor to reimplement them Change-Id: I35888fec67bec085820733135f201bab1df268a3
* Remove QtWayland::SurfaceJørgen Lind2015-08-281-0/+1
| | | | | | | | 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-14/+0
| | | | Change-Id: I6a0f68fa6c8fb79cd81daf1315c2b3b041a25de2
* Remove the default shell functionalityJørgen Lind2015-08-281-1/+0
| | | | | | | | This will be readded in a different way. Also, remove the WaylandSurfaceChrome since it is no longer needed, and just use WaylandView directly Change-Id: I8d4a7b2135d9fdaea7dd3fcd729e55cceebf48fb
* Remove the QWaylandCompositor::createView virtual functionJørgen Lind2015-08-281-1/+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
* Fix Compile errors and warningsPaul Olav Tvete2015-08-281-1/+1
| | | | Change-Id: I2caba2c9de7823214f20529437453c3df02b7b37
* Rename QWaylandSurfaceView to QWaylandViewJørgen Lind2015-08-281-3/+3
| | | | | | and rename QWaylandSurfaceItem to QWaylandQuickView Change-Id: I989b482eb79df06e9f265bc2b0ef6b3dce7509d6
* Make it possible to subclass QWayland(Pointer|Keyboard|Touch)Jørgen Lind2015-08-281-3/+4
| | | | | | | by having factory functions on QWaylandCompositor and use them from QWaylandInputDevicePrivate Change-Id: Id5e0413ca1fb40e2f7eba571dda361b2809fe313
* Use Q_SIGNALS and Q_SLOTS instead of signals: slots:Jørgen Lind2015-08-281-1/+1
| | | | | | in the compositor apis Change-Id: I0b90843647cbea3e3db22386bfba769db5602d86
* Public input apisJørgen Lind2015-08-281-3/+9
| | | | Change-Id: I60ec2fd9f4afe54198d9c476b28f9f15a661e9ca
* Rework how we manage extensionsJørgen Lind2015-08-281-13/+3
| | | | Change-Id: If2cbf096e7419bc1bda007d5167ce39d1a5d50ae
* Introducing QWaylandOutputSpaceJørgen Lind2015-08-281-18/+15
| | | | | | | | | | 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-1/+4
| | | | | | | | | 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-1/+2
| | | | | | 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-1/+5
| | | | Change-Id: Icafab695071259e2112e9742ba46a19c1dc74586
* QWaylandCompositor make some functionality available from qmlJørgen Lind2015-08-281-6/+7
| | | | Change-Id: Idb84b75da2374ecd8c72e14857018d4965f0a927
* Make QWaylandCompositor::primaryOutput a Q_PROPERTYJørgen Lind2015-08-281-0/+3
| | | | Change-Id: I2a5c9556549fa3dbc4ad8b399a32266acbcc712b
* Make QWaylandCompositor inherit QObjectJørgen Lind2015-08-281-8/+21
| | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | This simplifies subclassing the compositor getting Change-Id: I392b84febae62df042b23fa806360bc068bf984f
* Move surface management to outputsJørgen Lind2015-08-281-5/+7
| | | | Change-Id: I427e576a4e0834d6266af2670f7ff47e078153d4
* LGPL v3 license change for Qt Wayland CompositorJørgen Lind2015-07-241-27/+23
| | | | Change-Id: I84ed248b471464214d935352768f300d4b90dec3