summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandcompositor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Compositor API: rename QWaylandInputDevice to QWaylandSeatJohan Klokkhammer Helsing2016-08-111-29/+29
| | | | | | | | | | | | 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>
* Merge remote-tracking branch 'qt/5.7' into devPaul Olav Tvete2016-08-041-1/+1
|\ | | | | | | Change-Id: Ib22055ac52c0bb36081242948c72332db4e5ac64
| * Doc: several minor link issues in QtWaylandNico Vertriest2016-08-021-1/+1
| | | | | | | | | | | | Change-Id: I9e656b02e1b820e2257d95948650c541656192b4 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | Rename createSurface and similar signalsJohan Klokkhammer Helsing2016-08-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | * createSurface -> surfaceRequested * createXdgSurface -> xdgSurfaceRequested * createXdgPopup -> xdgPopupRequested * createShellSurface -> wlShellSurfaceRequested * shellSurfaceCreated -> wlShellSurfaceCreated Change-Id: I715a927242130d7504955002a6a64a2bac516d46 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-021-4/+2
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/wayland/minimal-qml/main.qml Change-Id: Ic34029a6aa77f2b359f40258a05421d82efd5b37
| * Fix the key code of key events when control is pressedGiulio Camuffo2016-07-041-4/+2
| | | | | | | | | | | | Change-Id: I51a57a32d8263e663a48dac15881d685359bc91d Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | Migrate to public QOpenGLTextureBlitterLaszlo Agocs2016-07-291-1/+1
| | | | | | | | | | Change-Id: I481ebdaf9e5749a57223a91ab3a231ca40af059a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compile with -no-openglJohan Klokkhammer Helsing2016-07-201-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-111-4/+4
| | | | | | | | | | | | | | | | 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-6/+6
| | | | | | | | | | | | | | | | 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-301-2/+2
|\| | | | | | | | | | | | | Conflicts: src/compositor/extensions/qwaylandxdgshellintegration.cpp Change-Id: I3e8666d0c2fd047f12daeb94b2c967c646576ed9
| * Doc: minor link issues QtWaylandNico Vertriest2016-06-211-2/+2
| | | | | | | | | | | | Change-Id: I5ea47a8252f2915696d02052686f2c802a81878c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Rename QWaylandWindowManagerExtension to QWaylandQtWindowManagerPier Luigi Fiorini2016-05-311-3/+3
|/ | | | | | | | | | | | | | | | | | * QWaylandWindowManagerExtension become QWaylandQtWindowManager * WindowManager become QtWindowManager Follow naming convention already established for other extensions like QWaylandWlShell and avoid confusion that might arise with a name as generic as WindowManager. Use QWaylandClient rather than wl_client. Also the Wayland protocol definition has been renamed to qt-windowmanager.xml Change-Id: I941621ce229327c21eff9e80c7e92205cc60e8eb Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Rename private headers to _p.hPaul Olav Tvete2016-05-191-2/+2
| | | | | | Change-Id: I0f0d1bd8efabc39325eec7dba4166ae0bccbf6ff Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Mark the QtWaylandCompositor API as \preliminaryPaul Olav Tvete2016-05-121-0/+2
| | | | | Change-Id: I85e3a6dd98496005c63a88bc0218bc94301692ba Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Fix text-input support for new APIJan Arne Petersen2016-04-181-0/+2
| | | | | | | | | | | | | | | | 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/+54
| | | | | | | | 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-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add automatic socket name detection in compositorErik Larsson2016-03-211-15/+21
| | | | | | | | | | | | | | | The compositor automatically finds a free socket name using wl_display_add_socket_auto. Also fix the order in which the compositor uses --wayland-socket-name or the content of the socketName property. The documentation states the content of the socketName property should be used before the content of --wayland-socket-name. The commit also removes the reference to the WAYLAND_DISPLAY environment variable from the docs. Change-Id: I33dff4e4627d95f5894a5a1e2f308d747f449691 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Johan Helsing <johan.helsing@theqtcompany.com>
* 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