summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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-053-3/+11
| | | | | | | | | | | | | | | | | | | | [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-297-8/+24
| | | | | | | | | | | | | | | | | | 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>
* | server-side-decoration example: Implement window movePaul Olav Tvete2018-08-211-12/+23
| | | | | | | | | | Change-Id: I5e876338a37dc3126ce8b7950d2eef58ec09c07d Reviewed-by: Johan Helsing <johan.helsing@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>
* | Compositor xdg-shell: Make constructors explicitJohan Klokkhammer Helsing2018-08-171-7/+7
| | | | | | | | | | Change-Id: If00feef8c7e55fc2ac56b9a0e5bfeabfa158efc6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor API: Add xdg-decoration unstable v1 supportJohan Klokkhammer Helsing2018-08-1716-1/+614
| | | | | | | | | | | | | | | | And add an example with server-side window decorations. Task-number: QTBUG-69934 Change-Id: Ic3984b50cf7574cae5135dea51eb4b1c80bb45a7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Add QWaylandXdgToplevel::fromResourceJohan Klokkhammer Helsing2018-08-172-5/+9
| | | | | | | | | | Change-Id: I0f388a4c4f6b765c34d115a6583982d86bc82557 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Upgrade wayland.xml to version 1.10.0Robin Burchell2018-08-172-85/+662
| | | | | | | | | | Change-Id: I85b58ca9d14a1d37959475b05e0be8c9c8721186 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Fix list of shell integrations in READMEPaul Olav Tvete2018-08-171-1/+1
| | | | | | | | | | Change-Id: I65cb3b02c6722a3140cec85c36ba1ddbb11b37ae Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Compositor: Subsurface placeAbove/Below implementationPaul Olav Tvete2018-08-173-0/+127
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Added support for wl_subsurface.place_above and place_below in WaylandQuickItem. Task-number: QTBUG-49809 Change-Id: Ie30c342f329c26feaa954f8909b61b139e5588dc Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Add mouse and keyboard handling to minimal-cpp examplePaul Olav Tvete2018-08-165-18/+168
| | | | | | | | | | | | | | ...and do some other minor cleanups. Change-Id: I7fe2c70d8b2de37cee5cc114cc0148d31821e10f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Client: Handle conversion from xdg-shell resize edges correctlyJohan Klokkhammer Helsing2018-08-162-31/+44
| | | | | | | | | | | | | | | | | | There are two different types of edges in xdg-shell. Make it more explicit which ones we are using. Change-Id: I7e18a376b359be8e06f96cae897d7ccbc62e3c3e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Compositor xdg-shell v6: Remove incorrect Q_UNUSEDsJohan Klokkhammer Helsing2018-08-151-7/+0
| | | | | | | | | | Change-Id: Iddd6671316b3748e5156625f0dab1ee3d26e915a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor API: Add xdg-shell stableJohan Klokkhammer Helsing2018-08-1514-10/+3004
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor API] Added APIs for xdg-shell stable. Code copied from the V6 implementation with suffixes and prefixes removed. Otherwise a few minor edits, such as renaming xdg_shell to xdg_wm_base, and handling the anchor and gravity edges no longer being bitfields. Examples that used v6 have been updated to use stable instead, or, in some cases, to support both. Task-number: QTBUG-66784 Change-Id: Ia619b478a938fdcd9b47af8a8df2d7fcc4406204 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Client: Implement xdg-decoration-unstable-v1 for SSD supportJohan Klokkhammer Helsing2018-08-1412-9/+458
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] Added client-side support for the xdg-decoration-unstable-v1 Wayland extension. Qt clients will now let the compositor draw the window decorations if configured through this extension. Note: The env var QT_WAYLAND_DISABLE_WINDOWDECORATION is still supported, but works on a higher level, and for all shell integrations, while xdg-decoration only works with xdg-shell stable. Task-number: QTBUG-69746 Change-Id: I9dd0331bbd8d624c6be54ed23ee3b96446d5820d Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Compositor: Use customized version of generated files for xdg-shell-v5Johan Klokkhammer Helsing2018-08-149-11/+2388
| | | | | | | | | | | | | | | | | | Checking in wayland-scanner and qtwaylandscanner generated files with renamed symbols to avoid conflicts with xdg-shell stable. Task-number: QTBUG-66784 Change-Id: I1b1a055d3be12bfa7d16e7bb7209e96497cbf28c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-1410-8/+45
|\| | | | | | | Change-Id: Ia9584a185a3d7a68a4333890ade535585ba33fee
| * Client: Don't leak toplevels for xdg-shell-unstable-v6Johan Klokkhammer Helsing2018-08-081-2/+4
| | | | | | | | | | | | Change-Id: Ifd6d4956eeed663e45219b428dfe562e7a82e626 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Don't commit same buffer multiple timesPaul Olav Tvete2018-08-086-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt we call flush() when we think the window might need to be updated. It is also possible to trigger a flush while painting. Two fixes: 1) If there are attempted flushes between beginPaint() and endPaint, queue them up, and do them in endPaint(). 2) Make sure we only commit the buffer once: after that the compositor owns the buffer, and it can repaint on its own. Change-Id: Ibf61068fa95760eb67dbc0b1d0534854114ea528 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Handle subsurfaces added before QWaylandQuickItem createdPaul Olav Tvete2018-08-073-0/+8
| | | | | | | | | | | | | | | | This makes gstreamer and Firefox work with QML-based compositors. Task-number: QTBUG-69643 Change-Id: Iaddaeb7dc3493a262993eecc5ea0b6ce076b4044 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Client: Return a fixed value for the logical screen DPIGiulio Camuffo2018-08-131-4/+8
| | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] Font and UI scaling is now based on the screen scale factor rather than the physical DPI. The logical DPI is set to 96 unless overridden by the the environment variable QT_WAYLAND_FORCE_DPI, which may be set to a specific DPI or to "physical" to get the old behavior. Change-Id: Ife417bf5537b0f6c9ecceffea46937951770b150 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Client decorations: Don't spam mouse leave eventsJohan Klokkhammer Helsing2018-08-131-1/+3
| | | | | | | | | | | | | | | | Previously, we would send one leave event each time the mouse was moved on the decorations. Change-Id: I57bd6e57261447db8a8c5ab45dc8f3fdfed33a49 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor API: Deprecate xdg-shell unstable v5Johan Klokkhammer Helsing2018-08-101-0/+12
| | | | | | | | | | | | | | | | | | | | | | The shell extension is not much used anymore, and needs a lot of hacks to build. It should eventually be removed to ease maintenance. [ChangeLog][Compositor API] xdg-shell unstable v5 is now deprecated. Existing applications should migrate to v6. Change-Id: Ic77ff8e6183c20271a5298952f47ab2789cfab89 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Client: Log configure states to logging categoryJohan Klokkhammer Helsing2018-08-092-0/+4
| | | | | | | | | | | | | | | | | | States are not visible in WAYLAND_DEBUG output since array values are not printed there. Logging the states to the Wayland QPA logging category gives us a convenient way of seeing what states are configured. Change-Id: If71c6df3180eba3f8efb08135a67b417940c3ffe Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Fix nullptr dereference in event filterJohan Klokkhammer Helsing2018-08-091-26/+35
| | | | | | | | | | | | | | | | Could happen if events were received before the default seat had been initialized Change-Id: I09d97a4b747b75b5c580386f7e0d45715274ed8b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | qwindow-compositor: rename input to seatJohan Klokkhammer Helsing2018-08-091-6/+6
| | | | | | | | | | | | | | This should have been done when we renamed from inputDevice to seat. Change-Id: I4a296322fc79a6dd6d30ee2b1c97c3a818cc568e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Convert qtwaylandscanner into a classJohan Klokkhammer Helsing2018-08-091-128/+191
| | | | | | | | | | | | | | | | Encapsulate what the scanner needs of functions and state into a class, Scanner, instead of keeping everything in the global namespace. Change-Id: Idd4b412bb7f709f24c86abe82b135c09b7985878 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Client: Fix memory leak for xdg_popup and xdg_toplevelJohan Klokkhammer Helsing2018-08-081-4/+8
| | | | | | | | | | Change-Id: I561e2af0cdc812ea4f499525b4af0a4ab7ad8182 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | hwlayer-compositor example: Remove xdg-shell unstable v5 supportJohan Klokkhammer Helsing2018-08-071-1/+0
| | | | | | | | | | Change-Id: Iac4189584286995f2d03d16fe4edfe74367e0645 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Multi-screen example compositor: Upgrade to xdg-shell unstable v6Johan Klokkhammer Helsing2018-08-072-4/+4
| | | | | | | | | | Change-Id: Ifdee719cd79516a36ba9282abac9c59afacf542f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-073-8/+10
|\| | | | | | | Change-Id: I7947816edbfef4e07d488d25122cfd9a969436db