summaryrefslogtreecommitdiffstats
path: root/src/compositor/wayland_wrapper
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of dummy source update functions and debug output.Samuel Rødal2012-03-071-1/+0
| | | | | | | | The source update callbacks are unnecessary since change d224714afd087cc73d8 in wayland. Change-Id: Iac2266621b8739464077d9aa8f9292e06e9b4b35 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Fix potential crash when buffers are destroyedPaul Olav Tvete2012-03-061-8/+4
| | | | | | | Also remove non-optimization. Change-Id: Ic5903efffc064eb1ef0d46ef72231e726270af47 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Use the new cool event wrapper functions generated by wayland-scannerJørgen Lind2012-03-0511-38/+36
| | | | | | | | | | This gives us some more static typechecking which is cool.. This fixes actually a couple of minor bugs we had, one where we didn't send a value for the refreshrate of a screen, and a couple in selection. Change-Id: I2b4193b488784885d7cce27f7f5b2d2df45c6c83 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixing includes to make it compile againJørgen Lind2012-03-054-2/+6
| | | | | Change-Id: Id62bf1cb47cd375263a6aaa2e21174d476ab4627 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Upgrade to newer wayland SHA-1.Samuel Rødal2012-03-0511-36/+260
| | | | | Change-Id: If0c1d86a3011e266cafabeb875bc5616191a8cf4 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Add '16 mouse buttons' feature to InputDevice::toWaylandButtonRick Stockton2012-03-031-8/+20
| | | | | | | Task-number: QTBUG-22759 Change-Id: Id886a61a98e07bfeb4a18ef57905d6b7293ca0c8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Do not crash the compositor when hiding a widget.Laszlo Agocs2012-03-021-1/+1
| | | | | Change-Id: I104307b3fc8e037e3871a6cae5c1ed3587ce0998 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Improve wayland_cast and introduce resolve to simplify code.Samuel Rødal2012-03-026-11/+12
| | | | | | | Resolves the wl_resource by accessing the data member. Change-Id: I10912acea0a3ca6abbc067d07d43a46ec65a77aa Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Get rid of warnings in compositor source.Samuel Rødal2012-03-028-5/+37
| | | | | Change-Id: I8977e370e1036bf1722b5e88fc6cc3ade9a2d9a9 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Avoid flicker when switching back to composited modePaul Olav Tvete2012-03-021-0/+4
| | | | | | | | The surface item needs to create a new texture when the compositor switches from direct render to composited mode. Change-Id: Ic2d65929617f1941ea290645ac28b8e986c414bc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make direct rendering work after QPlatformScreenBuffer refactoringPaul Olav Tvete2012-03-014-15/+15
| | | | | Change-Id: Iebd082678264178987e2550370663ed2b44a8916 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Make SurfaceBuffer a QPlatformScreenBufferJørgen Lind2012-03-016-52/+140
| | | | | | | | | And refactor to make it fit Done with: Paul Change-Id: I2bd28abb4ac256a336cd6c2c90e67104d8c27cc5 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Refactor wlsurface,Jørgen Lind2012-02-294-172/+187
| | | | | | | | Now we treat all buffers the same (shm or not). We advance the queue when we send the frame signal Change-Id: Id62b1037e03fbeae82048f5ab9078fa81ed8e45d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Support ShowIsFullScreen in plugin and compositor.Samuel Rødal2012-02-232-0/+7
| | | | | | | | Added way of controlling client side style hint ShowIsFullScreen from compositor, and added support in plugin for the WindowFullScreen state. Change-Id: I60efa5692b26e9a4079c3c2fb66eb72b67badd02 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Fix issues with sendOnScreenVisibilityChangeLasse Holmstedt2012-02-202-2/+2
| | | | | | | | Initialize variables and send the event in the beginning so that we can be sure both client and server are in sync. Change-Id: Ibabd2fa3cfc2c7defd4804f3fcbdd184eba46652 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Call the correct frameFinished method in Surface::sendFrameCallbackAndy Nichols2012-02-201-1/+1
| | | | | | | | After the recent refactoring, the frameFinished method was still called where we should now be calling frameFinishedInternal Change-Id: I6ac5c0467dda6bb7e62976e8da28dc9d19a986c8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Compositor memory leak fixesLaszlo Agocs2012-02-157-10/+49
| | | | | Change-Id: Ia0510e00ffc925cde98ec5345a8129d1979c478c Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Expose in a virtual function that surfaces are being destroyedJørgen Lind2012-02-152-1/+2
| | | | | Change-Id: I979e7d9ca7152d4db6c3e7adae8353935a05d6c5 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Added convenience properties in WaylandSurface for window orientation.Samuel Rødal2012-02-144-0/+15
| | | | | | | | | The new windowRotation property is especially useful for the compositor to know how much the surface needs to be rotated in order to be displayed correctly. Change-Id: I81ee17880ceafd465c39b4439dee978f2cb80924 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Removing Wayland::SurfacePrivateJørgen Lind2012-02-1312-541/+561
| | | | | | | | | | | | | | | And moving Wayland::SurfaceBuffer into its own file. Also remove the extra functions in Wayland::Surface which just relayed down to extended surface. The pattern is that WaylandSurface is the entry point so we check there is the Wayland::Surface has the extension we'r looking for, then calling it directly from WaylandSurface. Last, the data of an extension is suppose to be members of the extension, so I moved the properties to be members of ExtendedSurface Change-Id: I5877671a17ee873b7644094f695fcd3e4677964a Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix surface wrapper build when QT_COMPOSITOR_WAYLAND_GL is not setLaszlo Agocs2012-02-131-2/+2
| | | | | Change-Id: Ic03d08ec936059344a1e092329a9def0b4ceb9ee Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Surface::isInverted Dont use xor and move the ret variableJørgen Lind2012-02-121-3/+2
| | | | | | | outside the ifdef Change-Id: I6f9048cd7d5992ef46dcc0e9d05e86f2f7ca4033 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Added window flags to the surface-extension protocolGunnar Sletta2012-02-104-1/+34
| | | | | Change-Id: I1b53c5f0b0f908490dcd0ab30e46ab681f885954 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Add TouchCancel support.Laszlo Agocs2012-02-101-0/+5
| | | | | | | It maps to the protocol's touch_cancel pretty well. :) Change-Id: Id417aac768106c2f6618b3e7ecb51d6929977c37 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix data device handling.Laszlo Agocs2012-02-072-3/+10
| | | | | | | | | Clearing the device list on resource destroy is wrong: it cleans away data devices for all clients. Calling free when removing stale devices for a client is also wrong. Change-Id: I7bfcc928762dc4ca7dbf5abeebcd2489956e6828 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Add mouse event synthesizing to the touch extension protocol.Laszlo Agocs2012-02-074-3/+14
| | | | | | | | | 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>
* Set pointer focus to null when surface is destroyed.Laszlo Agocs2012-02-031-0/+2
| | | | | | | | | We must do something otherwise the next inputDevice->mouseFocus() call will dereference an already deleted instance. Change-Id: I3ac92a37715f63c6dc43191968a8da51befbccde Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Don't try to carry over qPrintable() pointersLasse Holmstedt2012-02-033-5/+4
| | | | | | | | | The pointer is out of scope by the time it's sent through wayland. Change-Id: I00e9f050dfa47bf078921600d2bf63502f0b4897 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Ian Monroe <ian.monroe@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Added reporting of window and content orientation to surface extension.Samuel Rødal2012-02-014-1/+73
| | | | | | | Change-Id: I6e182c048282f5edd30f49be19dcc0f020679b85 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3030-30/+30
| | | | | | | | | | | 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>
* Fix compilationLaszlo Agocs2012-01-271-0/+1
| | | | | | Change-Id: Ia3e62ed30467bb52555c353a30440ebcc3529d0b Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add possibillity of overriding invertedY flag for wl_surfacesJørgen Lind2012-01-261-6/+12
| | | | | | Change-Id: I0f4c2696ae5c7071275af326c924dc1eaed6d5b6 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Make it possible not to have queing of buffers on the serversideJørgen Lind2012-01-261-11/+12
| | | | | | Change-Id: Ic7d3221321e2d7ecc69e56b7ad7a23322e65995d Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Adapted to new orientation API in qtbase.Samuel Rødal2012-01-241-1/+1
| | | | | | Change-Id: I455d06a364a89b6558ab00b15d9541ea397adcd5 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-2330-30/+30
| | | | | | | | 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>
* Offer the retained selection when no data source is available anymoreLaszlo Agocs2012-01-173-2/+13
| | | | | | | | | When retained selection is enabled, clipboard data will be available even after the client, that offered the data, exits. Change-Id: I8158eba29b14092ce150245410b62912011051fd Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Implement selection offers from compositor to clients.Laszlo Agocs2012-01-175-5/+102
| | | | | | | | | | It is a hack but works beautifully. It allows the compositor to participate in copy-paste which becomes mandatory when there is UI running in the compositor process. Change-Id: I1993d8705a26159eff0c9947244b66e954b9f460 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove declarations of functions not longer implementedJørgen Lind2012-01-171-10/+0
| | | | | | Change-Id: Ia258fe47d59e3c5a844b939245ad50e2a4f1a6f1 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Remove unnecessary client list generation in CompositorLaszlo Agocs2012-01-171-1/+0
| | | | | | Change-Id: Ia240a19a14098bdc76374b9537d501927a6a1a74 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Null pointer checkPaul Olav Tvete2012-01-171-1/+2
| | | | | | | | managedClient() is allowed to return 0. Change-Id: I67f4ad9cc9bf40a829c2a26895529cabf5a716c0 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Avoid using an extra event for each touch report.Laszlo Agocs2012-01-161-3/+10
| | | | | | | | | | Instead of using touch_frame the number of non-stationary points (that is, the number of touch events sent) is included in the touch events themselves. Change-Id: Ied29f05d7e00676d47ee0b91006cafb4569951c4 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Do not send stationary pointsLaszlo Agocs2012-01-161-0/+4
| | | | | | Change-Id: Id534965df614bcbff3bfe5f8fd5484c370222196 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Send the contents of the rawScreenPositions() list too.Laszlo Agocs2012-01-162-0/+33
| | | | | | Change-Id: If43c4e07ae919b77050aaf5dcffea3b8d48ac460 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Rename touch extension interface and fix event sendingLaszlo Agocs2012-01-162-6/+10
| | | | | | | | | | | Follow the naming convention of other extensions. The events are now posted only to the client to which the focus surface belongs, the check was previously missing. Change-Id: Ie43b6e887b64c7bed1377babb368129753a3cd0f Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Update license headers.Jason McDonald2012-01-1630-540/+537
| | | | | | | | | | 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-136-8/+236
| | | | | | | | | | | | | | | | | | | 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>
* Make touch event sending more robust in the InputDevice.Laszlo Agocs2012-01-111-5/+15
| | | | | | | | | At least it won't crash and proper warnings are shown when the slightly obscure pointer focus is not used properly in the compositor. Change-Id: I2c970d197176b588f38a750e3cc805aae4d6c049 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Don't crash when sending touch events.Laszlo Agocs2012-01-111-1/+1
| | | | | | 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-116-225/+225
| | | | | | | | | | | | | 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>
* Add global x and y coordinates to our mouse eventsJørgen Lind2012-01-104-10/+35
| | | | | | | | | | Qt applications don't need global x and y, but the protocol dictates it, so someone else might need it. We still keep the api to just use the local coordinates Change-Id: I4b34df935a6692a8d72946c16603d3d600514161 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>