summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Change compositor categorized logging namespacePaul Olav Tvete2018-09-203-6/+8
| | | | | | | | | [ChangeLog][Compositor] Add new categorized logging namespace "qt.waylandcompositor" and rename "qt.compositor.input.methods" to "qt.waylandcompositor.inputmethods" Change-Id: Id861e527e3eb8582fdc96f8497fad0cba0766847 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Don't use members of wl_resourceJohan Klokkhammer Helsing2018-09-187-11/+11
| | | | | | | | | When we switch to only including core wayland headers, wl_resource will be an opaque type. Use the getters and setter functions instead. Task-number: QTBUG-70553 Change-Id: I7d84d48a4ee3586f231a331cd15716686dcee775 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Update xdg-shell-unstable-v5.xmlJohan Klokkhammer Helsing2018-09-171-17/+32
| | | | | | | | | | | | | The old xdg-shell-unstable-v5.xml was malformed, and was missing some <description> tags. The updated version passes wayland-scanner run with --strict. Hopefully we can start to use it soon. Otherwise, it's just documentation fixes. Change-Id: Id28ad7196643156cd22407e12ed7ff1e7fb34ce6 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Revert "Upgrade wayland.xml to version 1.10.0"Johan Klokkhammer Helsing2018-09-172-662/+85
| | | | | | | | | | | | Since we're using the deprecated ways of including wayland (wayland-server.h instead of wayland-server-core.h), we can't upgrade wayland.xml to a version that's newer than the system libwayland. Our minimum supported version is 1.6. This reverts commit 4d2106d4b6ed1a088834a8fec9c6a47e5a67d4e8. Fixes: QTBUG-70528 Change-Id: I102cb215a40a1aaaeba6f463200eefc3be653c52 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Rename addSocketFd to addSocketDescriptorJohan Klokkhammer Helsing2018-09-172-4/+4
| | | | | | | | Generally we prefer not to use abbreviated names. It now also matches what's in other Qt modules. Change-Id: I67d54961bebf93760780be54761c6122069f1e1d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove ifdefs for unsupported libwayland versionsJohan Klokkhammer Helsing2018-09-173-21/+0
| | | | | | | The ifdefs were for version 1.2.0. Change-Id: Ie58745c7cf4c0fba45bc5203d24e9913d3a8b8ce Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Use Q_PRIVATE_SLOTs in QWaylandOutputJohan Klokkhammer Helsing2018-09-173-37/+34
| | | | | Change-Id: I25a8feb0919dcccc30d2f23d619e0ba5d4c214ff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove unnecessary function declarationJohan Klokkhammer Helsing2018-09-171-5/+0
| | | | | Change-Id: I55a7b579babfa99707e3e4b4cf15c34f48459825 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Rename QWaylandKeyboard::toScanCode to keyToScanCodeJohan Klokkhammer Helsing2018-09-173-4/+4
| | | | | | | Since the key argument is an int, the signature looks ambiguous otherwise. Change-Id: I732971437ff7354ad3863ecfe42c779a06a84d69 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove confusing elses after returnsJohan Klokkhammer Helsing2018-09-142-8/+4
| | | | | Change-Id: I0ba39df637f6e5ce93ba57f40f279c81532e9289 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Don't include wayland-client-core.hJohan Klokkhammer Helsing2018-09-141-1/+1
| | | | | | | | It requires libwayland 1.8 and we're supposed to support versions as old as 1.6 Task-number: QTBUG-70528 Change-Id: Iff4c2542d103d53aba8db99ecceddfccb79cfcb6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add missing Q_UNUSEDJohan Klokkhammer Helsing2018-09-141-0/+1
| | | | | Change-Id: I41ff947ed5fd18d19058583ed3da51225d353af9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Don't try to use wl_proxy_get_version with libwayland < 1.10Johan Klokkhammer Helsing2018-09-131-0/+7
| | | | | | | | The pregenerated header for xdg-shell was generated using wayland-scanner 1.13 which uses wl_proxy_get_version which was introduced in 1.10. Change-Id: I19507ff6e543d4b0aa53e0d022d680090c34ab50 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge "Merge remote-tracking branch 'qt/5.11' into 5.12" into refs/staging/5.12Paul Olav Tvete2018-09-122-24/+35
|\
| * Merge remote-tracking branch 'qt/5.11' into 5.12Paul Olav Tvete2018-09-122-24/+35
| |\ | | | | | | | | | Change-Id: I703c03c4c92889f82a1c8d16eb906bad9fa10461
| | * Don't destroy buffer before surfaceDestroyed signalPaul Olav Tvete2018-09-112-24/+35
| | | | | | | | | | | | | | | | | | | | | | | | Give the application time to set buffer lock first. Change-Id: Id8a7ee8956bc587344b8eece7072edff5197414c Task-number: QTBUG-69384 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Workaround for crash in QWaylandGlContext::makeCurrentv5.12.0-alpha1Johan Klokkhammer Helsing2018-09-121-0/+3
|/ / | | | | | | | | | | | | | | | | | | QOpenGLContext::makeCurrent no longer sets the current context before calling the platform function. Task-number: QTBUG-70511 Change-Id: I67766d43b1142b0742f655b5c2728f4c87fbfb5f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Create feature wayland-shm-emulation-server-bufferJohan Klokkhammer Helsing2018-09-104-7/+18
| | | | | | | | | | | | | | | | | | And make OpenGL a requirement, in order to make builds without OpenGL work again. Fixes: QTBUG-69779 Change-Id: Iff1153b0aaca8e115f47c59c2ceb028e638e3fe9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Prefix and suffix server buffer integrationsJohan Klokkhammer Helsing2018-09-104-10/+10
| | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Features for server buffer integrations have been renamed. "drm-egl-server" is now "wayland-drm-egl-server-buffer" and "libhybris-egl-server" is "wayland-libhybris-egl-server-buffer". Change-Id: I06a9d1b1c9219c88045fe966be134ff072cd756e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Add XdgToplevel::xdgSurfaceJohan Klokkhammer Helsing2018-09-072-0/+19
| | | | | | | | | | | | | | Similar to the property we already have for popups, XdgPopup::xdgSurface. Change-Id: I1a0b77b28a35597139fcf381a4b345ccaa93d626 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Fix eglGetError call in error handlingJohan Klokkhammer Helsing2018-09-071-1/+1
| | | | | | | | | | Change-Id: I215db1d8bb321e0fe9d49d09c8b5f0d2492e901d Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-063-3/+6
|\| | | | | | | Change-Id: I06b86b413984c07f6be98120450bc859dab271c1
| * Compositor: Don't send illegal leave eventsJohan Klokkhammer Helsing2018-09-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a client doesn't bind to an output, don't try to send leave events for it. ...similarly to how we don't send enter events for it. weston-simple-egl is one such client. [ChangeLog][Compositor] Fixed a bug that caused some clients to abort in libwayland when a surface left an output. Change-Id: Ia7f4c21a7d766092dfb8a20c56fa1128a3046f97 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Compositor: Fix OpenGL textures deleted prematurelyJohan Klokkhammer Helsing2018-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Fixed a bug where destroying a WaylandQuickItem would delete the OpenGL texture for all other WaylandQuickItems using that surface. The texture QWaylandBufferRef::toOpenGLTexture returns is owned by the buffer (documented public API), so setting QQuickWindow::TextureOwnsGLTexture in QWaylandTextureProvider is wrong. Task-number: QTBUG-70163 Change-Id: I831f2aa81ed20c08d4d87bccac33650ab86d19c8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Compositor: Fix resize grab release for xdg-shell-v6Johan Klokkhammer Helsing2018-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The grab was only released for the move state, so if a window was resized, it would continue to be in the resize state until it was moved. This makes sure all grabs are released when the mouse is released. [ChangeLog][Compositor] Fixed a bug where ShellSurfaceItems for XdgToplevelV6s wouldn't stop resizing. Task-number: QTBUG-70126 Change-Id: I37d8359dca5f21f2fb52b781a94846a961211a02 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Client: Remove unused constructor for xdg-shell v5Johan Klokkhammer Helsing2018-09-062-6/+0
| | | | | | | | | | Change-Id: Idcb2220237b3dba0a296fbb9a86497a3d0022d5f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Fix warnings about unused parametersJohan Klokkhammer Helsing2018-09-061-0/+2
| | | | | | | | | | Change-Id: Id15149f3b222f753a7fda3643d19087a3b54f6ed Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Fix build without QtQuickJohan Klokkhammer Helsing2018-09-051-0/+2
| | | | | | | | | | | | | | QT_BEGIN_NAMESPACE wasn't included. Change-Id: I3001cca1dfd2032a735cf1fcc7540d761a7bb3d8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Client: Use customized version of generated files for xdg-shell-v5Johan Klokkhammer Helsing2018-09-0513-23/+1868
| | | | | | | | | | | | | | | | | | | | | | | | | | Check in qtwaylandscanner and wayland-scanner generated files with renamed symbols to avoid conflicts with xdg-shell stable. When this was done on the compositor side, we thought we didn't have to do it for the client side because the conflicting symbols are used in separate plugins. Turns out this breaks static builds, though. Task-number: QTBUG-69896 Change-Id: I461df8e136b741063eafe13e858734a3aafdf020 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Remove XdgToplevel.DefaultDecorationModeJohan Klokkhammer Helsing2018-09-053-10/+9
| | | | | | | | | | | | | | It can't be set or read through public API. Change-Id: Ieebec0d8678a023ea39b3964f92716eda3a51ac0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor xdg-decoration: Fix crash when clients disconnectJohan Klokkhammer Helsing2018-09-055-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If clients were disconnected without shutting down nicely, e.g. if Qt clients were terminated with SIGINT, then QWaylandXdgToplevelDecorationV1 would be deleted before its Wayland resource, causing a crash in the resource destroy handler. This switches to a raw pointer in the toplevel, which is now cleared when the decoration is deleted. Deletion order is also ensured by conditionally destroying the resource in the toplevel destructor. Warnings are also printed when clients destroy objects in the wrong order (protocol errors). Change-Id: I8c24becb82e298e93cd45d70a004d8d23ead382b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Add documentation for xdg-decoration-unstable-v1Johan Klokkhammer Helsing2018-09-052-0/+102
| | | | | | | | | | | | | | And QWaylandXdgToplevel::decorationMode Change-Id: I52146b55757b6866061c7b06d2595e233d6af1ff Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor xdg-decoration: Make preferredMode's signal match the propertyJohan Klokkhammer Helsing2018-09-053-8/+8
| | | | | | | | | | | | | | And the private variable. This was just an oversight when refactoring. Change-Id: Iebe76ce3d4d192560f2e5b76e58463061c9c2dbb Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Client: Deprecate xdg-shell-v5 and wl-shellJohan Klokkhammer Helsing2018-09-052-0/+8
| | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] Deprecated the shell integrations for xdg-shell-unstable-v5 and wl-shell. The stable version of xdg-shell should be used instead. Task-number: QTBUG-68838 Change-Id: Iab89059ec13efc2f72c3317a26439d7683e03e79 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Fix regression in QWaylandGlContext::makeCurrent for offscreen surfacesJohan Klokkhammer Helsing2018-09-042-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] Fixed a bug where offscreen surfaces would get surfaceless EGL contexts. Fixes a regression in in bf09c7a1. The call, window->updateSurface(window->isExposed()), is problematic because offscreen textures are never exposed, and consequently, eglSurface will be EGL_NO_SURFACE, which will then create a surfaceless context in the call: eglMakeCurrent(m_eglDisplay, eglSurface, eglSurface, m_context) This reverts to the old behavior of always trying to create an EGL surface, unless the window doesn't have a valid wl_surface, in which case it doesn't make sense (which is what bf09c7a1 fixed, QTBUG-65553). Task-number: QTBUG-70242 Task-number: QTBUG-68605 Task-number: QTBUG-67601 Change-Id: I44b07bb8bf4b33c73c6379a1de8e9e5cfd220b51 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Fix incorrect hotspot when output.scaleFactor != dprJohan Klokkhammer Helsing2018-08-311-1/+8
| | | | | | | | | | | | | | | | | | This makes WaylandCursorItem automatically move the cursor hotspot when the scale factor or dpr changes Task-number: QTBUG-70134 Change-Id: I146ad81e92fe708a6141271ea173bf053b5e05c8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Update WaylandQuickItem size on new dpr or scaleFactorJohan Klokkhammer Helsing2018-08-303-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | updateSize() depends on both screen devicePixelRatio and output scaleFactor. Make sure to call it when they change. This still doesn't handle all cases, because there is no signal for when a screen device pixel ratio changes, but we update when we get a new screen, which should be good enough in most cases Change-Id: I4550cf580d4821e4b0f4da0d2eb7bb8d9ab823cf Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Fix nullptr dereferences in fromResource functionsJohan Klokkhammer Helsing2018-08-296-7/+21
| | | | | | | | | | | | | | | | | | If there was no resource for the given wl_resource*, don't try to dereference it. Change-Id: I3a27a5805699148bb26029e8b4179042c3c1117a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Scanner: Don't crash when calling fromResource with nullptrJohan Klokkhammer Helsing2018-08-291-0/+2
| | | | | | | | | | | | Change-Id: I85c17e50cf917a51e74fa03fcdc647def6e4bdfd Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Compositor: Fix assignment to null object in WaylandCursorItemJohan Klokkhammer Helsing2018-08-291-10/+7
| | | | | | | | | | | | | | | | | | | | setCursor would sometimes be called on null objects causing a JavaScript error. Use Connections instead which will disconnect the signal automatically if either side is destroyed or in case seat is reassigned. Change-Id: I70686937b510ab516f27f1e61b2f2a921e74f4b3 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Fix incompatibility between QML and C++ instantiated objectsJohan Klokkhammer Helsing2018-08-2912-54/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a source incompatibility introduced in 9ebba7c3a. In Qt 5.11 it was possible to have the following code: XdgShellV6 { property XdgToplevelV6 top onToplevelCreated: top = toplevel } After, 9ebba7c3a, however, this would fail because XdgToplevel refers to QWaylandXdgToplevelV6ParentClass, while QWaylandXdgShellV6::toplevelCreated emits a QWaylandXdgToplevelV6. It would also break instanceof, i.e.: onToplevelCreated: console.log(toplevel instanceof XdgToplevelV6) This patch reverts to C++ and QML using the same type (no subclassing for QML types), but still lets the items have children in QML by putting the macro inside each class instead. Task-number: QTBUG-70090 Change-Id: I8efa8f68ebc4dc2289b4a9b96402b0c00d45547d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: emit outputAdded if setDefaultOutput adds an outputJohan Klokkhammer Helsing2018-08-291-2/+4
| | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Fixed a bug where outputAdded was not emitted if a new output was added through QWaylandCompositor::setDefaultOutput. Change-Id: I875badd340d6241fda7a5fce9b3bba8ca8b2f560 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Client: Fix regression; drawing decorations of active windows as inactiveJohan Klokkhammer Helsing2018-08-285-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | We can't trust QWindow::isActive, because it relies on focusWindow, which may be updated too late, and there might also be multiple active toplevel windows at once on Wayland. Even though Qt doesn't support multiple seats, we should still draw the decorations of active windows correctly. This implements QPlatformWindow::isActive and uses it in the decorations. Change-Id: I34d79b354e2d26694533e2319a26f24085212243 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Fix resize grab release for xdg-shell stableJohan Klokkhammer Helsing2018-08-271-1/+1
| | | | | | | | | | | | | | This is the same bug as QTBUG-70126, but for the stable version. Change-Id: I8cad104d6ebc980835c47d455968b2b9e63c6169 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-08-252-3/+4
|\| | | | | | | Change-Id: Ib6d23655a5c9ee059a9560e862d38746f508caee
| * Docs: Fix incorrect \since for QWaylandXdgSurfaceV6Johan Klokkhammer Helsing2018-08-171-1/+1
| | | | | | | | | | Change-Id: Iac85af45ee0cb43c908983b331f2d50ed68bd036 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Client: Clear entered screens when resetting windowJohan Klokkhammer Helsing2018-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, windows that were hidden and shown again would have the old list of entered screens. Aside from occasionally getting the current screen wrong, this also polluted the log with bogus warnings about unexpected enter events. This problem could be seen quite easily by opening, closing and opening a menu. [ChangeLog][QPA plugin] Fixed a bug where a window that was hidden and then shown on different screen would still think it was on the first screen. Change-Id: I1b27433ea6607a218384d814ae4c16b9c4395948 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Docs: Fix incorrect return types in WaylandXdgSurfaceV6Johan Klokkhammer Helsing2018-08-141-2/+2
| | | | | | | | | | Change-Id: I5ebf22aa94393645df806e8d653a98ae13117909 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Compositor xdg-shell: Respect min and max sizeJohan Klokkhammer Helsing2018-08-173-7/+17
| | | | | | | | | | | | | | | | [ChangeLog][Compositor] xdg-shell minimum and maximum sizes are now respected when resizing. Change-Id: Iaf6a2bd283117e948fda6693530e08f68f755a17 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | xdg-shell stable: Make sure popup parent is topmost popup when grabbingJohan Klokkhammer Helsing2018-08-172-3/+32
| | | | | | | | | | | | | | | | | | Avoids protocol errors on Weston, gnome-shell and wlroots-based compositors. This is the same fix as 75c996e7, but for the stable version of xdg shell. Change-Id: Ic998fb920a8b1b131e42833a61e663704c8663e4 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>