summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandoutput.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename QWaylandSurface::isMapped to hasContentJohan Klokkhammer Helsing2016-08-221-1/+1
| | | | | | | | | | | | | It was potentially misleading, since "mapped" is already used with a slightly different meaning in the Wayland protocol. In the protocol, mapped means that the surface should be rendered. The renamed property, on the other hand, is true if the surface has a buffer with contents attached and committed. In some cases this is not the same, i.e. the drag icon after dropping, or xdg_popups after popup_done. Change-Id: Idc359433c6130e3815de57b21d4edb13e318887d Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Mark the QtWaylandCompositor API as \preliminaryPaul Olav Tvete2016-05-121-0/+2
| | | | | Change-Id: I85e3a6dd98496005c63a88bc0218bc94301692ba Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Don't send wl_output::enter if the client didn't bind to wl_outputJohan Klokkhammer Helsing2016-04-181-1/+4
| | | | | | | | | | If a client didn't bind to the wl_output global, QWaylandOutput::surfaceEnter would try to send an enter event with null as the client resource, resulting in a crash. Change-Id: Ibdfa27161e6e1deb81a94ebd1b6ddf11b5da8b7b Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Erik Larsson <erik@ortogonal.com>
* Output available geometry in output coordinates spacePier Luigi Fiorini2016-01-111-1/+8
| | | | | | | | | | | | The available geometry is a portion of the output so starting from the output global coordinates is wrong, it should start from 0,0 by default. Warn when coordinates outside the output are set. Update the documentation accordingly. Change-Id: Ia93481ad092c9daab3837321b62831f51fce9e57 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Send the right output position to clientsPier Luigi Fiorini2016-01-111-1/+1
| | | | | | | | Fix typo and send X and Y coordinates not X twice. Change-Id: I830287201d3ae9f9baf25abb9597bcc09cb8ce92 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Actually change manufacturer and modelPier Luigi Fiorini2016-01-111-2/+16
| | | | | | | Emit the signal and send the Wayland event to clients. Change-Id: I68a33746057e85bb6606a6217a2cdb890b6a641a Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Allow headless compositors and avoid crashesPier Luigi Fiorini2016-01-111-7/+17
| | | | | | | | | Setting a null window used to crash the compositor, but is a supported use case so we shouldn't make any assumption on the window being always available. Change-Id: I9d7cd763427e3910cd36b38ac098cdf217f6b41b Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Send correct refresh rate on bindingPier Luigi Fiorini2015-12-091-1/+1
| | | | | | | | | | Wayland unit of measurement for refresh rate is mHz, multiply by 1000 to send the correct value when the client is bound. Also use qreal for the refreshRate because the API deals with Hz. Change-Id: Ib1cf82c4e9469fa2e8e21b577d74cf7e74ef8b5e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Add documentation to Qt Wayland CompositorEskil Abrahamsen Blomfeldt2015-10-261-0/+306
| | | | | | | | | | | 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>
* Rename QWaylandExtensionContainer to QWaylandObjectPaul Olav Tvete2015-10-231-2/+2
| | | | | | | | | | Change the name, and make QWaylandExtension a subclass of QWaylandObject. This way, all extensions can have extensions of their own, without multiply inheriting. Change-Id: Ie06e764412d113f7a62399caa605a48b015c7d24 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Remove the QWaylandOutputSpaceJørgen Lind2015-09-181-43/+29
| | | | | | | | We don't need this abstraction anymore since we don't have global coordinates in the core api anymore Change-Id: I553a736a0e71026447d6a0af3f8a64607b8c8f06 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* QWaylandOutput should not resize the windowPaul Olav Tvete2015-09-151-6/+0
| | | | | | | | | The communication should always go the other way: if sizeFollowsWindow then the output is automatically resized when the window resizes. Otherwise, QWaylandOutput::setGeometry() must be called manually. Change-Id: Ibbf3435aa68ddefd8dbb779e3e25232a3775973d Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Remove global coordinatesJørgen Lind2015-09-141-21/+0
| | | | | | | | | This involves removing: - pickView and mapView from QWaylandOutput - requestedPos[X,Y] from QWaylandView Change-Id: Ie53eef434ac6ae7d0d5474f649f78a59ae857167 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Rename QtCompositor to QtWaylandCompositorJørgen Lind2015-09-101-4/+4
| | | | | | | enable building QtWaylandCompositor by default Change-Id: I7cf34052b304ca9fef55b7e30ef6a6367b5d75f1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Fix crash in pickView()Paul Olav Tvete2015-09-081-2/+2
| | | | | | | ...this is why we need autotests for all functions Change-Id: I73aa6ac1777684ceac51a59884b059871c18d260 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Make sure we don't send enter events continuslyJørgen Lind2015-09-041-1/+2
| | | | | | | and when we want to send leave events, then make sure we have a client, since it might have died Change-Id: I86e85a9af050872b4329e685363ea60c33001e94
* QWaylandOutput::outputForClient to QWaylandOutput::resourceForClientJørgen Lind2015-09-041-3/+3
| | | | Change-Id: I052286240ce986c9f5a4e897639f1e93e64d96da
* Make it possible to construct QWaylandOutputJørgen Lind2015-09-041-30/+83
| | | | | | | | | | | | | | | This requires QWaylandOutput to be initialized. This will happend when the QWaylandCompositor of the QWaylandOutputSpace that is set on the QWaylandOutput is created. QWaylandCompositor will send or post a Polish event to the QWaylandOutput which again will call QWaylandOutput::initialize. This function will create the global that will be put on the wl_displays registry This makes it possible to Create WaylandOutputs in QML (see the pure-qml example) and also gives a better programming model in C++ Change-Id: Iaf907ae18a283678eda6d04390dc9790ae0bced8
* Make Manufacturer & Model modifiable properties of QWaylandOutputJørgen Lind2015-09-021-6/+13
| | | | | | This to make construction look nicer and make them modifyable from QML Change-Id: I5f5ffffb34f664914cdb531736c42a6873bfe18c
* Make the default wl_shell available from QMLJørgen Lind2015-08-281-18/+0
| | | | | | | | | | | | | | This finaly ties together how to use QWaylandQuickItems with different shells It was required to decouple QWaylandView from the QWaylandQuickItem since QML doesn't play to well with muliple inheritance. The QWaylandQuickItem can be retrieved from the QWaylandView which is now conveniently a QObject. Also the QWaylandQuickItem owns the QWaylandView. This architecture also leaves room for creating a QWaylandWidget :) Change-Id: Ib8a00e6f17f0f1bfc3ff244753f021c76db22cb1
* Move ref and unref from QWaylandSurface to privateJørgen Lind2015-08-281-2/+2
| | | | | | | | | There shouldn't be a need to call these functions manually, and if there is then their available in the private implementation. Also removed some relay functions in QWaylandSurface Change-Id: I18944c5f1fe87a070baf0c19f1b48aec796774d7
* Remove the QtWayland::Output classJørgen Lind2015-08-281-70/+328
| | | | | | | and add QWaylandOutputPrivate. Also make sure no other class holds a pointer to the QWaylandOutputPrivate but only to QWaylandOutput Change-Id: I6c5914d5bf9b394c6fbd7e181e603076fbdc79d7
* Remove QtWayland::Compositor and add QWaylandCompositorPrivateJørgen Lind2015-08-281-1/+0
| | | | | | Embrace PIMPL Change-Id: I8c8b5971e15c208317ff33231bda1513e7b8d489
* Remove output from QWaylandSurfaceJørgen Lind2015-08-281-0/+10
| | | | | | | | | | | | | | | It is the views that belong to outputs. This leads to a couple of interesting cases with enter and leave events, but the implementation says you will get enter events for the first view of a surface entering an output, and for the last view being removed from an output. Also to throttle a surface, there has to be 1 surface which takes care of this. This is because if multiple views throttle, then the client might render to quick. Change-Id: If4bba380fd4d7f506fd769606cbdea4ce58b908d
* Fixups after rebasingJørgen Lind2015-08-281-0/+2
| | | | Change-Id: Ie5d8899157d77f83f2cf65f236d534b972aa4770
* Rename QWaylandSurfaceView to QWaylandViewJørgen Lind2015-08-281-4/+4
| | | | | | and rename QWaylandSurfaceItem to QWaylandQuickView Change-Id: I989b482eb79df06e9f265bc2b0ef6b3dce7509d6
* Public input apisJørgen Lind2015-08-281-0/+5
| | | | Change-Id: I60ec2fd9f4afe54198d9c476b28f9f15a661e9ca
* Introducing QWaylandOutputSpaceJørgen Lind2015-08-281-12/+16
| | | | | | | | | | Its purpose is to make it possible to have multiscreen environments, and also multiple multioutput environments It is also an abstraction to make it clear that outputs are arranged in a 2d space Change-Id: I418509996a03b2ca1a12aec9c9e25e143a15a10f
* Move the output from QWaylandSurface to the QWaylandSurfaceViewJørgen Lind2015-08-281-16/+22
| | | | | | | | | and add a property called primaryOutput on the QWaylandSurface. Also add some bookkeeping in QtWayland::Output so it knows what surfaces and views it currently holds, sending the enter and leave events automatically. Change-Id: Ib6efbc6f8157657fb4451b751bba1cb5345b7906
* Destory QWaylandOutput instance when the window is destroyedJørgen Lind2015-08-281-0/+6
| | | | Change-Id: Ib79ac0e6c539f997549225594b8756fbb95170c3
* QWaylandOutput send mode and geometry correctlyJørgen Lind2015-08-281-0/+22
| | | | Change-Id: I3be8394ad25958f29d4fccc09472355f1560b4ea
* Make QWaylandOutput::handle constJørgen Lind2015-08-281-5/+5
| | | | Change-Id: I880cb15e056de4f6f5dcf97ea570d7bfb625c294
* Move surface management to outputsJørgen Lind2015-08-281-8/+27
| | | | Change-Id: I427e576a4e0834d6266af2670f7ff47e078153d4
* Add QT_X_NAMESPACE defines to qwaylandoutput.cppJørgen Lind2015-07-291-0/+4
| | | | Change-Id: Iabe2146772e2abfab108fad22e6884ee63afe40f
* LGPL v3 license change for Qt Wayland CompositorJørgen Lind2015-07-241-27/+23
| | | | Change-Id: I84ed248b471464214d935352768f300d4b90dec3
* Move surfaces to outputsPier Luigi Fiorini2015-04-211-0/+11
| | | | | | | | | Moving surfaces to belong to a specific output. Surfaces can be viewed on a different output anyway. Change-Id: I9ef76300f85190d84b83431374e76e581786e4e7 Done-with: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Update copyright headersJani Heikkinen2015-02-171-3/+3
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I5a74d32515c3f1fe7aa1916f4241c92832510f8c Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Add QWaylandOutput to support multiple outputsPier Luigi Fiorini2015-02-081-0/+246
Add a new QWaylandOutput class to support multiple outputs. Each QWaylandOutput need a window for rendering. Rename OutputGlobal to Output and Output to OutputResource. Add support for physical size, mode and available geometry. Use better defaults for geometry and refreshRate from the QWindow if available. A window is no longer passed to QWaylandCompositor constructor and all output related methods are removed, however one or more outputs are required for hardware integration. QWaylandCompositor returns a list of outputs and offers an API to add or remove outputs. Hardware integrations can run headless. Change-Id: I742996571ddb78328f7bfa4f79b25a81995279e1 Done-with: Jan Arne Petersen <jan.petersen@kdab.com> Done-with: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>