summaryrefslogtreecommitdiffstats
path: root/examples/wayland/qwindow-compositor
Commit message (Collapse)AuthorAgeFilesLines
...
* | Initialize member variablePaul Olav Tvete2015-10-021-0/+1
| | | | | | | | | | Change-Id: Id1dd1e4f5a9257e887dee8c966b345ee0588a0ac 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>
* | Remove the QWaylandOutputSpaceJørgen Lind2015-09-181-3/+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-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>
* | 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>
* | 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-103-13/+13
| | | | | | | | | | | | | | 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-042-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | Change-Id: I0bbe6dd6bd8e9f6972cc88b832029ac98aa2af49
* | Make it possible to construct QWaylandOutputJørgen Lind2015-09-041-1/+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
* | Move the curser surface signal to QWaylandInputDeviceJørgen Lind2015-09-041-1/+1
| | | | | | | | Change-Id: Ib2b1ee81a5216e348e6014927c1cc818f848384b
* | Make Manufacturer & Model modifiable properties of QWaylandOutputJørgen Lind2015-09-021-1/+1
| | | | | | | | | | | | 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-282-9/+12
| | | | | | | | Change-Id: I83dceff36d1027b24c1dafb3bc44e07f7502bc54
* | Make the default wl_shell available from QMLJørgen Lind2015-08-282-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+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::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 output from QWaylandSurfaceJørgen Lind2015-08-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Enable shell surface on qwindow compositorJørgen Lind2015-08-282-5/+16
| | | | | | | | Change-Id: I210ddf347c077c3ea8b4e7b6ab00fb20ba5cbffb
* | Remove the default shell functionalityJørgen Lind2015-08-281-1/+1
| | | | | | | | | | | | | | | | 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
* | Rename QWaylandSurfaceView to QWaylandViewJørgen Lind2015-08-282-22/+22
| | | | | | | | | | | | and rename QWaylandSurfaceItem to QWaylandQuickView Change-Id: I989b482eb79df06e9f265bc2b0ef6b3dce7509d6
* | Improve QWaylandExtensionJørgen Lind2015-08-281-1/+1
| | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | Change-Id: I60ec2fd9f4afe54198d9c476b28f9f15a661e9ca
* | Rework how we manage extensionsJørgen Lind2015-08-282-7/+13
| | | | | | | | Change-Id: If2cbf096e7419bc1bda007d5167ce39d1a5d50ae
* | QWindowCompositor: Stop dragging window state when focus goes out.Jørgen Lind2015-08-281-0/+2
| | | | | | | | Change-Id: Ie138e814f5b1766a6817e96813bd392368268186
* | Reimplement the create functionJørgen Lind2015-08-283-12/+19
| | | | | | | | | | | | | | and move the initialization logic that dependend on virutal functions to the create function reimplementation. Change-Id: I1e83a4a59cc7eb9e77179cac27899f9a5dc99cf3
* | Introducing QWaylandOutputSpaceJørgen Lind2015-08-281-3/+5
| | | | | | | | | | | | | | | | | | | | 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 texture ownership from the QWaylandSurfaceJørgen Lind2015-08-282-69/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to the respective QWaylandSurfaceView. For all GL applications this will have no significant impact, but will cause a memory regression for shm surfaces with multiple views. This is done to simplify the creation and destruction of textures, especially in multi-threaded environments. Also the same patch removes the y_inverted property and replaces it with a origin property. Its done in the same patch as a lot of the code was overlapping. Change-Id: I4bce50c614c9ac3ba0580e0560339476eac03433
* | Deprecate the cursor change request and make it a signalJørgen Lind2015-08-282-2/+3
| | | | | | | | Change-Id: Icafab695071259e2112e9742ba46a19c1dc74586
* | Make it possible for QWaylandSurfaceItem to children of arbitrary itemsJørgen Lind2015-08-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | 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-282-4/+8
|/ | | | | | | | | | | | | | | | | 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 a mechanism to delay unmapping of surfacesGiulio Camuffo2015-07-151-0/+7
| | | | | | | | | | When a client attachs a NULL buffer on a surface we may want to hang on to the old buffer for a bit, e.g. to do a hide animation. Add the QWaylandUnmapLock class to keep a surface mapped after an attach(0) request. Change-Id: I5d5be0b36410a76a58d2b68c1b2ac5e3b875a801 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-0/+1
|\ | | | | | | | | | | | | | | Conflicts: src/client/qwaylandshmbackingstore.cpp src/client/qwaylandwindow.cpp Change-Id: I795fd08f0fc5d3cb5ed55bf16e724f66b7567723
| * qwindow-compositor: fix rendering shm NPOT textures with OpenGL ES2Olivier Blin2015-03-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Always use GL_CLAMP_TO_EDGE instead of GL_REPEAT, since OpenGL ES2 doesn't support NPOT textures in combination with GL_REPEAT by default, and repeat is not needed anyway. See also qtbase commits: 8dfeb1c374972f06759a92b4edc5d6a18b96ccec 8ab1323842433fb6b45e7d6f381b4b9710a81da9 72558e810d9b3493dabfc936fa6c8bf3c3f3b49c Change-Id: I01770fe3352da05baf6898d63c091bfae95e7a98 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Update copyright headersJani Heikkinen2015-02-177-28/+28
| | | | | | | | | | | | | | | | | | 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-4/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Move examples into wayland subdirectory.v5.4.0-beta1Friedemann Kleint2014-10-099-0/+1065
Conforming to the Qt project directory structure. Change-Id: I452867fabc88e9594fa26f944b5d3e1ca4ffc720 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>