summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions
Commit message (Collapse)AuthorAgeFilesLines
* Don't crash at application exitwip/texturesharing-5.12Paul Olav Tvete2019-06-051-1/+1
| | | | | | | | | | | | | | | Qt Quick may destroy objects after QGuiApplication shutdown. It is not possible to call any QOpenGL functions at that point (including QOpenGLContext::currentContext()), and there is no point since the graphics resources will be released by the system anyway. Fixes: QTBUG-76053 Change-Id: Ic86c8fb5a34126ab03178cda3071d712582ed496 Reviewed-by: Johan Helsing <johan.helsing@qt.io> (cherry picked from commit 280d0e557eabe9410632edf32ed46e712535c45b) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'qt/5.12' into texturesharing-5.12Paul Olav Tvete2019-06-056-8/+36
|\ | | | | | | Change-Id: Ib8fba00f848821bfab58d33aff74ace436af204a
| * Compositor: Fix compilation problems for qwaylandshell.hJohan Klokkhammer Helsing2019-04-172-2/+26
| | | | | | | | | | | | | | | | | | | | | | d65783c broke compilation for code that includes qwaylandshell.h, but not qwaylandshell_p.h, because QWaylandShellPrivate is an incomplete type and we don't know that it's convertible to QWaylandCompositorExtensionPrivate by just looking at the public header. And we can't move the QWaylandShellTemplate constructors to the cpp file because it's a template class. Change-Id: Ia2d093de74429ace33d08b91743cbc8b7e7befa8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * compositor: fix QWaylandShell private objects inheritanceChristophe Chapuis2019-04-035-6/+10
| | | | | | | | | | | | | | | | | | | | If the public API has inheritance relationships, this should be reflected in the private classes too. Otherwise the d_func will cast to a wrong type, leading to crashes. Change-Id: Iad2dccad4b63326e6b108a44c708ab51f0784678 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | New texture sharing protocol and infrastructurePaul Olav Tvete2019-03-293-3/+661
|/ | | | | | | | | | | | | | | This adds a higher level protocol on top of the server buffer extension, providing an easy way for Qt Quick applications to use the shared textures. [ChangeLog] Added protocol and Qt Quick image provider for sharing textures in graphics memory between compositor and multiple clients. Task-number: QTBUG-73822 Change-Id: Idc41b3479d6ca37be35d9ccd7b89e9994ff17f8f Reviewed-by: Johan Helsing <johan.helsing@qt.io> (cherry picked from commit 80001cbf0451f4ba2a971fb20b80dc8e25ac604d) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* 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>
* 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>
* 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>
* 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>
* 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>
* | Compositor: Automatically create ShellSurfaceItems for popupsJohan Klokkhammer Helsing2018-05-185-2/+83
| | | | | | | | | | Change-Id: I5e6b0147c4f1bb73ff3a8f5512d21884f962a89a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Rename xdg-shell.xml to xdg-shell-unstable-v5.xmlJohan Klokkhammer Helsing2018-05-142-2/+2
|/ | | | | | | | | Also change the protocol name in the xml file from xdg_shell to xdg_shell_unstable_v5 (similar pattern as v6) because qtwaylandscanner doesn't support the file name being different from the protocol name. Change-Id: I1d9edf7c8ca512e716284250a2b2bc13e205c33c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Add documentation for XdgSurfaceV6::toplevel and popupJohan Klokkhammer Helsing2018-03-261-0/+34
| | | | | | Change-Id: I8ad5f8ad60081647aef2472fea462f37ff62b8b4 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* Compositor: Add documentation for XdgShellV6Johan Klokkhammer Helsing2018-03-261-0/+77
| | | | | | Change-Id: Ic6976f8368be7bbd61652fc1b62b6439d3509b81 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* Fix QWaylandXdgToplevelV6Private::lastSentConfigure()Johan Klokkhammer Helsing2018-03-211-1/+1
| | | | | | | | | | | Previously it would return the first pending configure instead of the last. This could sometimes cause sent state or size to get lost if handleFocusReceived() and one of the sendConfigure variants happened in rapid succession. Change-Id: I8cb379c4bcb7b05c027f7ede31e946ac5717d305 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Compositor: Fix various documentation issues for XdgShellV6Johan Klokkhammer Helsing2018-03-181-27/+25
| | | | | Change-Id: Ibb7063e10cd99294025935d073a96a7e8bf6ea22 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Compositor: Don't call send_configure variants with an invalid sizeJohan Klokkhammer Helsing2018-03-153-0/+12
| | | | | | | | Print a warning and return instead. Change-Id: I1db5109f633ee2dc7d252b387c207f474784da43 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>