summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix failure to build from sources: missing #includev5.6.0Thiago Macieira2016-03-031-0/+2
| | | | | | | qwaylandinputdeviceintegration_p.h:64:85: error: ‘uint32_t’ has not been declared Change-Id: Ic747cc2ab45e4dc6bb70ffff143843d1ed4a341b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Don't create wl_surface for desktop widgetsv5.6.0-rc1Paul Olav Tvete2016-01-111-2/+2
| | | | | Change-Id: I3ebcb49a4acf230b9515c0317aab2307dcb9270b Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Fix the control keyPaul Olav Tvete2016-01-111-0/+7
| | | | | | | | | | Let Ctrl+A cause a key event with text Ctrl+A (0x01), like we do on the other platforms. Previously we would use 'A', which would confuse some applications. Task-number: QTBUG-50398 Change-Id: Ie3def4bd9c96e538b2572b88fae029d347e08814 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Revert "Don't invalidate textures when the scene graph is stopped."v5.6.0-beta1Andrew den Exter2015-12-131-0/+5
| | | | | | | | | | | | This was too aggressive, if there is a queued buffer the current one needs to be invalidated or the compositor will hold references to both buffers while the scene graph is stopped which will block clients in eglSwapBuffers. This reverts commit 438063af85d0999f9dead6f04a3285edb175e24c. Change-Id: I3247cfc94e12322fcccc07b5dd64146b055ab431 Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
* Get rid of the egl config test and use what qtbase providesLaszlo Agocs2015-11-1115-86/+36
| | | | | | | | | | | | | | | contains(QT_CONFIG, egl) and CONFIG += egl is the only sane way to test for and pull in EGL headers and libs. This is particularly important when trying to be robust and guard against half-broken sysroots on embedded where a naive PKGCONFIG += egl breaks. Also add an EGL_WAYLAND_BUFFER_WL define to keep wayland-egl compiling. We are not testing for that in any config tests may cause a failure in sysroots that have parts of Mesa thrown in but pick ip an older EGL header from the vendor's driver. Change-Id: I7b7e6a7a91e78dbda5b6954ad08761298c538efc Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* RPi: Resolve all BRCM functions dynamicallyLaszlo Agocs2015-11-116-11/+8
| | | | | | | | | | | | Directly calling eglCreateGlobalImageBRCM and friends is not ideal due to the messy RPi distro setups: shipping Mesa (sw rasterizer only) in standard locations may cause picking up those EGL/GLES libs instead of the Broadcom ones from /opt/vc when building Qt. While this is something that should be fixed in the sysroot (since it is a problem at runtime anyway), let's make life easier by resolving via eglGetProcAddress, which is the right approach in any case. Change-Id: I73f7698b638691d97743a6f819bc7c8ee6ebd245 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix compiler warnings.Friedemann Kleint2015-11-052-1/+2
| | | | | | | | qwaylandinputcontext.cpp:57:16: warning: unused parameter 'sym' [-Wunused-parameter] qwaylanddatadevice.cpp:173:135: warning: 'dragData' may be used uninitialized in this function [-Wmaybe-uninitialized] Change-Id: Id654360fd9b7fdb572565ad39b664af3355b5e79 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* client: Remove the event threadGiulio Camuffo2015-11-036-232/+29
| | | | | | | | | | | | | | | | | If the compositor sends events to us while the main thread is blocked the socket notifier in the events thread would keep sending out the activated() signal, but no events would actually be read until the main thread starts to run again. That causes the event thread to keep queueing new events, and so allocating memory, potentially forever. This patch fixes the issue in maybe a bit radical way, that is by removing the event thread. The socket notifier now runs in the main thread so it will block if the events are not being read. Nowadays there is no real reason to keep the event thread around, as every thread that needs to receive wayland events can dispatch them on its own, we don't need a central dispatcher thread anymore. Change-Id: Ib7885e4b038b82719d78d193f465618a72cbe6af Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* CMake: Create CMake files for WaylandClientKevin Funk2015-11-024-1/+22
| | | | | | | | | Also add unit tests Change-Id: I66de887607f73b318884e4a35f18510b90cf0315 Task-number: QTBUG-47357 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Add wl_shell_surface as nativeResourceForWindowMartin Gräßlin2015-10-301-0/+10
| | | | | | | Allows to get the wl_shell_surface for a QWindow, if it exists. Change-Id: I16b1c578a1c605e58c96e94ae55a3331ecfa353d Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix deadlock when starting a dragGiulio Camuffo2015-10-291-13/+1
| | | | | | | | | | With commit c55a36cb9015cf1eebd49eaa5b1b4f4ec9b28451 in qtbase the QSimpleDrag code changed in a way that caused a deadlock due to drawing a window without a role. However, thanks to that we can now remove that start/cancel hack and simplify the code. Change-Id: Icba6e7c9c4927855e48fb21632db1a10332c4ffb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Make qwindow-compositor build on systems without ext texturesLaszlo Agocs2015-10-271-0/+4
| | | | | Change-Id: I47d7f7d2cb589df8087c23eda60137e7b263f11f Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Support EGLStream in wayland-eglLaszlo Agocs2015-10-2011-56/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Wayland on NVIDIA. Tested with a Jetson TK1 Pro and Vibrante Linux. With just the hw integration no compositors would work out of the box since EGL_KHR_stream_consumer_gltexture only allows connecting to the texture bound to GL_TEXTURE_EXTERNAL_OES, meaning that assumptions about the target always being GL_TEXTURE_2D break horribly both in C++ and in shader code. In addition, buffers have to be extended with an additional updateTexture() operation as EGLStream requires to call ConsumerAcquire on every frame. Previously there was no concept of this as calling createTexture() on attach() was sufficient. Qt Quick bits are omitted since the refactored compositor API is pretty different. This means that QML compositors will not currently function in this environment. The qwindow-compositor example is enhanced to support the external texture target, but this won't apply for the refactored branch either. It is provided for testing purposes for the time being, and to show how C++ compositors can support different texture targets and correct operation with EGLStreams. Done-with: Louai Al-Khanji <louai.al-khanji@theqtcompany.com> Change-Id: I0e209fc0cbcf435cca83528d938eb50e4bdceb82 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* Update focusResource if needed when wl_keyboard is boundOlivier Blin2015-10-202-8/+37
| | | | | | | | | | | | | | | | | | | If a QtWayland compositor gives focus to a surface right after its creation during the client startup, the keyboard resource may not be bound yet by the client. In this case, the surface is correctly marked as focused, but the keyboard resource is never marked as focused, and thus no keys are ever sent to the client. To fix this, the focusResource is updated if needed after wl_keyboard is bound. This can be reproduced with weston-simple-im (patched to use wl_shell instead of xdg_shell) and qml-compositor, modified to enable TextInputExtension and call takeFocus() at the end of windowAdded(). Change-Id: I551cb5bc56c05a1e5187b23108f4ef80468782dc Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix setting focusDestroyListener when no keyboard resource is boundOlivier Blin2015-10-201-4/+8
| | | | | | | | | When no keyboard resource is bound, the destruction handler for the focused surface was not called, and the pointers to focused objects were not reset. Thus the m_focus surface pointer could become invalid. Change-Id: Iee404219304ae7b2bae87131ab140ab134e98118 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix build without pkg-configLaszlo Agocs2015-10-192-5/+7
| | | | | Change-Id: I9217c633bcbecd330715b6dbc654245b3fb739a8 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* Fix for QStringBuilderLaszlo Agocs2015-10-191-4/+23
| | | | | Change-Id: I2a7b82bd2705919a91492edfccac02f4d8fc2c9b Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-0579-0/+869
| | | | | Change-Id: I70c01453b3939d1d645d626ae84c21ab4c9d267a Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6Liang Qi2015-10-025-6/+25
|\
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-025-6/+25
| |\ | | | | | | | | | Change-Id: Ib3c5bec85a09d92e37a3af8e1c749a80cb40c056
| | * Remove scoped enums to fix builds without C++11 support.5.5Julien Brianceau2015-10-012-4/+4
| | | | | | | | | | | | | | | Change-Id: I4f83fdb59a60bb1f1720047f0b442d70192be5da Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * QtCompositor: Work around driver issue on iMX6 devicesLouai Al-Khanji2015-09-251-6/+11
| | | | | | | | | | | | | | | Change-Id: I75eda7e766182025b54f8df851ff1d5a72eefb17 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * QWaylandSurfaceItem: ungrab the pointer on TouchEnd event.Andreas Hartmetz2015-09-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unconditional grab from 498946d6e9c20d4e8af28ee942de5bf4cf5eaf78 did not have a corresponding ungrab. That only worked well as long as there were only QWaylandSurfaceItems in the scene. Each of them just stole the grab for itself at the first TouchBegin. Regular QML items (some people have UI in the compositor process...) do not participate in that mutual stealing so they'd sometimes not get any touch events because the events still went to the last QWaylandSurfaceItem to receive a TouchBegin. Note: The grab would also go away if touchEvent() didn't accept() the event. Without the accept(), QQuickWindowPrivate::translateTouchToMouse() would be called at TouchEnd and do the ungrab. Change-Id: Ia7d1b15fff366542d382eb97494b1e43dedb65a4 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| | * Fix a segfault when the wayland connection is brokenGiulio Camuffo2015-09-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling ::exit() the socket notifier in the events thread may still fire before the process actually exits, using objects that are being destroyed and resulting in a segfault. Stop the events thread before calling ::exit(). Change-Id: I187762da2a7efa83db1e62b0e28dfab89f478c7d Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
| | * Fix deadlock when hiding and showing EGL windowsv5.5.1Giulio Camuffo2015-09-092-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When hiding a window we attach a NULL buffer, which means that any frame callback that is still waiting will not be sent. In the SHM case we just destroy it, but we cannot do that in the EGL case, since we don't have a hold of it. So destroy the EGLSurface, which will in turn destroy the callback. Task-number: QTBUG-46921 Change-Id: I20e0d1ca7b53fb88096101d46979996dd944d429 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | xkb: Provide support for the XF86Phone symbolAndres Gomez2015-10-021-0/+2
|/ / | | | | | | | | Change-Id: I19fd0bc7a56b4baa5b6d40836d5f0401a3b11c49 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xdg-shell: upgrade to support current version (weston-1.8.0)Philippe Coval2015-09-232-115/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle transition from Normal to Maximize then Fullscreen and back to Maximized. Avoid to maximize if no requested size The protocol file is a raw copy of Source: http://cgit.freedesktop.org/wayland/weston/plain/protocol/xdg-shell.xml?id=1.8.0 Minor Nitpick fixes (arrays of bytes, conditionnal or test, c++ function call) Task-number: QTBUG-47327 Change-Id: Ib508e2166cc1337fd93454f30814136839cffa29 (cherry picked from commit 6906a6445c0cbf9d11f8d5d32b181f558a2292c9) Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | QWaylandXdgSurface/QWaylandWlShellSurface: Fix warnings about CT ↵Friedemann Kleint2015-09-152-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialization order. qwaylandxdgsurface.cpp: In constructor 'QtWaylandClient::QWaylandXdgSurface::QWaylandXdgSurface(xdg_surface*, QtWaylandClient::QWaylandWindow*)': qwaylandxdgsurface.cpp:55:31: warning: base 'QtWayland::xdg_surface' will be initialized after [-Wreorder] qwaylandxdgsurface.cpp:55:31: warning: base 'QtWaylandClient::QWaylandShellSurface' [-Wreorder] qwaylandxdgsurface.cpp:48:1: warning: when initialized here [-Wreorder] qwaylandwlshellsurface.cpp: In constructor 'QtWaylandClient::QWaylandWlShellSurface::QWaylandWlShellSurface(wl_shell_surface*, QtWaylandClient::QWaylandWindow*)': qwaylandwlshellsurface.cpp:55:31: warning: base 'QtWayland::wl_shell_surface' will be initialized after [-Wreorder] qwaylandwlshellsurface.cpp:55:31: warning: base 'QtWaylandClient::QWaylandShellSurface' [-Wreorder] qwaylandwlshellsurface.cpp:49:1: warning: when initialized here [-Wreorder] Change-Id: If7ed49fa6f788db7407b5ee82aa252e19e2d4747 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Don't invalidate textures when the scene graph is stopped.Andrew den Exter2015-09-091-5/+0
| | | | | | | | | | | | | | | | | | The texture often represents the last reference to the last buffer of a destroyed surface and invalidating releases that reference which shortcuts any attempt to keep the buffer alive with QWaylandUnmapLock. Change-Id: I4641a87a32f8639c3ffb6c3b5dafd21c77bbb2c1 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Fix updating the keymap when no key is pressedGiulio Camuffo2015-09-031-2/+1
| | | | | | | | | | Change-Id: I55961a32a17dbf35b380f8a4b75433a6b694dd4a Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6v5.6.0-alpha1Liang Qi2015-08-2814-71/+777
|\| | | | | | | | | | | | | Conflicts: src/client/qwaylandwindow.cpp Change-Id: I80ead87f3e1f36299b1bf9cc9c7db6cd48c0e86f
| * Don't crash if loading the keymap failsGiulio Camuffo2015-08-272-20/+37
| | | | | | | | | | | | | | Instead throw a warning and keep using the old one. Change-Id: I1533b3930d4d8c884db922b0d6dd567ef7e4f67c Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
| * Reset surface transientParent when the parent is destroyed.Mikko Harju2015-08-261-0/+8
| | | | | | | | | | | | | | | | If a transient parent of a surface is destroyed before the surface itself, reset all references to that parent surface. Change-Id: I5b748099d8a5502632d8846c5de5381b5f28b665 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Fix QDesktopServices::openUrl when there is no windowmanager integrationGiulio Camuffo2015-08-262-15/+20
| | | | | | | | | | Change-Id: I51da06261acfb193a59db34bc2dd25e3452fce8d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Add the GPLv3 license textThiago Macieira2015-08-132-0/+688
| | | | | | | | | | | | | | LGPLv3 refers to it but does not include it in its body. Change-Id: Ib056b47dde3341ef9a52ffff13eed18cf3504738 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Fix possible race condition leading to a dead lockGiulio Camuffo2015-07-065-21/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Fix tooltips without a transient parentGiulio Camuffo2015-07-042-15/+17
| | | | | | | | | | | | | | | | | | QToolTip has the same problems as QMenu, that is you can create one without a parent and with a global position. Use the same trick and use the window that last received an input event as the parent. Change-Id: I093c8da0d54110903f35670b01dea6fa96abecf4 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Enable input context selectionBernd Weimer2015-08-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It was not possible to use a different input context than the platform context. This has been unified across major platforms, depending on the environment variable "QT_IM_MODULE", the following context is selected: - null: default platform context (Wayland in this case) - empty: no context - set: set one, if it exists and is valid (otherwise no context) Change-Id: I07c6fb339c434f99fc6e092a2e18f00600daa3bc Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com> Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Compile after QPA API changes.Morten Johan Sørvig2015-08-062-6/+6
| | | | | | | | | | | | | | | | QMouseEvent -> QPoint in QSimpleDrag::move and drop Task-number: QTBUG-46615 Change-Id: I9cda0f039ee8f5a70219b320abbb65f8649747e1 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Use xkbcommon for internal key events tooGiulio Camuffo2015-07-239-165/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To manage the keyboard state and send key events to clients we use the xkbcommon library (unless disabled). That means that we currently have a separation between key events outgoing to clients and key events being used internally in the compositor, resulting in different keysyms being produced in the two cases for the same hardware key. Filter the key events coming from the underlying platform and modify them according to the xkb state instead. Change-Id: I4c6678be68e5b214b2b9cd0222dc9f425c580085 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Remove scoped enums to fix builds without C++11 support.Julien Brianceau2015-07-222-4/+4
| | | | | | | | | | Change-Id: Ibe1811ee0b7057d082a55c4ae62e5932f7e10b84 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Use standard wl_subsurface interface to set a window as a child of another oneGiulio Camuffo2015-07-226-92/+113
| | | | | | | | | | Change-Id: I52628f87dbea5383db06468f9748a9bacdec3179 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Add a mechanism to delay unmapping of surfacesGiulio Camuffo2015-07-159-21/+91
| | | | | | | | | | | | | | | | | | | | 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>
* | Use by-ref in foreach where T is non-trivialSergio Martins2015-07-041-1/+1
| | | | | | | | | | Change-Id: Iac40929aebc1e0f507b729b0c01a2ccb18516c37 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-2923-24/+160
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ic75157b11eee188608c3ac7ed6fb1a033bb72750
| * Prevent QWaylandQuickSurface from holding onto multiple buffers indefinitely.Andrew den Exter2015-06-293-3/+20
| | | | | | | | | | | | | | | | | | | | | | With a queue of just two buffers BufferAttacher can end up holding references to both after the renderer is stopped starving the client application and causing it to block in the glSwapBuffers until the renderer restarts or the surface is destroyed. Release the current buffer to the client when the renderer is stopped so it can continue. Change-Id: Ica0e13ef78f7e6058e273c26b517a88d07f958c7 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Bump versionOswald Buddenhagen2015-06-291-1/+1
| | | | | | | | Change-Id: I7000630632373cf7d81c6c0b307f1ab41c2e133f
| * Merge remote-tracking branch 'origin/5.5.0' into 5.5Liang Qi2015-06-261-0/+33
| |\ | | | | | | | | | Change-Id: Iaf9eaa171c141d79c52441de8a697c87e2e42407
| | * added a changes for 5.5.0v5.5.0-rc1v5.5.0Jørgen Lind2015-06-151-0/+33
| | | | | | | | | | | | | | | Change-Id: Ia8a927c5bcfb45bc7a8c16d1c8ff75487fe71cdd Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * | Fix crash when resizing a window in brcm-eglOlivier Blin2015-06-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This occurs for example when a Qt Quick2 application calls showFullScreen() while a rendering is already in progress. The GUI thread was calling destroyEglSurfaces() from setGeometry() and thus destroying the buffers, while the render thread was trying to use the buffers from swapBuffers(). There was a division by zero in swapBuffers() with the modulo m_count operation, because EGL surfaces were destroyed and m_count was 0. This fix is quite fragile, proper locking on buffers would be better. Change-Id: I41fcb2fcebec84c0dfc82ce56c6e323d3722b30a Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>