summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandsurface.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Compositor: Add missing cursorSurfaceChanged signalJohan Klokkhammer Helsing2017-10-021-0/+4
| | | | | Change-Id: I23a67b8189ab84e6a70c9e3de5da15cf2e9a9d77 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix licensingv5.9.0-beta4Jani Heikkinen2017-05-041-13/+16
| | | | | | | | | | 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>
* Clean up draganddrop and clipboard featuresPaul Olav Tvete2017-03-231-2/+7
| | | | | | | | | | | | 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>
* Fix build without feature.imTasuku Suzuki2017-01-131-0/+6
| | | | | Change-Id: Ie29b87a4198cbe34df6746b10c7a17ee1fcd608d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Don't ignore wl_surface:attach with null bufferJohan Klokkhammer Helsing2016-11-031-1/+1
| | | | | | | | Update the bufferRef to null so the surface gets hidden. This fixes an issue with popups not popping down properly. Change-Id: Ie6781c0e935998035e06c8498035d786f06a1fe0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Doc: Added missing documentation for certain parametersNico Vertriest2016-11-031-2/+2
| | | | | | | Change-Id: I6f30d9032a9f5f432aacee1b05439445933fb9d0 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* Rename QWaylandSurface::throttlingView to primaryViewJohan Klokkhammer Helsing2016-10-071-6/+11
| | | | | | | | | | And make sure QWaylandWlShellIntegration and QWaylandXdgShellV5Integration only send configure events if they have the primary view. Also add a convenience, QWaylandView::isPrimary. Change-Id: Ib3a9615f46c8c43897c7fac22f832d2581190c0a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Documentation: Remove tech preview statusJohan Klokkhammer Helsing2016-10-031-2/+2
| | | | | | | | | Remove "preliminary" and add "since 5.8". Also remove notice from readme about the API being in tech preview. Change-Id: I4ef1ffa4e23661f5a1e28c9e3207678be5b0435c Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Refactor buffer handlingPaul Olav Tvete2016-10-011-64/+34
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Rename QWaylandView::attach() to bufferCommitted()Paul Olav Tvete2016-09-081-2/+2
| | | | | | | | | | The old name was wrong on two counts: first of all, the function is called on wl_surface.commit, not attach. Secondly, the imperative tense made it look like a function that can be called by the user. Change-Id: Icd872d430062e67154bd50ca7d79881ea9874152 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* Merge remote-tracking branch 'qt/5.7' into 5.8v5.8.0-alpha1Liang Qi2016-08-281-20/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/compositor_api/qwaylandseat.cpp src/compositor/compositor_api/qwaylandview.cpp tests/auto/compositor/compositor.pro tests/auto/compositor/compositor/testinputdevice.cpp tests/auto/compositor/compositor/testinputdevice.h tests/auto/compositor/testinputdevice.cpp tests/auto/compositor/testinputdevice.h tests/auto/compositor/testseat.cpp tests/auto/compositor/testseat.h Change-Id: I98e045908dd964e5d4120bd35e71b8839c0d923a
| * Doc: Language editsVenugopal Shivashankar2016-08-171-20/+18
| | | | | | | | | | | | | | Task-number: QTBUG-53147 Change-Id: I353cf18b9661b5eb2371072f8091dc890fc7fcf0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | Rename QWaylandSurface::isMapped to hasContentJohan Klokkhammer Helsing2016-08-221-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | It was potentially misleading, since "mapped" is already used with a slightly different meaning in the Wayland protocol. In the protocol, mapped means that the surface should be rendered. The renamed property, on the other hand, is true if the surface has a buffer with contents attached and committed. In some cases this is not the same, i.e. the drag icon after dropping, or xdg_popups after popup_done. Change-Id: Idc359433c6130e3815de57b21d4edb13e318887d Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Compositor API: rename QWaylandInputDevice to QWaylandSeatJohan Klokkhammer Helsing2016-08-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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 'origin/5.7' into devLiang Qi2016-06-301-1/+1
|\| | | | | | | | | | | | | Conflicts: src/compositor/extensions/qwaylandxdgshellintegration.cpp Change-Id: I3e8666d0c2fd047f12daeb94b2c967c646576ed9
| * Doc: minor link issues QtWaylandNico Vertriest2016-06-211-1/+1
| | | | | | | | | | | | Change-Id: I5ea47a8252f2915696d02052686f2c802a81878c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Add dragStarted signal to QWaylandSurfaceJohan Klokkhammer Helsing2016-06-071-0/+12
|/ | | | | | | This signal is emitted when starting to drag from the surface Change-Id: Ia949253833c7a0c6773810525ac1066e0db955fc Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.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>
* Compositor API: Add bufferScale property to QWaylandSurfaceJohan Klokkhammer Helsing2016-04-291-0/+40
| | | | | Change-Id: I1d4e4b65e5a58e3f314551bb10226fa58650becb Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Fix text-input support for new APIJan Arne Petersen2016-04-181-11/+9
| | | | | | | | | | | | | | | | 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>
* Initial compositor support for xdg-shell wayland extensionJohan Klokkhammer Helsing2016-03-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 surface roles backGiulio Camuffo2016-02-111-0/+26
| | | | | | Task-number: QTBUG-49809 Change-Id: Id62ddea68c89b6999b66d3df8eeeffd858ae844f Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Subsurface implementation, with C++ APIPaul Olav Tvete2016-02-041-0/+47
| | | | | | | | | 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/+1
| | | | | | | | | 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>
* Add documentation to Qt Wayland CompositorEskil Abrahamsen Blomfeldt2015-10-261-4/+193
| | | | | | | | | | | 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-3/+3
| | | | | | | | | | 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>
* Fix missing #ifndef for housekeeping code.Erik Larsson2015-10-121-0/+2
| | | | | Change-Id: Iad74c37917ef2cb61565c88dc3de12bd0fb7fbcb Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Improve notification at surface destructionPaul Olav Tvete2015-09-291-5/+5
| | | | | Change-Id: I7e9cb1a0ed728f21af4f1e00ee66dfe86f0dd6a4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Make sure QWaylandQuickItem paints the first frameJørgen Lind2015-09-181-0/+2
| | | | | | | when a Surface containing a frame is being set on it Change-Id: Ie19f017f0f28e225ffc29edf9a88fa21e6988d02 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Rename QtCompositor to QtWaylandCompositorJørgen Lind2015-09-101-8/+8
| | | | | | | enable building QtWaylandCompositor by default Change-Id: I7cf34052b304ca9fef55b7e30ef6a6367b5d75f1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Make it possible to connect to a createSurface signalJørgen Lind2015-09-041-8/+59
| | | | | | | | | | | | 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
* Use QWaylandBufferRef in QWaylandSurfacePrivate::setBackBufferJørgen Lind2015-08-281-10/+2
| | | | | | simplifies the logic Change-Id: I918e014c56ceeea8e6c5f93c49d84f9ffe8e27b2
* Remove the qt_sub_surface extensionJørgen Lind2015-08-281-1/+0
| | | | Change-Id: I380590722f2c95ff68972f5b3c94a7cc4cfe016f
* Move ref and unref from QWaylandSurface to privateJørgen Lind2015-08-281-45/+49
| | | | | | | | | There shouldn't be a need to call these functions manually, and if there is then their available in the private implementation. Also removed some relay functions in QWaylandSurface Change-Id: I18944c5f1fe87a070baf0c19f1b48aec796774d7
* Removed the m_ prefix for variables in QWaylandSurfacePrivateJørgen Lind2015-08-281-84/+84
| | | | | | and remove unnecessary functions Change-Id: I412e5c6e0187e55a0766eee509c02924d3e1a7c9
* Remove QtWayland::InputDeviceJørgen Lind2015-08-281-3/+3
| | | | | | | 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-4/+4
| | | | | | instead of struct ::wl_client * Change-Id: I606a813e84eeec8134e6ece428f42a53e1ba0189
* Remove QtWayland::Compositor and add QWaylandCompositorPrivateJørgen Lind2015-08-281-8/+10
| | | | | | Embrace PIMPL Change-Id: I8c8b5971e15c208317ff33231bda1513e7b8d489
* Remove QtWayland::SurfaceJørgen Lind2015-08-281-75/+285
| | | | | | | | 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-31/+25
| | | | | | | | | | | | | | | 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-281-67/+3
| | | | Change-Id: Ie5d8899157d77f83f2cf65f236d534b972aa4770
* Remove excess definition of QWaylandKeymapJørgen Lind2015-08-281-27/+0
| | | | | | Also remove QWaylandUnmapLock Change-Id: I0b481224fd03032603084142f36be279351f6611
* make sure that views don't have a surfaceJørgen Lind2015-08-281-0/+8
| | | | | | | when the surface is deleted. Also, don't access the surface in the destructor of the view Change-Id: I4dac3d8e8f77cd0d83b9bc5c3fb948f3172b95a3
* Rename QWaylandSurfaceView to QWaylandViewJørgen Lind2015-08-281-3/+3
| | | | | | and rename QWaylandSurfaceItem to QWaylandQuickView Change-Id: I989b482eb79df06e9f265bc2b0ef6b3dce7509d6
* Remove transient(inactive|parent|offset) from QWaylandSurfaceJørgen Lind2015-08-281-21/+0
| | | | Change-Id: I0fad382c0baa13ec72ff5e45cc1eba0bd4d5c70a
* Remove the static instance of a compositor.Jørgen Lind2015-08-281-1/+1
| | | | | | | All classes that needs to access the compositor instance needs to keep a reference to it Change-Id: Ia0d4b04b460200ad3c7907b94c032afe90c18771
* Public input apisJørgen Lind2015-08-281-2/+20
| | | | Change-Id: I60ec2fd9f4afe54198d9c476b28f9f15a661e9ca
* Rework how we manage extensionsJørgen Lind2015-08-281-142/+5
| | | | Change-Id: If2cbf096e7419bc1bda007d5167ce39d1a5d50ae
* Introducing QWaylandOutputSpaceJørgen Lind2015-08-281-0/+6
| | | | | | | | | | 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-22/+25
| | | | | | | | | 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