summaryrefslogtreecommitdiffstats
path: root/examples/wayland/minimal-cpp/compositor.h
Commit message (Collapse)AuthorAgeFilesLines
* Compositor: Fix coordinate system inconsistenciesJohan Klokkhammer Helsing2018-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Add mouse and keyboard handling to minimal-cpp examplePaul Olav Tvete2018-08-161-1/+24
| | | | | | | ...and do some other minor cleanups. Change-Id: I7fe2c70d8b2de37cee5cc114cc0148d31821e10f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Make the minimal-cpp example a real compositorPaul Olav Tvete2018-03-211-3/+7
| | | | | | | | | Use the ivi-application protocol, since a compositor without a shell is not really a proper compositor. Use the IVI id to determine the position instead of generating a random position for each frame. Change-Id: I2ede824c656e4c2ef88117cf0f0b8d27ad80b6e2 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Use override when applicableJohan Klokkhammer Helsing2018-02-281-1/+1
| | | | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-override. This adds the "override" keyword where it's possible and also removes the "virtual" keyword when redundant. Change-Id: I899950e5cf8782785d30a245a9c69c1720905d50 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use default member initialization for raw pointersJohan Klokkhammer Helsing2018-02-281-1/+1
| | | | | | | | Initialize to nullptr to prevent undefined behavior. Change-Id: I7753c0be77a886d62ecb1cd7b86fc8c98340b0b8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Init variables where they are declared when possible (clang-tidy)Johan Klokkhammer Helsing2018-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | clang-tidy -p compile_commands.json $file \ -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' \ -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' \ -header-filter='qtwayland' \ -fix Afterwards I ran search and replace on the diff to clean up some whitespace errors: - Replaced '(\n\+[^:\n]*)(:\s+\+\s+)' with '$1: ' - Replaced '(\n\+[^,\n]*)(,\s+\+\s+)' with '$1, ' - Replaced '\n\+\s*\n' with '\n' I also had to do some manual edits, because for some reason, this particular clang-tidy check doesn't trigger for some files. Change-Id: I3b3909bac4bf20108bbe8ad1e01bcc54236dae1b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use nullptr instead of 0 or NULLJohan Klokkhammer Helsing2018-02-201-1/+1
| | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-nullptr, and some manual cleanup to prevent QFlag macros to be affected. Change-Id: I88f94390185bc6e6f23693b68723cd5710815ae6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix licensingv5.9.0-beta4Jani Heikkinen2017-05-041-3/+13
| | | | | | | | | | 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>
* Replace all occurrences of Q_DECL_OVERRIDE with overrideJohan Klokkhammer Helsing2017-01-231-1/+1
| | | | | Change-Id: I16b7b23efe944b49d1fcc9e7588cdb0a991cebd1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Refactor buffer handlingPaul Olav Tvete2016-10-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | We cannot support bindToTexture() functions. On some platforms the texture is provided by the driver. Therefore, the HW integration must always provide a texture. This has the added bonus of unifying the two separate code paths that were introduced when EGLStream support was added. Add a separate buffer manager that owns all buffers. Don't destroy buffer objects on release. The client will probably attach them again later. Also, release shm buffers immediately after uploading to texture (needs to be documented that image() will not work afterwards). Make the old SurfaceBuffer class into an abstract base class, so we can store state in the buffer class instead of having to map from the wl_resource in each buffer integration. Move the shared memory buffer handling into a separate subclass. Change-Id: I81e471d13c92913d31ea1efe487f93fa908b5e0c Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* A minimal c++-based compositorPaul Olav Tvete2016-01-121-0/+90
No input handling. Change-Id: Ie35f8ad5ff7317c83b9b76bc5c45adaca8bdb6fb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>