summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions
Commit message (Collapse)AuthorAgeFilesLines
* Compositor xdg-shell: Warn when clients supply invalid anchor rectsJohan Klokkhammer Helsing2019-01-182-10/+28
| | | | | | | | | | | From the protocol: "When the xdg_positioner object is used to position a child surface, the rectangle may not extend outside the window geometry of the child's parent surface." Adds a warning for both v6 and stable when clients do this. Change-Id: I575a89785f45c080d488be748ec099569b38ea9b Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Clean up .gitignorePier Luigi Fiorini2019-01-171-0/+3
| | | | | | | | | Ignore more files resulting from the build process. Glob all scanner generated files, and add exceptions for pregenerated files. Change-Id: Ica60951356bdc145ebd66f5e6fc6bf4e23f2aa72 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Member init for some variables that are not covered by constructorsJohan Klokkhammer Helsing2019-01-163-6/+6
| | | | | | | Where it makes sense, default init variables to sensible values Change-Id: Ie2aa6ab79a6a3c8322bb0ff804f340f7ffd1c1d1 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Compositor: Implement support for the viewporter extensionJohan Klokkhammer Helsing2019-01-024-0/+403
| | | | | | | [ChangeLog][Compositor] Added support for the viewporter Wayland extension. Change-Id: I1d33652fab6ff18da4ae1ae3497f0ca43517420a Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-052-0/+12
|\ | | | | | | | | | | | | Conflicts: src/compositor/compositor_api/qwaylandquickitem.cpp Change-Id: I5e01a0731e880e3eb8eab349043756a5993e3050
| * Fix compilation with gcc 4.8Ville Voutilainen2018-12-042-0/+12
| | | | | | | | | | | | | | | | | | | | GCC 4.8 doesn't like QPointers in signal connections. Also, Default Member Initializers for aggregates are C++14, so we need to write a constructor to make a class with DMIs work in C++11. Change-Id: I567c60a8081fa2f268517ec747bd6534674bcce5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-041-0/+1
|\| | | | | | | Change-Id: I29192963efa6753a4cf222a3aec92ab400deb2f0
| * Fix build due to missing QDebug includeSergio Martins2018-11-301-0/+1
| | | | | | | | | | | | | | Build was failing on Archlinux Change-Id: I3cf9a367a099cd365a2de6579c7ef5585cd9be56 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Add convenience for converting wl_resource * to wrapper typesJohan Klokkhammer Helsing2018-11-216-31/+30
| | | | | | | | | | Change-Id: Ieb2f9706ac707ff878165d3f9001e4a28b8ff1ce Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Fix coordinate system inconsistenciesJohan Klokkhammer Helsing2018-11-167-35/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several properties were using pixel coordinates and surface coordinates without converting. [ChangeLog][Compositor] QWaylandSurface::destinationSize has been added which returns the size of the surface that will be displayed on the screen in surface coordinates. [ChangeLog][Compositor] Fixed a bug where QWaylandSurface::inputRegionContains would return true for some points outside surfaces with buffer scale > 1. [ChangeLog][Compositor] Fixed a bug which caused ShellSurfaceItems for surfaces with buffer scale > 1 to move too much when resizing interactively. It also gets rid of all calls to QWaylandSurface::size, which confusingly returns the size of the surface's buffer in pixel coordinates. Most properties now use destionationSize's surface coordinates consistently. Hopefully, QWaylandSurface::size can be renamed or removed in Qt 6. Change-Id: I007256a8df7759cf74fbfd51624fa1f90c083336 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-091-0/+4
|\| | | | | | | Change-Id: Ib4c65db63c2f3119fc7c157d4353c4e0ecebefb0
| * Don't send ivi_surface configure events with negative sizeJohan Klokkhammer Helsing2018-10-041-0/+4
| | | | | | | | | | | | | | Similarly to how we don't do it for xdg_shell or wl_shell. Change-Id: I61cd453858c9fdff148364f4dfb85c345943725c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Don't include system versions of wayland protocolJohan Klokkhammer Helsing2018-10-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wayland-client.h and wayland-server.h includes protocol generated for the version of wayland.xml corresponding to the libwayland version. This becomes a problem when we want to support a version of wayland.xml that's newer than the system libwayland. The solution is to include wayland-client-core.h and wayland-client-server.h instead. These headers don't include any wayland-scanner generated code, so we can safely compile and link code generated against the version of wayland.xml that we ship. [ChangeLog] Code generated by qtwaylandscanner now includes wayland-client-core.h and wayland-server-core.h instead of wayland-client.h and wayland-server.h. This might break source compatibility for code using custom wayland extensions. Fixes: QTBUG-70553 Change-Id: Ice0cdb60ecc4f936acc0e158b96f7978549f62c1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-252-7/+7
|\| | | | | | | Change-Id: I66c91dfde14a7c252a02777cfcf0396b1d05e854
| * Change compositor categorized logging namespacePaul Olav Tvete2018-09-201-4/+4
| | | | | | | | | | | | | | | | | | [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-181-3/+3
| | | | | | | | | | | | | | | | | | 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>
* | Compositor: Fix popup positions on screens when DPR != 1Johan Klokkhammer Helsing2018-09-244-12/+12
|/ | | | | | | | | | | | | | [ChangeLog][Compositor] Fixed a bug where xdg-shell popups were misplaced when devicePixelRatio was not 1. The fix is to use the more robust QWaylandQuickItem::mapFromSurface instead. Also made wl-shell use mapFromSurface, although it already accounted for devicePixelRatio. Fixes: QTBUG-70662 Change-Id: I8be3ea76d6bcfd6d6974d532d160c20e44499382 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Remove ifdefs for unsupported libwayland versionsJohan Klokkhammer Helsing2018-09-171-9/+0
| | | | | | | The ifdefs were for version 1.2.0. Change-Id: Ie58745c7cf4c0fba45bc5203d24e9913d3a8b8ce Reviewed-by: Paul Olav Tvete <paul.tvete@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>
* 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>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-061-1/+1
|\ | | | | | | Change-Id: I06b86b413984c07f6be98120450bc859dab271c1
| * 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>
* | Fix warnings about unused parametersJohan Klokkhammer Helsing2018-09-061-0/+2
| | | | | | | | | | Change-Id: Id15149f3b222f753a7fda3643d19087a3b54f6ed 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>
* | Compositor: Fix nullptr dereferences in fromResource functionsJohan Klokkhammer Helsing2018-08-292-3/+9
| | | | | | | | | | | | | | | | | | 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>
* | Fix incompatibility between QML and C++ instantiated objectsJohan Klokkhammer Helsing2018-08-295-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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-251-3/+3
|\| | | | | | | 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>
| * 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>
* | 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-177-0/+380
| | | | | | | | | | | | | | | | 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>
* | 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-156-0/+2970
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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>
* | Compositor: Use customized version of generated files for xdg-shell-v5Johan Klokkhammer Helsing2018-08-148-10/+2387
| | | | | | | | | | | | | | | | | | 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>
* | 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>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-284-7/+10
|\| | | | | | | | | | | | | | | | | | | | | 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>
| * Doc: Add missing dots (qtwayland)Paul Wicking2018-06-193-7/+7
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I02ba2e659d21923934dab970af23856b45ff1570 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Compositor: XdgShellV6: don't send -1x-1 prior sizeMatt Hoosier2018-06-281-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Addresses a corner case where the toplevel surface is initially shown maximized, then attempts to toggle down to normal windowed state. The compositor's bookkeeping had been mistakenly sending the default-constructed -1x-1 QSize rather than realizing that that a 0x0 configure event should be emitted to signify that the client should choose pick an appropriate size. [ChangeLog][Compositor] Fixed an edge case in moving an initially- maximized XdgShellV6 surface to windowed mode. Change-Id: I5cc0f501573960b9298da4e002e9569c4cb5e64e Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Compositor: make XdgShellV6 reconfigure clients on mode-changeMatt Hoosier2018-06-202-4/+48
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Made the zxdg_shell_v6 compositor protocol implementation re-issue configure requests with updated sizes when the size or available geometry changes on an output used by a maximized or fullscreen surface. Change-Id: Ia446511f123e831b2d0a35ba202a6d092a841569 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Compositor: make WlShell reconfigure clients on output geometry changeMatt Hoosier2018-06-172-3/+54
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Made the wl_shell compositor protocol implementation re-issue configure requests with updated sizes when the size or available geometry changes on output used by a maximized or fullscreen surface. Change-Id: I5a688afb315523281d6661e2d098423acfb1a297 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Compositor: implement fullscreen for XdgShellV6Matt Hoosier2018-06-173-5/+53
| | | | | | | | | | | | | | | | | | | | | | This is patterned closely after the existing handling for maximization. [ChangeLog][Compositor] Added support for handling xdg-shell v6 requests to enter/exit fullscreen mode. Change-Id: I1f3127694d8537d76159b56350f35a4e8aa3e56d Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Replace qtkey-extension with qt-key-unstable-v1Johan Klokkhammer Helsing2018-05-243-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove the "dummy" request, which seems to be just leftover test code. - Rename the event from "qtkey" to "key". We've already prefixed the global interface, no need to also prefix the event. - Prefix the global with `zqt_` and suffix it with "_v1". If we make backwards incompatible changes, we should bump the suffix, rename the xml-file and reset the version number. - Add some documentation to the xml file. - Add notice about (lack of) compatibility guarantees. - Four spaces for indentation Task-number: QTBUG-68423 Change-Id: I78f0eaff4cac22f27318ba32c83c83feb2de857a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>