summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api
Commit message (Collapse)AuthorAgeFilesLines
* Remove QWaylandView from the QML APIPaul Olav Tvete2016-08-226-17/+90
| | | | | | | | | | QWaylandQuickItem already encapsulates the view. Also rename the confusing 'discardFrontBuffers' property to 'allowDiscardFrontBuffer' Change-Id: Ibd74ad54bfe3d5187c2ed91ff0378b45e144e109 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Rename QWaylandSurface::isMapped to hasContentJohan Klokkhammer Helsing2016-08-225-21/+21
| | | | | | | | | | | | | 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-1125-268/+264
| | | | | | | | | | | | 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>
* Compositor API: Remove mouseFocus method from QWaylandTouchJohan Klokkhammer Helsing2016-08-092-15/+2
| | | | | | | | It's redundant API because it's already possible to get it through both QWaylandInputDevice and QWaylandPointer. Change-Id: Id5522909f1c12ef3e8f0301f7e94cdc77aa68e10 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Merge remote-tracking branch 'qt/5.7' into devPaul Olav Tvete2016-08-045-5/+8
|\ | | | | | | Change-Id: Ib22055ac52c0bb36081242948c72332db4e5ac64
| * Emit NOTIFY signal for bufferLocked propertyPaul Olav Tvete2016-08-041-0/+3
| | | | | | | | | | | | Change-Id: Ibc11a06a15834f3486440c65edd397bfcba5e0f4 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
| * Doc: several minor link issues in QtWaylandNico Vertriest2016-08-024-5/+5
| | | | | | | | | | | | 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-032-3/+3
| | | | | | | | | | | | | | | | | | | | | | * 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-292-2/+2
| | | | | | | | | | Change-Id: I481ebdaf9e5749a57223a91ab3a231ca40af059a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compile with -no-openglJohan Klokkhammer Helsing2016-07-204-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-116-15/+16
| | | | | | | | | | | | | | | | 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>
* | Expose QWaylandDrag to the QML APIJohan Klokkhammer Helsing2016-07-111-0/+2
| | | | | | | | | | Change-Id: I688f8c5d6781d695d3554aaec0c11be95cec371b Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Fix drag-and-drop for QML compositorsJohan Klokkhammer Helsing2016-07-113-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Dragging within the same client was broken because handleStartDrag called setInputEventsEnabled(false), which meant the surface was ignored as a target for the drag. With this change, input events are not disabled, and wl_data_device.motion events are sent to the source surface like they should. Also wl_pointer.leave and enter are sent before and after the drag. Change-Id: Ife46ca3a9d44a660a5cf029093842adb0e3eca7c Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Rename bufferLock to bufferLockedJohan Klokkhammer Helsing2016-07-043-12/+12
| | | | | | | | | | Change-Id: Ia3e0fa53579ee0d28b1d6b7384b9c6def2761a2b Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | Rename QT_COMPOSITOR_WAYLAND_GL to QT_WAYLAND_COMPOSITOR_GLJohan Klokkhammer Helsing2016-07-014-12/+12
| | | | | | | | | | | | | | | | 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-305-7/+17
|\| | | | | | | | | | | | | Conflicts: src/compositor/extensions/qwaylandxdgshellintegration.cpp Change-Id: I3e8666d0c2fd047f12daeb94b2c967c646576ed9
| * Doc: minor link issues QtWaylandNico Vertriest2016-06-212-3/+3
| | | | | | | | | | | | Change-Id: I5ea47a8252f2915696d02052686f2c802a81878c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Merge remote-tracking branch 'origin/5.7.0' into 5.7Liang Qi2016-06-162-2/+8
| |\ | | | | | | | | | Change-Id: I58849f3b7bf695eb446e9dc96d71d6838912ffb1
| | * QtCompositor: Fixed touch point handlingDominik Holland2016-06-072-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When touch event sending was enabled for the surface the compositor crashed because the resource where not bound and the checks for the pointer were wrong. Task-number: QTBUG-53886 Change-Id: I3720c773cbe30354bb4fe3789e26a8901e676049 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Kalle Viironen <kalle.viironen@theqtcompany.com>
| * | Fixed invalid texture error when unhiding QWaylandQuickItems.Robert Griebl2016-06-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating new scene-graph nodes (which is the case when re-parenting items), no texture is attached to the node, leading to an abort due to an invalid scene-graph. Change-Id: I4cc1fd3cbce5f90362bc18b87a76b462d0d62377 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Add compositor property to QWaylandClientPier Luigi Fiorini2016-06-232-0/+21
| | | | | | | | | | | | | | | Change-Id: Ia74d0e0cda731d1833da154b6c1739e57f73834a Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | | Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devPaul Olav Tvete2016-06-131-3/+6
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-111-3/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwldatadevice.cpp Change-Id: I2f555f969ec36b3e9b4123d758ae4176c5c90164
| | * | Avoid connect calls for null objectLaszlo Agocs2016-05-311-3/+6
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | textInput() may return null. No need to flood the output (f.ex. in qwindow-compositor) with warnings from QObject. Change-Id: Ifdd318f70a8d4dc37750cb80f58374979d6106aa Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | / Add missing include for QOpenGLFunctionsJohan Klokkhammer Helsing2016-06-131-0/+1
|/ / | | | | | | | | Change-Id: I2cad0145b99168a399911e5fa922bfe98fb67d63 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Initial drag and drop support for QML compositorsJohan Klokkhammer Helsing2016-06-103-0/+31
| | | | | | | | | | Change-Id: I3328387d925dcb2f586dc69867fd3c4e58ef5e51 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Emit signals when outputs are added or removedPier Luigi Fiorini2016-06-092-1/+9
| | | | | | | | | | Change-Id: Ib9267dca4a1adf3283241b5b6d4062ea0292977c Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Add dragStarted signal to QWaylandSurfaceJohan Klokkhammer Helsing2016-06-072-0/+14
| | | | | | | | | | | | | | This signal is emitted when starting to drag from the surface Change-Id: Ia949253833c7a0c6773810525ac1066e0db955fc Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | When setting WaylandItem::inputEventsEnabled to true, also enable itemJohan Klokkhammer Helsing2016-06-071-0/+2
| | | | | | | | | | Change-Id: I1f61297478f14b24c476b27f90873cc6613f80a2 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Add QWaylandQuickOutput::pickClickableItemJohan Klokkhammer Helsing2016-06-062-0/+41
| | | | | | | | | | | | | | | | A way to get the topmost item at the given position that accepts mouse buttons. Change-Id: I518a8ae15d12ea4c464f06ee437d4cffe3e61115 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Add mapToSurface method to QWaylandQuickItemJohan Klokkhammer Helsing2016-06-032-5/+16
| | | | | | | | | | | | | | | | | | Takes the scale factor into account and maps the position to Wayland surface coordinates. Change-Id: Ia96de6d0f53d47c43ef07a4daec7ddb248a51664 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Store and expose origin surface in QWaylandDragJohan Klokkhammer Helsing2016-06-032-0/+8
| | | | | | | | | | Change-Id: Ic2bcc88f4ff375019ff7c6fe80ae4ec72205ca2d Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | QWaylandDrag: Remove unused declarations and commented out codeJohan Klokkhammer Helsing2016-06-021-9/+0
| | | | | | | | | | Change-Id: I672ad15a88140dda660182b885b8e5fda81a6ca8 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | 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>
* Compile with -Wzero-as-null-pointer-constantPaul Olav Tvete2016-05-258-11/+11
| | | | | | | | Task-number: QTBUG-53619 Change-Id: Idf073287f215113431cad64f85628e010176ab74 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Compile with a namespaced buildPaul Olav Tvete2016-05-253-2/+8
| | | | | | | Change-Id: I839b3bc2f4fbf67bd381bd82fdaf19f7eb096454 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.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>
* Fixed eglStream compositingDominik Holland2016-05-184-11/+71
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Rename QWaylandExtension to QWaylandCompositorExtensionPaul Olav Tvete2016-05-187-7/+7
| | | | | | | | Since we have QWaylandClientExtension Change-Id: Ie8d60322c8e730bda651e06ed5db0fe1359d946e 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-1212-1/+18
| | | | | Change-Id: I85e3a6dd98496005c63a88bc0218bc94301692ba Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Let inputEventsEnabled control mouse press/releasePaul Olav Tvete2016-05-122-9/+15
| | | | | | | ...in addition to hover events Change-Id: Ibf434acc5e39637dd701f52d867d582339b93de3 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Postpone QWaylandQuickItem size update after setting outputJohan Klokkhammer Helsing2016-05-061-2/+2
| | | | | | | | | This is needed so the correct scale factor is used (specific for each output). The cursor surfaces for weston-terminal should now scale correctly. Change-Id: I7ae9277439034ce68013fc849753da75be729453 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* QML compositors: Adjust for scale factor when positioning subsurfacesJohan Klokkhammer Helsing2016-05-041-1/+2
| | | | | Change-Id: If861f790546e96aa1ee3781bbbed32ae423f49ba Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* QtWaylandCompositor: Add support for different EGL buffer formatsLouai Al-Khanji2016-04-295-31/+306
| | | | | Change-Id: Idfeeedbf247fa81dccdf28a1aa04f878900ed262 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* QML compositor: Scale surfaces if bufferScale is not setJohan Klokkhammer Helsing2016-04-291-5/+6
| | | | | | | | If bufferScale is not set to match the output scale factor, scale the QWaylandQuickItem accordingly. Change-Id: I2c9e8679ad6eccda9e8e752aaca217d5352bb23e Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* QML compositor: Adjust for scale factor when handling mouse eventsJohan Klokkhammer Helsing2016-04-292-4/+8
| | | | | | | | | | | Problem: We expose a scaleFactor property on QWaylandOutput, but it's not taken into account when handling mouse events. Resulting in wrong position for clicks, incorrect resizing etc. Solution: Divide by scale factor where appropriate. Change-Id: I21f54b7d2d212a320098fea5c9ae9751e79a0141 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Compositor API: Add bufferScale property to QWaylandSurfaceJohan Klokkhammer Helsing2016-04-293-0/+47
| | | | | Change-Id: I1d4e4b65e5a58e3f314551bb10226fa58650becb Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* QWaylandQuickItem: Fix potential null-pointer dereferenceLouai Al-Khanji2016-04-281-1/+4
| | | | | Change-Id: Ibe1b32f3bc55854b23fafdb9cd2d50754b193a87 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>