summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandscreen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Updated license headersAntti Kokko2016-01-201-14/+20
| | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I76ae5d3e64f096eb3163d6163a38d68c7c1ca756 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add 3 QList::reserve() callsSergio Martins2015-06-081-1/+3
| | | | | Change-Id: Ic89d25a4497ffaffb3f6b688f4c5ecc5128e9642 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-031-1/+6
|\ | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwloutput.cpp Change-Id: I05f7431aca46760f90632dfa7ef9c4d0abf392ec
| * Fix crash when the wl_shm global comes after a wl_output oneGiulio Camuffo2015-05-281-1/+6
| | | | | | | | | | | | | | Task-number: QTBUG-44503 Change-Id: I6932df57bb4560b6dceb72a5cb7c536cd090e92a Reviewed-by: Martin Gräßlin <mgraesslin@kde.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Remove output extensionPier Luigi Fiorini2015-05-061-16/+0
|/ | | | | | | This protocol is empty now and is no longer used. Change-Id: I45e79fb86a67b4cebdc307170218fa039b2aa27f Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Update copyright headersJani Heikkinen2015-02-171-22/+14
| | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-161-0/+8
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddataoffer.cpp src/client/qwaylanddisplay.cpp src/client/qwaylandinputdevice.cpp src/client/qwaylandwindow.cpp src/compositor/compositor_api/qwaylandsurfaceitem.cpp Change-Id: I2eae0fd43a71fbfd7c907ca715707a26f3c134c5
| * Make all the screens virtual siblingsGiulio Camuffo2015-02-021-0/+8
| | | | | | | | | | | | | | | | Wayland outputs fit the definition of virtual sibling screens so make the platform screen subclass so. Change-Id: Id3f2592653f6309406185589f70127f2b74065ac Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Namespace the platform pluginsGiulio Camuffo2015-01-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | There currently is a QWaylandInputDevice class both in the wayland QPA plugin and in the QtCompositor API. This causes the qwindow-compositor example to crash when running nested in a wayland session due to a mismatch between the two classes. By namespacing all the plugin code we make sure that name clashes will not happen anymore. Change-Id: I17497cff697599200bea68bf01dfde474526390f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Implement high-dpi supportMorten Johan Sorvig2014-12-171-1/+19
|/ | | | | | | | | | | | | | | | | | | | | | | Wayland 1.2 added support for display scaling, where wl_output has a "scale" event informing the the client that the compositor will scale the output surfaces by the given factor. The client then has the option of providing large surfaces to match the target pixel densety and bypass the compositor's scaling. This is done by calling wl_surface::set_buffer_scale. Re-use the current high-dpi support in Qt by implementing devicePixelRatio() for QWaylandScreen and QWaylandWindow. Provide high resolution buffers both for raster and OpenGL graphics. Introduce a new coordinate system: buffer coordinates, which is related to the window coordinate system via an "int scale" scale factor. This scale factor corresponds to Qts qreal devicePixelRatio, but we keep the name and the type in the QtWayland implementation. Change-Id: Ie10d7e5b4833480a9a25d96a26ad02150eb6e83f Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Be compatible with older compositorsGiulio Camuffo2014-10-131-2/+2
| | | | | | | | When binding globals take care of the version the compositor provides and don't call requests that the compositor doesn't implement. Change-Id: Iea0c534fb9e005720857e2778e380b6a9c22a6f3 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Use the screen resolution to determine whether a screen is portraitGiulio Camuffo2014-09-241-23/+29
| | | | | | | | | | | | We were using the screen physical size to determine if a screen is portrait or landscape, but we may not always get a valid size. Instead use the screen resolution. The orientation is then calculated in the wl_output.done handler, since we don't know the resolution yet when receiving the first wl_output.geometry event. Change-Id: I3554f916e54db829f49fa3d1ea24f7ce1ff24e7c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Ignore negative screen physical sizeGiulio Camuffo2014-09-171-1/+1
| | | | | | | | | Weston can send in some cases a negative physical size in the wl_output.geometry event. While it is not clear whether that is legal go the extra mile and catch it. Change-Id: Ie2fbab84e653ad77732a72b6ca61509eb7849895 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Don't give bogus values for a screen physical sizeGiulio Camuffo2014-09-151-1/+4
| | | | | | | | If we don't have a valid physical size for a screen, i.e. (0x0), return the default value from the base class. Change-Id: Ia7b6f90ee73e07014ab752ceb165426812c49415 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* The QWindowSystemInterface API changed, make it build againGiulio Camuffo2014-09-151-2/+1
| | | | | Change-Id: Ic00a820ebac7727a8d71d62ce191fe29de52aac0 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Fix QWaylandScreen geometry and physical sizeGiulio Camuffo2014-09-081-12/+16
| | | | | | | | | | | The wl_output.geometry event carries the physical size of the output, not the logical one. This happened to work only because the geometry event was sent before the mode event, which carries the logical size. Moreover, use the done event to send only one geometry change event instead of one per advertized mode. Change-Id: I5b09d56654aac149d90692bb5a3e050cc0d60cb6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Destroy the QScreen when its wl_output is removedGiulio Camuffo2014-09-041-0/+1
| | | | | | Change-Id: I4532d05cca44c88fe38c14eacbe90c190f272b2c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Explicitly define the interface versionsGiulio Camuffo2014-08-231-1/+1
| | | | | | | | | | Currently a global is bound with the version the interface has in the xml file. This is a problem for apps that explicitly link to libwayland-client because they may link to a newer libwayland, so the version of some interface may be higher than the one that it is actually implemented. Change-Id: Id0dbe6c0f1e05fe91954b9d8d9472d42d2053cdc Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QWaylandScreen: Also call QPlatformScreen constructor.Robin Burchell2014-08-181-1/+2
| | | | | Change-Id: Iae63ea5b15f2422ea28f2f9c8d7abeb30d23c86f Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix checking initial screen aspect ratioGiulio Camuffo2014-08-011-1/+1
| | | | | | | | | The first time QWaylandScreen gets an output_geometry() event its screen() may not have been initialized yet, so manually check if the output is portrait or landscape. Change-Id: I1d58daee7a3f168a881a1e2d21956c52c09818fc Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Use wayland core interfaces to signal output rotationGiulio Camuffo2014-07-311-6/+35
| | | | | | | | The wl_output interface has an event for signaling the rotation of the display, so use that instead of our own thing. Change-Id: I8a017d575ee456a7a81649e19a015085fb784805 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Make classes in client privateJorgen Lind2013-12-271-4/+4
| | | | | Change-Id: Ibf400b32f78a6a0fcf0991914d2d9ad684483979 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Move wayland into a client directory not under the plugins src folderJorgen Lind2013-12-271-0/+184
And make wayland common files into a library, exporting all classes. Now there is no need to do bulild hacks to make your own version of the wayland plugin. Change-Id: Ib4872863dfb5ab3f2bc0f4a94ae16fc1e7b63b88 Reviewed-by: Andy Nichols <andy.nichols@digia.com>