summaryrefslogtreecommitdiffstats
path: root/examples/qwindow-compositor
Commit message (Collapse)AuthorAgeFilesLines
* QtCompositor: Make ExtensionFlags a QFlagsAndrew Knight2013-12-161-1/+1
| | | | | | | | This simplifies the creation and use of ExtensionFlags. Change-Id: Ia72bbc3f712759b231d8543a4f13ef2fdf6260f3 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Enable stencil in qwindow-compositor.Laszlo Agocs2013-12-111-0/+1
| | | | | | | Handy when Quick rendering that needs stencil is performed in-process. Change-Id: Ic6593150ddde217fa0ad257f889eda131fb09095 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Allow to customize enabled compositor extensionsJan Arne Petersen2013-09-091-2/+1
| | | | | | | | Add an ExtensionFlag enum to QWaylandCompositor and allow to specify extensions to enable via the constructor. Change-Id: If1a691232134034ba4055a9ed280bc211dcaebe8 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Compositor: Fix refresh rateAndrew Knight2013-09-091-1/+1
| | | | | | | | | | | Wayland output defines refresh rate in millihertz (int) while Qt uses Hz (float). Make sure all integer APIs are using millihertz, and covert Hz values to mHz when passing from Qt. Change-Id: I5886f5618680d99db6fc106dd7b8998b00a2face Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Remove conversion warning in examplesJørgen Lind2013-08-021-3/+3
| | | | | | | Change-Id: I69944a417d40ad39d261b58a35eee4f84156995f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Compile in C++11 mode: fix narrowing conversion in arraysThiago Macieira2013-07-021-4/+4
| | | | | Change-Id: I245abe09f60cb24e435af53ad7b2d2142f91b55c Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Make it possible to hide windowsJørgen Lind2013-06-061-0/+2
| | | | | Change-Id: Iad80149278edd670fd55a3a6c1b4975ac81d7f59 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Make QWindowCompositor render when surfaces move aroundJørgen Lind2013-05-182-0/+7
| | | | | Change-Id: I1f363238232c145941940fe203b110f8855d8c26 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Qt-ify the QtCompositor moduleAndy Nichols2013-02-082-45/+45
| | | | | | | | | | | | | | | | | | | | Currently the QtCompositor library and API do not follow the Qt API naming conventions. This commit intends to fix these inconsistencies. filenames start with q headers containing private API's end in _p public API classes begin with Q use the qt namespace macros where necessary Wayland namespace is now QtWayland wayland_wrapper classes are now private API's It's important to make these changes not just for stylistic reasons, but also because when qmake builds the module in checks for these conventions to determine how to deploy the include files. Change-Id: I8bfadeceda92a0f52cb73c704551da75540e7587 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix the pointer cursor handling (QtCompositor side)Andy Nichols2013-01-182-12/+36
| | | | | | | | | | | | | | | | | | | We now use the wayland-cursor library for handling pointer cursors. This required some API changes in QtCompositor, as cursors are now represented by wl_surfaces instead of just wl_buffer data. This means that when a new cursor is set by a client, you will receive a surface which you can generate cursors from. This Surface will be painted to when the cursor is changed. This also means that not all WaylandSurfaces are window surfaces, so it's important that you check that a WaylandSurface has a shell surface before treating it like a window surface. An API has been added for checking if there is a shellSurface available in a WaylandSurface. The qwindow compositor example demonstrates the correct usage of these new API's. Change-Id: Ife6b417f1048fd926a3499a139de07bceaebc727 Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-257-42/+42
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie65cbe0c622780d2f0672bce19d267d1167620ff Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* qwindow-compositor: Fix background image drawingLaszlo Agocs2012-08-131-2/+5
| | | | | | | | | | Make it work correctly with -nofullscreen and prevent it from being shown upside-down (hard to notice with the default background image but becomes obvious when replacing background.jpg with something else) Change-Id: I372ba16818dd452c965febd551da0e35d114b920 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Correct background's coordinatesElvis Lee2012-07-312-9/+25
| | | | | | | | | Background has been rendered from (0, 0), so it didn't reprensent boundary of qwindowcompositor correctly when using -nofullscreen. And make background'size equal to window size on constructing. Change-Id: I2bcdc350c1e8ebccdb19c69211afecf5d59000ea Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Handle events coming from show() properly in qwindow-compositorLaszlo Agocs2012-07-251-2/+2
| | | | | | | | | | | By not having the event handler set up properly before calling show() we lose the expose events for platforms that send a sync expose from setVisible (the default QPlatformWindow implementation). On platforms like xcb this was not visible because the expose came later, but with kms the initial expose was lost completely. Change-Id: I16848be35f4d07df8053c66f7d39633a23e45df3 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Properly reset keyboard focus in qwindow-compositor when hidingLaszlo Agocs2012-06-192-2/+21
| | | | | | | | | Surfaces with null buffer attached should be handled similarly to destroyed surfaces. qtwayland makes sure the focus surface is reset, if needed, but it's up to qwindow-compositor to pick a new one. Change-Id: I68ec7fe3fe3e2795ae52ef60d9343cb527205c68 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix output geometry in qwindow-compositorLaszlo Agocs2012-06-181-0/+4
| | | | | Change-Id: I99989faca2c5e13df85accdcdacd5cc616b43ba1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Introduce standard pkg-config usageDonald Carr2012-06-111-3/+0
| | | | | | | | Use our own qualified pkg-config mkspec feature rather than directly executing the system binary Change-Id: I4b162cd8d2d9a8bd5d0b3adb9ca935df9ff96a69 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Avoid burning cpu in qwindow-compositor with glx and nvidiaLaszlo Agocs2012-06-051-2/+1
| | | | | Change-Id: I2da069c7fd12b26b2811b59ec66418865bcbe962 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* qwindow-compositor: Avoid stuck alt when running non-fullscreenLaszlo Agocs2012-05-212-0/+17
| | | | | Change-Id: I9d2129e2e746704f1fc0e8f6243fe3b8b7224456 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Add wheel event supportLaszlo Agocs2012-05-101-0/+5
| | | | | Change-Id: Id827485138758ccb4c0db420559b2b9af5c45bbc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Start using the new wl_fixed_t type properlyLaszlo Agocs2012-05-092-15/+15
| | | | | | | | | | | | | | The mouse and touch coordinates cannot just be treated as integers anymore, they need to be converted from/to double using the helper functions. Some necessary QPoint -> QPointF changes have also been made. For the Qt-specific touch extension we will not switch to wl_fixed_t though. This is because the precision is unfortunately quite small (factor of 256 vs. 10000). Change-Id: I23deaaffe478a39495b12d336985bc62e38a6af4 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove notes about enabling the touch extension in qwindow-compositorLaszlo Agocs2012-05-091-9/+0
| | | | | | | It is all automatic nowadays. Change-Id: I7b8f0c1716a910624ac31bd31832fb50418f48fb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Send expose from qwindow-compositorLaszlo Agocs2012-04-242-0/+10
| | | | | | | | | | | | | | Otherwise apps that (correctly) only start rendering on QEvent::Expose will not render at all due to not receiving the event. Turns out calling sendOnScreenVisibilityChange() is not that simple: It does nothing until the extendedsurface instance is created and that happens only after a roundtrip to the client. Therefore the compositor listens to a new signal in WaylandSurface that indicates when the extendedsurface-related functions become functional. Change-Id: I9fdac4a98e2ad5d8c913c2a7aeef5b313f27c50a Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Do not render in qwindow-compositor before exposeLaszlo Agocs2012-04-241-2/+0
| | | | | Change-Id: I0016a9969004252be3a5978e0ab4155b4d883682 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Make windowcompositor actually eat events in the event filterJørgen Lind2012-04-111-3/+2
| | | | | Change-Id: I946aa90eb52751471470185a39f044ac23d53100 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix QWindow Compositors input handlingJørgen Lind2012-04-111-15/+17
| | | | | Change-Id: I500c0a8e824abcf9a1e7662e1bd030ecc1b85170 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* clean up qmake-generated projectsOswald Buddenhagen2012-02-211-14/+1
| | | | | | | remove assignmets which are defaults or bogus Change-Id: I6e4fcef11e905ffbbb7a32210608faac7aa111e5 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Fix wayland plugin and qwindow-compositor compilationLaszlo Agocs2012-02-202-0/+5
| | | | | | | | | Apparently some qtbase change triggers the need to include a bunch of headers which were not properly included before. The extra mouse button support in the platform plugin simply did not compile. Change-Id: I7d518021fa81f2d5232277f0bce26e48effbeae3 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fix qwindow-compositor memory leaksLaszlo Agocs2012-02-155-4/+17
| | | | | Change-Id: I85aa62c9deae308612ed2b13468e7f1e48f82acf Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Add mouse event synthesizing to the touch extension protocol.Laszlo Agocs2012-02-073-1/+15
| | | | | | | | | The compositor can now be configured to tell the clients to generate mouse events when receiving touch events. In touchscreen-only systems this can be used to reduce the number of Wayland events. Change-Id: I231a15cd4ed463ee81c510c082a270efa255a1f3 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fix compilation for qwidget and qwindow compositor examplesLaszlo Agocs2012-01-301-0/+3
| | | | | | Change-Id: If720f7f4797e319ab03d02b6ecb9c88cb71356c2 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-307-7/+7
| | | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I08d8673382f0230d5c5a22a25efaf5c45cef539a Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-237-7/+7
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Ib67c393df41c539deae0ef71e0acc13029ceb46d Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix duplicated QOpenGLFunctions usageLaszlo Agocs2012-01-202-4/+1
| | | | | | Change-Id: I3c90b705c0ef07e824768975fe1889e394acd82b Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Update license headers.Jason McDonald2012-01-167-17/+258
| | | | | | | | | | All code in this module outside of src/plugins/platforms/wayland should carry a copy of the BSD license header. The master copy of this header lives at qtbase/header.BSD. Change-Id: Icd56f24f4a3d309db4c1c3aaef25618680c07f6e Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Introduce a touch protocol extension.Laszlo Agocs2012-01-132-0/+8
| | | | | | | | | | | | | | | | | | | Using this opt-in protocol extension all data from QTouchEvent will properly be delivered to the clients. By default compositors will still use the standard and limited protocol for touch events to remain compatible with non-Qt clients. However by calling enableTouchExtension() in the compositor, touch events will be sent through the new protocol and thus Qt clients will receive proper QTouchEvents. Non-Qt clients will get no touch data in this mode. The contents of the rawScreenPositions() list are not yet delivered as the size implications remain to be checked. Change-Id: I981b9c4d44ea808a95b770bf948320abd47fc036 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Use QOpenGLFunctions instead of presuming GL methods exist.Robin Burchell2012-01-131-7/+11
| | | | | | | | | | | They may not always exist, especially on desktop GL, so this is incorrect and won't build in some cases. Credit to Samuel Rødal for setting me on the path :) Change-Id: I89296c5ed67f9388cceedb08cd68a7b5560be5e9 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Don't crash when sending touch events.Laszlo Agocs2012-01-111-7/+8
| | | | | | Change-Id: I62bf4913338e6daa3245400b0e2c7004907cb29a Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Move event handling into WaylandInput apiJørgen Lind2012-01-111-17/+18
| | | | | | | | | | | | | Qt only gives us 1 input device as of now, ie. the mouse/keyboard and touch events. However, at some point in the future, this will change, so that the events will have a device id. This will ie on x map to the same device, but on evdev this can be different devices. Also this is part of what is needed to implement grabbing Change-Id: Ice049502d6f0f53fd06142d4dedde05806d60120 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Fix so that not all mouse events end up being key events as wellJørgen Lind2012-01-101-0/+1
| | | | | | | | in the Window compositor Change-Id: I9d88e15ea7ac810a18f6a5b962109d27d2d883a7 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Handle changeCursor in QWindowCompositorJørgen Lind2012-01-102-0/+14
| | | | | | Change-Id: I8ef3b9b36aad00177170f98bcc5c832f884bab04 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Handle mouse focus in the QWindowCompositorJørgen Lind2012-01-101-0/+1
| | | | | | Change-Id: Ibb994eb8b9e2c69aecdee7daf704475d4d84b183 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add a function to the compositor api to send full touch eventsLaszlo Agocs2012-01-101-6/+3
| | | | | | | | | | | | | | | A simple sendTouchPointEvent(id, x, y, ...) type of function will not be sufficient in the future due to the amount of data in a touch event; therefore an additional sendFullTouchEvent is introduced. This function takes a QTouchEvent and posts a series of down, motion, up, frame events as needed. In the future it may be changed so that it maps to a protocol extension instead of the standard events. As an example qwindow-compositor is updated to use this new function. Change-Id: I39d3df1c6d4868364440f59789d01fc5b7b80dac Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Add an option to qwindow-compositor for disabling random positioningLaszlo Agocs2012-01-101-2/+6
| | | | | | | | | | When passing -stickytopleft all surfaces will be shown at position 0,0 instead of picking a random one. This is useful for apps with one single large window in combination with -nofullscreen. Change-Id: I0834c43981a2d2c7b9796e273ac0eb0cfd738132 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Use QOpenGLFunctions in qwindow-compositor.Laszlo Agocs2012-01-092-4/+4
| | | | | | | | To keep it building with desktop OpenGL. Change-Id: I82685926461fc3249ed7a53e741b653273fe6f5c Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove logging of key presses in qwindow-compositor.Laszlo Agocs2012-01-091-2/+2
| | | | | | Change-Id: I505b262687bb32853a69c4dccb79a05f68b1dced Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove the geometry from the wayland surfaceJørgen Lind2012-01-041-18/+17
| | | | | | | | | and add pos and size properties instead. The pos is a PointF while the size is a integer based Size since pos can be transformed, while the size reffers to the pixel size. Change-Id: I5d84aa6661405cb0df356b787246d0d73ad0c503 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make it possible to drag windows aroundJørgen Lind2012-01-042-11/+42
| | | | | | | while holding the windows key down. Change-Id: I1b5cd7fb39b5ec0ead6a4c312b4bb653a0191a00 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Implement subsurfaces extensionJørgen Lind2012-01-047-207/+240
| | | | | | | | | | | | This allows you to have subwindows in the compositor. We tried to experiment with composing subsurfaces client side, but the architecture did not feel very lean. This however, requires the compositor to compose each surface before drawing the surface. The example compositors render the subsurfaces into the wl_surfaces texture. This might not be a good idea. Change-Id: I6e186b62d7b490de7f4e6c6f22fcf6c1e0a70df3 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add mouse move events to the window compositorJørgen Lind2012-01-041-0/+7
| | | | | Change-Id: Iacdfbd55feb5db4d38eac6e2729684052a46afa9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>