summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* 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-0914-42/+42
| | | | | | | | 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 install targets for new examples.Paul Olav Tvete2015-11-045-1/+16
| | | | | Change-Id: Ibb4ae57d82a86d5fc74679c628a5c7a9b100f71d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Texture fix for examplePaul Olav Tvete2015-11-041-0/+1
| | | | | | | Make it show colors other than black... Change-Id: I0d0ef374d18c1dfbd4f1734d2d0cdcfbc2f36186 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Null pointer check for examplePaul Olav Tvete2015-11-041-2/+6
| | | | | | | The documentation says that defaultOutput() is initialized later. Change-Id: I3dcc6c9dc7395c7986721235333388614928347c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Workaround for qwindow-compositor on platforms other than xcbLaszlo Agocs2015-10-281-1/+1
| | | | | | | | | | | | | | | | | | Creating the QWaylandOutput after the compositor's create() posts an event to the output object and defers initialization. This is fragile since there is nothing guaranteeing the application will not get to render in the meantime and not start calling functions like defaultOutput(), which all return null since there are 0 outputs registered at that time due to the deferred QWaylandOutput::initialize(). Until the issue gets solved by redesigning the behavior somehow, swap the two lines to get qwindow-compositor running with eglfs. This way the output's initialize() is called directly from the compositor's create() and this all output-related functions are usable afterwards immediately. Change-Id: Ie4203d0a4d0ec35804ef8c320121750f02b50724 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Add documentation to Qt Wayland CompositorEskil Abrahamsen Blomfeldt2015-10-263-0/+113
| | | | | | | | | | | 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>
* Add support for popups to examplePaul Olav Tvete2015-10-233-4/+57
| | | | | Change-Id: If2446073b69c91377f399cfd43506e6a211ac209 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* New custom extension examplePaul Olav Tvete2015-10-2320-0/+907
| | | | | | | | | The example implements a simple Wayland extension that doesn't do anything useful. It contains a custom compositor and a wayland platform plugin. Change-Id: I88df4b20f328a32fca33b8d013d253611539526f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Example project file clean-upsLouai Al-Khanji2015-10-234-28/+19
| | | | | | | Make things compile without pkg-config, remove obsolete bits. Change-Id: I9adb2653c80d519dad371b9b982826c6c41e3cb5 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Merge branch 'qt/5.6' into wip-compositor-apiPaul Olav Tvete2015-10-131-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Merge remote-tracking branch 'origin/5.5' into 5.6v5.6.0-alpha1Liang Qi2015-08-281-1/+0
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandwindow.cpp Change-Id: I80ead87f3e1f36299b1bf9cc9c7db6cd48c0e86f
| | * Fix possible race condition leading to a dead lockGiulio Camuffo2015-07-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is a bit dangerous to call wl_display_dispatch() in the event thread, since it may race with the dispatch called e.g. in QWaylandDisplay's blockingReadEvents() and lead to a dead lock. Instead, use wl_display_prepare_read() and wl_display_read_events() in the event thread, which doesn't block, and only dispatch in QWaylandDisplay. As a result we don't need the additional wayland queue anymore, so remove it. Change-Id: I9fbbe5d2f38d06773beb7847df1a0212cca92c37 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Initialize member variablePaul Olav Tvete2015-10-021-0/+1
| | | | | | | | | | | | | | | Change-Id: Id1dd1e4f5a9257e887dee8c966b345ee0588a0ac Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | | Disable flicking in the examplePaul Olav Tvete2015-09-291-0/+1
| | | | | | | | | | | | | | | Change-Id: I767239fa6dee8b2132192a1e694eca954b264584 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | | Add raise() and lower() to QWaylandQuickItemPaul Olav Tvete2015-09-292-1/+7
| | | | | | | | | | | | | | | Change-Id: Idbd0ec7e8b77f6241aa6ac91639d76a0ffe2dae9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | | Fix reference to removed filePaul Olav Tvete2015-09-181-1/+1
| | | | | | | | | | | | | | | Change-Id: Id6e71d8a4bf4acc241861c27c44bd2efbb333917 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | Make the multi-output example workJørgen Lind2015-09-187-74/+160
| | | | | | | | | | | | | | | Change-Id: I765a606a62442306949c6e8338a8384453a721bd Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | Fix broken onSurfaceDestroyed animationJørgen Lind2015-09-181-1/+1
| | | | | | | | | | | | | | | Change-Id: I0f56c0ef2f35ada0613c331817d0fd56d186a158 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | Remove qml-compositorJørgen Lind2015-09-1810-842/+1
| | | | | | | | | | | | | | | Change-Id: I8f09f7043337bd2ac8a017702179a71bb037694c Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | Simplify the construction of pure-qmlJørgen Lind2015-09-181-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-183-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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-174-23/+87
| | | | | | | | | | | | | | | | | | | | | Let the compositor implementation keep all the GUI state. Change-Id: I73a865fa3407340276d6765e10378b8e23a76fe2 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | Also draw surfaces without a shell surfacePaul Olav Tvete2015-09-165-9/+28
| | | | | | | | | | | | | | | | | | | | | ...and minor cleanups Change-Id: I278eb549af49480939973dafbe1c0628fabf16fc Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | Implement resize/move for pure-qmlJørgen Lind2015-09-162-37/+8
| | | | | | | | | | | | | | | Change-Id: I7919f7715486fa2d8cfe35c08095f6c33757a515 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | Adapt example to new API without global coordinatesPaul Olav Tvete2015-09-155-51/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also including: Move windows on alt/meta + mousepress Send mouse events also when no buttons are pressed Add cursor support to the QWindow compositor Implement resize Change-Id: Ib4b64b2e474e519d2061e65954e53fa9d52fd85c Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | Remove global coordinatesJørgen Lind2015-09-142-17/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | New window compositor examplePaul Olav Tvete2015-09-119-899/+397
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start rewriting the QWindow-based compositor example to use QOpenGLWindow and QOpenGLTextureBlitter. Also, make a better separation between the compositor logic and the GUI. Not yet feature complete. Change-Id: I3e4fd839c79bc9dbf055c3a0f9939a68392deea9 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | Rename QtCompositor to QtWaylandCompositorJørgen Lind2015-09-1011-37/+33
| | | | | | | | | | | | | | | | | | | | | 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-102-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-043-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-044-13/+8
| | | | | | | | | | | | Change-Id: I0bbe6dd6bd8e9f6972cc88b832029ac98aa2af49
* | | Make it possible to construct QWaylandOutputJørgen Lind2015-09-045-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Rename automaticFrameCallbacks to automaticFrameCallbackJørgen Lind2015-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | and: - add a signal for when it changes - change default to true Change-Id: Ifb7d29756f554dbd2a2594c935442ba9f4956c5c
* | | Move the curser surface signal to QWaylandInputDeviceJørgen Lind2015-09-042-2/+2
| | | | | | | | | | | | Change-Id: Ib2b1ee81a5216e348e6014927c1cc818f848384b
* | | Make Manufacturer & Model modifiable properties of QWaylandOutputJørgen Lind2015-09-024-4/+4
| | | | | | | | | | | | | | | | | | This to make construction look nicer and make them modifyable from QML Change-Id: I5f5ffffb34f664914cdb531736c42a6873bfe18c
* | | Make it possible to create the shell surface from qmlJørgen Lind2015-08-283-17/+27
| | | | | | | | | | | | Change-Id: I83dceff36d1027b24c1dafb3bc44e07f7502bc54
* | | Remove followRequestedPosition from QWaylandQuickItemJørgen Lind2015-08-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | since it is not needed anymore, and it is trivial to modify QWaylandQuickItem in qml to have this behavior as pure-qml's Chrome.qml shows Change-Id: I795881fde4ecf3e2ec877222e7283b1052b7c27a
* | | Make the default wl_shell available from QMLJørgen Lind2015-08-286-39/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-283-7/+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 the qt_sub_surface extensionJørgen Lind2015-08-281-8/+0
| | | | | | | | | | | | Change-Id: I380590722f2c95ff68972f5b3c94a7cc4cfe016f
* | | Update QWindowCompositor to use the shell view directlyJørgen Lind2015-08-281-2/+14
| | | | | | | | | | | | Change-Id: I7b1d9ea30cf79b41ae8c1d7b79775c6149172124
* | | In QWaylandWindowCompositor rename m_surfaces to m_visibleSurfacesJørgen Lind2015-08-282-26/+22
| | | | | | | | | | | | | | | | | | | | | And make the compositor work with the updated semantics of QWaylandSurface Change-Id: Ic73dda431fe829ead3d822adcae09bc3dc22a6d3
* | | Fix up that QWindowCompositor didn't send onScreenVisibillityJørgen Lind2015-08-282-20/+49
| | | | | | | | | | | | | | | | | | | | | This actually works as an excellent example for how to integrate with extension and signals and slots. Change-Id: Ib4ab8f2ebefcc48940c83f38c5f2219a19902c15
* | | Remove QtWayland::Compositor and add QWaylandCompositorPrivateJørgen Lind2015-08-281-4/+5
| | | | | | | | | | | | | | | | | | Embrace PIMPL Change-Id: I8c8b5971e15c208317ff33231bda1513e7b8d489
* | | Remove QtWayland::SurfaceJørgen Lind2015-08-281-3/+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-1/+1
| | | | | | | | | | | | Change-Id: I6a0f68fa6c8fb79cd81daf1315c2b3b041a25de2
* | | Remove output from QWaylandSurfaceJørgen Lind2015-08-282-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is the views that belong to outputs. This leads to a couple of interesting cases with enter and leave events, but the implementation says you will get enter events for the first view of a surface entering an output, and for the last view being removed from an output. Also to throttle a surface, there has to be 1 surface which takes care of this. This is because if multiple views throttle, then the client might render to quick. Change-Id: If4bba380fd4d7f506fd769606cbdea4ce58b908d
* | | Fixups after rebasingJørgen Lind2015-08-282-10/+16
| | | | | | | | | | | | Change-Id: Ie5d8899157d77f83f2cf65f236d534b972aa4770
* | | Use the output for setting screen geometry in qml-compositor exampleJørgen Lind2015-08-281-1/+1
| | | | | | | | | | | | Change-Id: Ibad545135a44c7a7390d96eb582265e5749fea95