summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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>
* | 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-179-1/+385
| | | | | | | | | | | | | | | | 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>
* | 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>
* | 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-157-0/+2978
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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-1411-9/+456
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [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>
* | 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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-072-6/+5
|\| | | | | | | Change-Id: I7947816edbfef4e07d488d25122cfd9a969436db
| * Fix compilation of QtWayland without QtQuickAlexander Schlarb2018-08-032-6/+5
| | | | | | | | | | Change-Id: I0baf542f89274f48bf7d02121a07d64f0f3a001b Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Add XdgOutput client supportDavid Edmundson2018-08-037-7/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XdgOutput is an extension of wl_output with the benefit of having the logical size of a screen as an explicit parameter, instead of clients inferring it from modeSize / scale. This is useful as it allows compositors to implement fractional scaling whilst clients can still fill the screen. In the future XdgOutputV2 will support a more useful name and ID that we can use. [ChangeLog][QPA plugin] Added support for xdg-output-unstable-v1 Change-Id: I2e1e64ad6cb497a1cbb7b7b170f28ac92231c2c4 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-103-3/+19
|\| | | | | | | Change-Id: I4c25009c207ab36219976e75343a9b6398d3a42d
| * Proper naming for backingstore logging categoryPaul Olav Tvete2018-07-091-3/+3
| | | | | | | | | | | | | | | | The logging category is exported, so the name should be specific. Change-Id: Iffdc89875ef9e3091009780edc614fee10c05532 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Fix static builds with libwayland-eglSamuli Piippo2018-06-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a naming conflict between the client buffer integration, wayland-egl, and the system library libwayland-egl.so Rename the plugin binary to qt-plugin-wayland-egl to avoid the issue. This commit appends commit 83db09bd0acaafb256880e3a217ed9df0641a00a which did the same for the client plugin Task-number: QTBUG-65652 Change-Id: I245192a9f844945200209cc2e3a9f419c541d33b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Send damage for window decorationsJohan Klokkhammer Helsing2018-06-291-0/+14
| | | | | | | | | | | | | | | | | | | | | | Compositors that only update damaged regions would show the old content of the decorations. [ChangeLog][QPA plugin] Fixed the window decorations sometimes not updating on some compositors. Change-Id: I75ab40e159bf165152a58e438dd7f70e7f9e9b22 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Draw disabled text color for inactive window decorationsJohan Klokkhammer Helsing2018-06-292-2/+11
| | | | | | | | | | | | | | Task-number: QTBUG-68834 Change-Id: Iced478d12b56fc360c0d824cf5876855d887f9a2 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-2810-15/+50
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandxdgsurface.cpp src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h Done-with: Johan Klokkhammer Helsing <johan.helsing@qt.io> Change-Id: Ia39be6254a95af1c4efa831358cc06a697da3423
| * Make sure generated headers are installedPaul Olav Tvete2018-06-281-0/+3
| | | | | | | | | | | | Task-number: QTBUG-68773 Change-Id: Ia00c2438ef7ce6be7dc7d05efbba3bc7f27fe62f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Implement QWaylandXdgSurface::xdg_surface_close()Daniel d'Andrada2018-06-281-0/+1
| | | | | | | | | | Change-Id: Ia2f708fc668a802f4468efd0765f36aab0944e10 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Merge remote-tracking branch 'origin/5.11.1' into 5.11Qt Forward Merge Bot2018-06-192-5/+36
| |\ | | | | | | | | | Change-Id: Idd23894d256f83518f2cd25d7c13f5a09c7d577e
| | * Merge 5.11 into 5.11.1Oswald Buddenhagen2018-06-071-1/+12
| | |\ | | | | | | | | | | | | Change-Id: I3d3cc001320febd64529f0997b88efd69303fa30
| | * | xdg-shell v6: Make sure popup parent is topmost popup when grabbingJohan Klokkhammer Helsing2018-06-052-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids protocol errors on Weston, gnome-shell and wlroots-based compositors. [ChangeLog][QPA Plugin] Fixed a protocol error that sometimes happened when showing popups such as nested menus on xdg-shell unstable v6. Task-number: QTBUG-67988 Change-Id: I037aec94fba3d177dd0392e5a216a604bc65ac4f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | | Doc: Add missing dots (qtwayland)Paul Wicking2018-06-196-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I02ba2e659d21923934dab970af23856b45ff1570 Reviewed-by: Johan Helsing <johan.helsing@qt.io>