summaryrefslogtreecommitdiffstats
path: root/src/compositor/wayland_wrapper
Commit message (Collapse)AuthorAgeFilesLines
* Disable the GCC warning about missing initializersThiago Macieira2017-06-221-0/+2
| | | | | | | | | New fields are appended to the structure, so we can't initialize them as we would lose compatibility with earlier versions of libwayland. So just disable the warning. Change-Id: Ia3e896da908f42939148fffd14c4806ce3468e56 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Set size and format in SharedMemoryBuffer::toOpenGlTextureJohan Klokkhammer Helsing2017-06-161-0/+3
| | | | | | | The texture returned previously would have size (1,1) and format NoFormat Change-Id: Ic627b7ff9d10cc87cd9307f5f18ea96458fae212 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Fix licensingv5.9.0-beta4Jani Heikkinen2017-05-0414-168/+210
| | | | | | | | | | 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>
* Fix warning about inconsistent use of override keywordv5.9.0-beta2Thiago Macieira2017-04-041-1/+1
| | | | | | | | | qwaylandshmbackingstore_p.h:93:19: warning: 'paintDevice' overrides a member function but is not marked 'override' [-Winconsistent-missing- override Change-Id: I27b55fdf514247549455fffd14b1791d4dd6b6b3 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Don't redefine symbols from system librariesPaul Olav Tvete2017-03-281-1/+1
| | | | | | | | The system library versions may contain driver-specific functionality. Change-Id: Iaaa71bff7d2c305cb47798920a5977aaa2a3ac8a Task-number: QTBUG-58299 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Clean up draganddrop and clipboard featuresPaul Olav Tvete2017-03-236-23/+55
| | | | | | | | | | | | Don't assume that no-draganddrop implies no-clipboard. Introduce a new private feature wayland-datadevice which contains the common functionality. This feature cannot be controlled independently, but is automatically disabled when both clipboard and draganddrop are disabled. Change-Id: I6aac09c7ee524e3b11f0a1caa4a6c62fc3f1d10f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Replace all occurrences of Q_DECL_OVERRIDE with overrideJohan Klokkhammer Helsing2017-01-236-18/+18
| | | | | Change-Id: I16b7b23efe944b49d1fcc9e7588cdb0a991cebd1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix build with -no-openglJohan Klokkhammer Helsing2017-01-191-0/+2
| | | | | Change-Id: I8340a4d2efe4f3d4a9bd5aaedda6db1b55009951 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use the feature system internallyLars Knoll2016-11-234-9/+6
| | | | | | | | | 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>
* Move qtwayland over to use the new configuration systemLars Knoll2016-11-231-6/+2
| | | | | | | | | | | | | Re-use configuration results from qtbase where possible and move all pkg-config handling over to be done at configuration time. Since waylandclient and waylandcompositor are two independent libs, this required some duplication of features and libraries used by both in the configure.json files. Change-Id: I1f3ec56c85cb780324cc7634a3ad7951125853a0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Expose native buffer handlesPaul Olav Tvete2016-10-031-2/+2
| | | | | | | | | 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-016-304/+424
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Compositor API: rename QWaylandInputDevice to QWaylandSeatJohan Klokkhammer Helsing2016-08-113-16/+16
| | | | | | | | | | | | 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>
* Compile with -no-openglJohan Klokkhammer Helsing2016-07-202-0/+12
| | | | | | | | | | | | | | QtWayland has not compiled without OpenGL for a while. This patch fixes the compilation issues and removes the old config variable, "QT_WAYLAND_GL_CONFIG" and instead checks for the presence of "opengl" in "QT_CONFIG". A new define is also introduced, QT_WAYLAND_COMPOSITOR_QUICK, because it may eventually be possible to use create a QtQuick compositor without OpenGL. Task-number: QTBUG-54322 Change-Id: Ica7b3b320212d4ae1f8b1053725b73c83739c73c Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Compositor: Rename shm to sharedMemoryJohan Klokkhammer Helsing2016-07-112-5/+5
| | | | | | | | sharedMemory is much clearer and will increase the readability of the code and API. Change-Id: Ibb6d7424fa8d44a94a0f4ddf476a564eb235323f Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* Rename QT_COMPOSITOR_WAYLAND_GL to QT_WAYLAND_COMPOSITOR_GLJohan Klokkhammer Helsing2016-07-011-1/+1
| | | | | | | | Qt Wayland Compositor is the name used for the module elsewhere. Change-Id: I28813d50f1aed86f49a31aa54d27ea4ed2770d6a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-112-2/+12
|\ | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwldatadevice.cpp Change-Id: I2f555f969ec36b3e9b4123d758ae4176c5c90164
| * Compositor API: Clear drag icon when droppingJohan Klokkhammer Helsing2016-06-092-2/+12
| | | | | | | | | | Change-Id: I81f9645d1bc959e31f7663ab89bda285951331e7 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Add dragStarted signal to QWaylandSurfaceJohan Klokkhammer Helsing2016-06-071-2/+4
| | | | | | | | | | | | | | This signal is emitted when starting to drag from the surface Change-Id: Ia949253833c7a0c6773810525ac1066e0db955fc Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Store and expose origin surface in QWaylandDragJohan Klokkhammer Helsing2016-06-032-1/+10
|/ | | | | Change-Id: Ic2bcc88f4ff375019ff7c6fe80ae4ec72205ca2d Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Send data_source.cancelled event when dropping on nothingJohan Klokkhammer Helsing2016-05-301-0/+2
| | | | | | | | | | | I.e. on the wallpaper. This will fix a bug where dragging things onto the wallpaper in qwindow-compositor would make the drag icon stay there indefinitely. Change-Id: I19cb4e268346c3b4b624839939f295f64bf97aaf Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Erik Larsson <erik@ortogonal.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Rename private headers to _p.hPaul Olav Tvete2016-05-193-3/+3
| | | | | | Change-Id: I0f0d1bd8efabc39325eec7dba4166ae0bccbf6ff Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Fixed eglStream compositingDominik Holland2016-05-182-0/+9
| | | | | | | | | | | | | | | | | | | | | | | When creating the eglStream from the fd we also need to create the texture and call stream_consumer_gltexture. Otherwise the wayland client can't create the wayland client surface. Fixed the qwindow-compositor example to use the texture associated to the QWaylandBufferRef when compositing a EXTERNAL_OES target. QML compositing only works when QSG_RENDER_LOOP is set to basic as we need to generate a texture from the gui thread. As the texture is created by the bufferintegration it might end up in a different gl context than the quick item using it. The texture is also deleted together with the buffer, which prevents the use of the texture afterwards. Both problems need to be fixed in follow up commits. Task-number: QTBUG-50850 Change-Id: Ifec67bbe9e4b2a680c871dc4aced37b71b7b6f80 Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Don't send release events for uncommitted buffersJohan Klokkhammer Helsing2016-05-041-1/+2
| | | | | | | Fixes crashing GTK clients. Change-Id: I8d2717aa290a7a668af1b8b978447fbefd8ae665 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* QtWaylandCompositor: Add support for different EGL buffer formatsLouai Al-Khanji2016-04-292-9/+12
| | | | | Change-Id: Idfeeedbf247fa81dccdf28a1aa04f878900ed262 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Compositor API: Add bufferScale property to QWaylandSurfaceJohan Klokkhammer Helsing2016-04-291-0/+1
| | | | | Change-Id: I1d4e4b65e5a58e3f314551bb10226fa58650becb Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Compositor, drag-and-drop: Clean up drag focus when droppingJohan Klokkhammer Helsing2016-03-231-1/+4
| | | | | | | | | | | | Problem: If you dragged in one client, then closed that client, opened another one and tried to drag again, the compositor would crash. Solution: Reset the drag focus when dropping or canceling the drag operation. Change-Id: I0ab78b0a3e9d2889db225b7ca45957b5148bb3a0 Reviewed-by: Erik Larsson <erik@ortogonal.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>
* Merge branch 'wip-compositor-api' into devPaul Olav Tvete2015-12-0253-8345/+458
|\ | | | | | | | | | | | | This introduces the new compositor API, removing the old API (which was never officially supported). Change-Id: I1dc01f0fb4edc749e34ed8356e56ad87d7d64913
| * Merge branch '5.6' into wip-compositor-apiLaszlo Agocs2015-10-273-2/+22
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qwindow-compositor changes from 5.6 will be adapted separately. The traditional wayland-egl path is tested and is functional like before. The EGLStream support will be verified separately once the qwindow-compositor changes are ready. Conflicts: examples/wayland/qwindow-compositor/qwindowcompositor.cpp examples/wayland/qwindow-compositor/textureblitter.cpp examples/wayland/qwindow-compositor/textureblitter.h examples/wayland/server-buffer/client/client.pro examples/wayland/server-buffer/compositor/compositor.pro src/compositor/compositor_api/qwaylandbufferref.cpp src/compositor/compositor_api/qwaylandbufferref.h src/compositor/hardware_integration/qwlclientbufferintegration_p.h src/compositor/wayland_wrapper/qwlkeyboard.cpp src/compositor/wayland_wrapper/qwlkeyboard_p.h src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.pro Change-Id: Ic2e3a6e8f74606c35b1e27cd4016fa133527d7ba
| * | 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>
| * | Merge branch 'qt/5.6' into wip-compositor-apiPaul Olav Tvete2015-10-135-0/+55
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/wayland/pure-qml/main.cpp examples/wayland/pure-qml/qml/Chrome.qml examples/wayland/pure-qml/qml/main.qml src/client/qwaylanddnd_p.h src/compositor/compositor_api/qwaylandquicksurface.cpp src/compositor/compositor_api/qwaylandsurface_p.h src/compositor/compositor_api/qwaylandsurfaceitem.cpp src/compositor/extensions/qwlinputmethodcontext_p.h src/compositor/hardware_integration/qwlclientbufferintegration_p.h src/compositor/hardware_integration/qwlclientbufferintegrationfactory_p.h src/compositor/hardware_integration/qwlclientbufferintegrationplugin_p.h src/compositor/hardware_integration/qwlhwintegration_p.h src/compositor/hardware_integration/qwlserverbufferintegrationfactory_p.h src/compositor/hardware_integration/qwlserverbufferintegrationplugin_p.h src/compositor/wayland_wrapper/qwlcompositor_p.h src/compositor/wayland_wrapper/qwldatadevice_p.h src/compositor/wayland_wrapper/qwldatadevicemanager_p.h src/compositor/wayland_wrapper/qwldatasource_p.h src/compositor/wayland_wrapper/qwlextendedsurface_p.h src/compositor/wayland_wrapper/qwlinputdevice_p.h src/compositor/wayland_wrapper/qwlinputmethod_p.h src/compositor/wayland_wrapper/qwlinputpanel_p.h src/compositor/wayland_wrapper/qwlinputpanelsurface_p.h src/compositor/wayland_wrapper/qwlkeyboard.cpp src/compositor/wayland_wrapper/qwlkeyboard_p.h src/compositor/wayland_wrapper/qwloutput_p.h src/compositor/wayland_wrapper/qwlpointer_p.h src/compositor/wayland_wrapper/qwlregion_p.h src/compositor/wayland_wrapper/qwlshellsurface_p.h src/compositor/wayland_wrapper/qwlsubsurface_p.h src/compositor/wayland_wrapper/qwlsurface.cpp src/compositor/wayland_wrapper/qwlsurface_p.h src/compositor/wayland_wrapper/qwltextinput_p.h src/compositor/wayland_wrapper/qwltextinputmanager_p.h src/compositor/wayland_wrapper/qwltouch_p.h src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration_p.h src/imports/compositor/WaylandCursorItem.qml Change-Id: I4e63ef295b297022d4970b3c68b3d565843086bd
| * | | A surface buffer has content iff it has a bufferPaul Olav Tvete2015-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I357097740a50b677b85e1708ec440da03573d2d2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * | | Remove the QWaylandOutputSpaceJørgen Lind2015-09-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-172-77/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Let the compositor implementation keep all the GUI state. Change-Id: I73a865fa3407340276d6765e10378b8e23a76fe2 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * | | Return empty size when nil buffer is attachedPaul Olav Tvete2015-09-161-0/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I74d46c9d2639315341a1e101e304cdffd748976c Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * | | Remove the mouse grabberPaul Olav Tvete2015-09-152-65/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is no longer used for move/resize, and we are going to introduce a new concept for drag and drop (which stopped working several changes ago anyway). The old drag and drop code is left commented out to assist in the new implementation. Change-Id: I18cb41d04f09d6033d1c9e666a739793fcef494b Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * | | Remove global coordinatesJørgen Lind2015-09-141-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This involves removing: - pickView and mapView from QWaylandOutput - requestedPos[X,Y] from QWaylandView Change-Id: Ie53eef434ac6ae7d0d5474f649f78a59ae857167 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| * | | Rename QtCompositor to QtWaylandCompositorJørgen Lind2015-09-1010-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | enable building QtWaylandCompositor by default Change-Id: I7cf34052b304ca9fef55b7e30ef6a6367b5d75f1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * | | Remove automatic initialisation of extensionsJørgen Lind2015-08-286-465/+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
| * | | Move qwltouch_p.h into qwaylandtouch_p.hJørgen Lind2015-08-283-269/+0
| | | | | | | | | | | | | | | | Change-Id: Id93b3d70fa97307d905300dc4fc842bcf5ce5f1d
| * | | Remove the qt_sub_surface extensionJørgen Lind2015-08-281-187/+0
| | | | | | | | | | | | | | | | Change-Id: I380590722f2c95ff68972f5b3c94a7cc4cfe016f
| * | | Move QWaylandKeyboardPrivate away from wayland_wrapperJørgen Lind2015-08-285-534/+2
| | | | | | | | | | | | | | | | Change-Id: I77dce1eecdda21f4a9907d1cd7fafe23de326136
| * | | Move QWaylandPointerPrivate into a _p file and remove the apiJørgen Lind2015-08-285-358/+2
| | | | | | | | | | | | | | | | | | | | | | | | and make sure all other classes uses the public QWaylandPointer type Change-Id: Ie7ff24160c253ff700eb27eb46788fe021386dd7
| * | | Remove QtWayland::InputDeviceJørgen Lind2015-08-288-484/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and add QWaylandInputDevicePrivate. Also make sure noone holds a reference to the private instance. Change-Id: Ic2327595d58d6308e1e2699370f53aef47061b04
| * | | Remove the QtWayland::Output classJørgen Lind2015-08-283-605/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and add QWaylandOutputPrivate. Also make sure no other class holds a pointer to the QWaylandOutputPrivate but only to QWaylandOutput Change-Id: I6c5914d5bf9b394c6fbd7e181e603076fbdc79d7
| * | | Remove QtWayland::Compositor and add QWaylandCompositorPrivateJørgen Lind2015-08-2817-923/+41
| | | | | | | | | | | | | | | | | | | | | | | | Embrace PIMPL Change-Id: I8c8b5971e15c208317ff33231bda1513e7b8d489
| * | | Move some virtual functions into protected scoping.Jørgen Lind2015-08-282-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2817-673/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 the Surface role functionalityJørgen Lind2015-08-282-75/+0
| | | | | | | | | | | | | | | | | | | | | | | | This replaced by the QWaylandExtension and QWaylandExtensionContainers Change-Id: Iba0299725542ede618b636fb2d40715acfcb3b51