summaryrefslogtreecommitdiffstats
path: root/examples/wayland/multi-output
Commit message (Collapse)AuthorAgeFilesLines
* Use WaylandCursorItem over clients, window system cursor otherwiseShawn Rutledge2020-05-291-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pre-existing binding visible: cursorItem.surface != null implied that the surface would often be null; but in practice it was only null at startup. After entering a client window, whatever cursor it set would be retained when the mouse left the window. With client- side decorations, this could go unnoticed, because often the mouse would go across the titlebar or edge decorations on exit, and those would set the cursor back to a standard arrow. But in compositors that implement a lot of Qt Quick content of their own (server-side decorations and/or built-in features such as menus, docks etc.), that content cannot change the cursor that the WaylandCursorItem shows. Instead, we need the underlying window system cursor to be shown whenever the mouse is not hovering over a client window. As a drive-by, remove the inputEventsEnabled: false declarations from the examples, because WaylandCursorItem already does that internally. The pure-qml example is not fixed; it shows the window system cursor only when the compositor is a nested compositor. When it's not nested, you just have to move the mouse slowly enough to avoid "jumping over" the window edges. Or run clients that don't change the cursor. Fixes: QTBUG-84391 Change-Id: I3e677f3e4314d01e5d27d8eea49b4cb315c29d03 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> (cherry picked from commit 0b253e8c595b596f44959d21124887545ab0b021) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Compositor: Add xdg-output unstable v1 supportPier Luigi Fiorini2019-08-263-3/+21
| | | | | | | | | | | | | | | | | | | | | | | We already have a client-side implementation in the QPA plugin, and now we add the server-side implementation. In order to have a nice declarative API, we let users create a XdgOutputV1 instance and then associate it with the zxdg_output_v1 object when it is requested by the client. If the user forgets to create XdgOutputV1 beforehand we post an error to the client. To anticipate protocol version 3, we send zxdg_output_v1.done when we send wl_output.done. The multi-output example is extended using this protocol. [ChangeLog][Compositor] Added support for xdg-output unstable v1 Wayland extension. Change-Id: I1ec5913d8330cc01d7d634d05a289f4dc8b4fd22 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Fix outdated FDL license headerKai Koehne2017-10-201-5/+5
| | | | | Change-Id: Id4ba079514c7844821adac3c0c108af7deb57889 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix licensingv5.9.0-beta4Jani Heikkinen2017-05-045-10/+60
| | | | | | | | | | Currently tests are licensed under GPL-EXCEPT, examples under BSD and src under LGPL so replase old license headers with new & proper ones. Also remove old & unused license files Task-number: QTBUG-57147 Change-Id: Ia6a738798736c275dc309ccfa5b627dc2178d241 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add mode support to QWaylandOutputPier Luigi Fiorini2016-10-032-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Outputs usually have more than one mode, add an API to support them. When sizeFollowsWindow is true, modes are replaced by one with the window size and refresh rate. In that circumstance the mode changes when the window is resized. The sizeFollowsWindow property default value is no longer true. The setGeometry() method is gone as it doesn't make sense now, the setWidth() and setHeight() methods are now private slots to resize the resolution as the window resizes (and sizeFollowsWindow is true). Refresh rate is expressed in mHz rather than Hz just like the Wayland protocol. A compositor implementation may choose to add modes if it has access to hardware information, it will call addMode() for each mode and then invoke the setCurrentMode() method that sends the modes list to the client. The preferred mode is indicated with a boolean parameter to the addMode() method. Change-Id: Iffed4784ccef695c276ebd800172957f4cff3324 Task-number: QTBUG-49814 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Follow surface isMapped property renamePier Luigi Fiorini2016-09-301-2/+2
| | | | | | | | With b7075b72200b7b087e2c34fa449737970981ccea the QWaylandSurface::isMapped property was renamed to hasContent but this example wasn't updated. Change-Id: I9b13fa3a17ffcc3d6d8be19b59552f61b25bb64b Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Remove QWaylandView from the QML APIPaul Olav Tvete2016-08-222-2/+2
| | | | | | | | | | QWaylandQuickItem already encapsulates the view. Also rename the confusing 'discardFrontBuffers' property to 'allowDiscardFrontBuffer' Change-Id: Ibd74ad54bfe3d5187c2ed91ff0378b45e144e109 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor API: rename QWaylandInputDevice to QWaylandSeatJohan Klokkhammer Helsing2016-08-111-1/+1
| | | | | | | | | | | | The name QWaylandInputDevice could be confusing and misleading: - A QWaylandInputDevice was not one input device, but a collection of many. - Classes that sounded like they should inherit from it did not, i.e: QWaylandKeyboard, QWaylandPointer and QWaylandTouch. - The Wayland protocol already has another term for this, which is seat. Change-Id: I9d9690d5b378075d9dddaeb8cf18395c7f47603e Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Rename createSurface and similar signalsJohan Klokkhammer Helsing2016-08-031-2/+2
| | | | | | | | | | | * createSurface -> surfaceRequested * createXdgSurface -> xdgSurfaceRequested * createXdgPopup -> xdgPopupRequested * createShellSurface -> wlShellSurfaceRequested * shellSurfaceCreated -> wlShellSurfaceCreated Change-Id: I715a927242130d7504955002a6a64a2bac516d46 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Compositor: make the extensions property list optionalPaul Olav Tvete2016-07-121-8/+6
| | | | | | | | | | Extensions will now automatically add themselves to their parent if they are not inside an extensions [ ... ] array. Change-Id: I26c7f7c2ee023595eb4cd2496dd56e212f05329c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Adjust for hotspot position inside WaylandCursorItemJohan Klokkhammer Helsing2016-07-111-2/+2
| | | | | Change-Id: Ide6605b7bd05f739976ed603c19e030ec74d2a2a Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Rename enableWSCursor to windowSystemCursorEnabledJohan Klokkhammer Helsing2016-07-111-1/+1
| | | | | | | What WS stood for may not have been obvious. Change-Id: Ib2a3f566e4e49d8be0c14c4937e7356b51718e44 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Rename bufferLock to bufferLockedJohan Klokkhammer Helsing2016-07-041-1/+1
| | | | | Change-Id: Ia3e0fa53579ee0d28b1d6b7384b9c6def2761a2b Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* Create a general ShellSurfaceItem to avoid duplicationJohan Klokkhammer Helsing2016-05-201-4/+1
| | | | | | | | | | | | | | | | | | XdgSurfaceItem and WlShellSurfaceItem have been removed in favor of the more general ShellSurfaceItem. An XdgSurface or a WlShellSurface can be assigned to the shellSurface property of a ShellSurfaceItem and leaves open the possibility for additional shells. A shared base class for QWaylandXdgSurface and QWaylandWlShellSurface has been added which has a factory method for creating a QWaylandQuickShellIntegration for that shell implementation. The property "shellSurface" on the ShellSurfaceItem allows QML code to attach to signals regardless of whether it's a WlShell or XdgShell client. The pure-qml example has been updated to take advantage of this. Change-Id: I9d3427586e100d6c44a24f319dd8e1486ff062ee Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Automatically initialize the quick extension objectsGiulio Camuffo2016-04-291-4/+0
| | | | | | | | | Instead of writing "Component.onCompleted: initialize()" for every extension the compositor has, let them call that automatically. Change-Id: I0b499a38c2b475dc9a7ef27cbacebef19b196dbf Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Simplify ShellSurfaceItem creationv5.7.0-beta1Johan Klokkhammer Helsing2016-04-111-4/+3
| | | | | | | | | | | Use onShellSurfaceCreated instead of onCreateShellSurface. A QWaylandWlShellSurface is no longer created in QWaylandWlShellSurfaceItem::componentComplete Change-Id: I7a0dbbacddc17ab32ed0e4d16e717fcefb221947 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Erik Larsson <erik@ortogonal.com>
* Rename compositor Shell to WlShellJohan Klokkhammer Helsing2016-04-052-3/+3
| | | | | | | | | | | | | | | | | | | | | * QWaylandShell -> QWaylandWlShell * QWaylandShellSurface -> QWaylandWlShellSurface * QWaylandQuickShellSurfaceItem -> QWaylandQuickWlShellSurfaceItem * Shell -> WlShell (QML) * ShellSurface -> WlShellSurface (QML) * ShellSurfaceItem -> WlShellSurfaceItem (QML) This is done to avoid confusion with XdgShell and will hopefully help clarify that some of the examples only support wl_shell and not xdg_shell. Additionally, this makes "Shell" an available name in the compositor API, which may in turn enable the creation of a more general abstraction hiding the details of the shell backends (i.e. xdg_shell, wl_shell, and eventually ivi_shell). Change-Id: Iebac1f36505084bfaaea68838005d54db6c55e21 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Add surface roles backGiulio Camuffo2016-02-111-1/+1
| | | | | | Task-number: QTBUG-49809 Change-Id: Id62ddea68c89b6999b66d3df8eeeffd858ae844f Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Fix copyright headersPaul Olav Tvete2015-11-095-15/+15
| | | | | | | | Old copyright headers were accidentally used for some new code. Change-Id: I0230d350e59701bc6b383c7c8151d52e34e8e75a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Add install targets for new examples.Paul Olav Tvete2015-11-041-0/+3
| | | | | Change-Id: Ibb4ae57d82a86d5fc74679c628a5c7a9b100f71d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Add documentation to Qt Wayland CompositorEskil Abrahamsen Blomfeldt2015-10-261-0/+41
| | | | | | | | | | | This adds some preliminary documentation for the Qt Wayland Compositor. There are a few classes which remain undocumented. The documentation in some areas may be a bit minimal, but this can be expanded gradually with code examples and more details. Change-Id: I5d285a5a25e8602ac2fdddc84c3fd217e7b77c95 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Example project file clean-upsLouai Al-Khanji2015-10-231-8/+1
| | | | | | | Make things compile without pkg-config, remove obsolete bits. Change-Id: I9adb2653c80d519dad371b9b982826c6c41e3cb5 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Disable flicking in the examplePaul Olav Tvete2015-09-291-0/+1
| | | | | Change-Id: I767239fa6dee8b2132192a1e694eca954b264584 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Add raise() and lower() to QWaylandQuickItemPaul Olav Tvete2015-09-292-1/+7
| | | | | Change-Id: Idbd0ec7e8b77f6241aa6ac91639d76a0ffe2dae9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Make the multi-output example workJørgen Lind2015-09-186-74/+159
| | | | | Change-Id: I765a606a62442306949c6e8338a8384453a721bd Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Rename QtCompositor to QtWaylandCompositorJørgen Lind2015-09-101-1/+1
| | | | | | | enable building QtWaylandCompositor by default Change-Id: I7cf34052b304ca9fef55b7e30ef6a6367b5d75f1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Rework how we manage extensionsJørgen Lind2015-08-282-4/+7
| | | | Change-Id: If2cbf096e7419bc1bda007d5167ce39d1a5d50ae
* add a multi output exampleJørgen Lind2015-08-287-0/+327
Change-Id: I99397d1bf794c1fce483cb5d008d7701a32b2b44