profile/ivi/qtwayland.git
12 years agoRemember to free the qtkey extension class.
Samuel Rødal [Wed, 28 Mar 2012 10:42:23 +0000 (12:42 +0200)]
Remember to free the qtkey extension class.

Change-Id: Ib327069521687bdf193f702b7dc89cff0ebbf416
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoEnable the qtkey extension regardless.
Samuel Rødal [Wed, 28 Mar 2012 10:18:14 +0000 (12:18 +0200)]
Enable the qtkey extension regardless.

Now the clients get qtkey events if they register themselves against
that interface, otherwise they get regular key events. This handles both
qt clients and pure wayland clients being connected at the same time,
sending qtkey events to the former and regular key events to the latter.

Change-Id: Iebd9d78b57758b45098b99a94414ee428e41636b
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoAdded qtkey extension to send raw QKeyEvents over the protocol.
Samuel Rødal [Tue, 27 Mar 2012 13:50:03 +0000 (15:50 +0200)]
Added qtkey extension to send raw QKeyEvents over the protocol.

For Qt based compositors we already have the full QKeyEvent, so we might
as well send it over the wayland protocol. This pretty much mirrors the
touch extension we already have.

Change-Id: I922f0cab6fe137272744762d6c57a31056b45672
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoFixed platform plugin for "nogl" building
Pierre Vorhagen [Mon, 26 Mar 2012 09:46:55 +0000 (11:46 +0200)]
Fixed platform plugin for "nogl" building

Change-Id: Ib65990c6895ab32fda62703e6aec9afb39f6256c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoUpdate sync.profile
Alan Alpert [Wed, 21 Mar 2012 23:37:20 +0000 (09:37 +1000)]
Update sync.profile

Also needs declarative (which needs jsbackend)

Change-Id: Id2d2bea954ffb5c816aebc7a5d0513aecbbd971e
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoUse new xkbcommon includepath
Pierre Vorhagen [Wed, 21 Mar 2012 10:02:09 +0000 (11:02 +0100)]
Use new xkbcommon includepath

Change-Id: I294e5e8511ae8319f11d516d452f9b8a0d149b75
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoSend expose events and resize events according to spec
Gunnar Sletta [Fri, 16 Mar 2012 08:45:32 +0000 (09:45 +0100)]
Send expose events and resize events according to spec

Change-Id: Ia2452cd00e11c42d8ee7e8a1f8c39d82de3f4f37
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoMake the native interface get the waylandintegration handle
Jørgen Lind [Wed, 14 Mar 2012 12:32:45 +0000 (13:32 +0100)]
Make the native interface get the waylandintegration handle

Then we don't need to go through the screen and the default screen if we
don't have a handle.

Change-Id: I2a2bb4d87a41c1acdf9af2f3abf3647b0f405a3a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAvoid race condition
Paul Olav Tvete [Tue, 13 Mar 2012 11:33:34 +0000 (12:33 +0100)]
Avoid race condition

m_damaged may be set from a different thread while updateTexture() is
being executed. This change does not eliminate the race completely, but
will fail by creating the same texture twice instead of keeping an old,
invalid one.

Change-Id: Ic34d6df1699bd3d94fde3590343e4a524c9de6a2
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoreact to and send expose events
Gunnar Sletta [Wed, 22 Feb 2012 15:33:19 +0000 (16:33 +0100)]
react to and send expose events

Change-Id: I55d52717e62feb4010895d55fe5b82e0eb7acc1b
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoUpdated to use the Thread affinity patch that we tried to upstream
Jørgen Lind [Mon, 12 Mar 2012 13:58:51 +0000 (14:58 +0100)]
Updated to use the Thread affinity patch that we tried to upstream

Change-Id: I2de76d112d534588c3758213d8f5d6dd6e8c82df
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdd explicit type casts to compile on desktop
Eskil Abrahamsen Blomfeldt [Tue, 31 Jan 2012 13:42:20 +0000 (14:42 +0100)]
Add explicit type casts to compile on desktop

If the wl_display type is forward declared and the native types
are typedef'd to something other than void*, there would be a
compile error.

Change-Id: I5fb813d3e2c5b718ba2c97651e5bdbeb661becbb
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoWe have buffer Queueing
Jørgen Lind [Mon, 12 Mar 2012 13:29:46 +0000 (14:29 +0100)]
We have buffer Queueing

Change-Id: I95cc6e5368bcefa8791a141a6f6f4166bc380e64
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoMake the module not depend on QtBase configure
Jørgen Lind [Sun, 11 Mar 2012 12:05:08 +0000 (13:05 +0100)]
Make the module not depend on QtBase configure

This is convenient if we want to reconfigure without reconfiguring
QtBase.

Change-Id: I719ba0d89905287a557e962ed6d804514e44b7f5
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoAdded missing header for client autotest.
Samuel Rødal [Mon, 12 Mar 2012 07:58:10 +0000 (08:58 +0100)]
Added missing header for client autotest.

Change-Id: Iabfaf1b570be7a2082f15fc25d5e715a9613b4d7
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoImplement cursor API in platform screen.
Friedemann Kleint [Tue, 6 Mar 2012 12:52:05 +0000 (13:52 +0100)]
Implement cursor API in platform screen.

Change-Id: I345852d407ab1dceb84ba99227dfd2989a54c6ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoAdded testing of QBackingStore backend in wayland plugin.
Samuel Rødal [Wed, 7 Mar 2012 12:52:50 +0000 (13:52 +0100)]
Added testing of QBackingStore backend in wayland plugin.

Change-Id: I4db26cbee88f329a926914ff878e6efa9b0c8395
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoAdded testing of key events to client auto test.
Samuel Rødal [Wed, 7 Mar 2012 09:40:31 +0000 (10:40 +0100)]
Added testing of key events to client auto test.

This requires passing on the native key code as well when calling into
QWindowSystemInterface from QWaylandInputDevice.

Change-Id: Iea1f98dcc9e050bb42cc48927da17aa54085a5e8
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoGet rid of dummy source update functions and debug output.
Samuel Rødal [Wed, 7 Mar 2012 09:12:26 +0000 (10:12 +0100)]
Get rid of dummy source update functions and debug output.

The source update callbacks are unnecessary since change
d224714afd087cc73d8 in wayland.

Change-Id: Iac2266621b8739464077d9aa8f9292e06e9b4b35
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoAdded auto-test for wayland plugin.
Samuel Rødal [Tue, 6 Mar 2012 09:29:45 +0000 (10:29 +0100)]
Added auto-test for wayland plugin.

Similar to the compositor auto-test, except this time we mock the
compositor, and test the client code, by forcing the wayland plugin to
be used.

Change-Id: I363019ff7e136db6822993f1881fec48a02a7db4
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFixed build of compositor auto test.
Samuel Rødal [Tue, 6 Mar 2012 16:38:42 +0000 (17:38 +0100)]
Fixed build of compositor auto test.

Change-Id: I1b61f48c964ac4d3eb07be99f4ab7602d7181524
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoRemove friend declarations in WaylandSurface
Jørgen Lind [Mon, 5 Mar 2012 16:10:14 +0000 (17:10 +0100)]
Remove friend declarations in WaylandSurface

Change-Id: I748f6814e7e4172279ff55f2049d69561305f2ab
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix potential crash when buffers are destroyed
Paul Olav Tvete [Tue, 6 Mar 2012 10:35:34 +0000 (11:35 +0100)]
Fix potential crash when buffers are destroyed

Also remove non-optimization.

Change-Id: Ic5903efffc064eb1ef0d46ef72231e726270af47
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAdded auto-test for WaylandCompositor.
Samuel Rødal [Mon, 27 Feb 2012 15:23:39 +0000 (16:23 +0100)]
Added auto-test for WaylandCompositor.

Change-Id: I2fda66c30736218ee847d9f6827709507c84c301
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoFixed WaylandSurfaceItem for when paint enabled is false.
Samuel Rødal [Mon, 5 Mar 2012 12:34:50 +0000 (13:34 +0100)]
Fixed WaylandSurfaceItem for when paint enabled is false.

This broke in change c5163c53337b72e0c28ae. Even when paint enabled is
false meaning we don't create a paint node, we want to update the
QSGTexture and the texture provider, so that the WaylandSurfaceItem can
function as a shader effect source.

Change-Id: I8d40c774f8a28240902d2d9919aee8645db9dbe7
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
12 years agoBuild with latest qtdeclarative.
Samuel Rødal [Mon, 5 Mar 2012 11:54:54 +0000 (12:54 +0100)]
Build with latest qtdeclarative.

Used the rename-qtdeclarative-symbols.sh script from qtdeclarative/bin.

Change-Id: I000b8afc3418fe862c51ce868996a4fd3de495be
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoUpdate wayland_sha1
Jørgen Lind [Mon, 5 Mar 2012 08:58:32 +0000 (09:58 +0100)]
Update wayland_sha1

Change-Id: I34e186595e3111b687f95b6d9ddb8d497fc6d2d0
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoUse the new cool event wrapper functions generated by wayland-scanner
Jørgen Lind [Mon, 5 Mar 2012 08:58:32 +0000 (09:58 +0100)]
Use the new cool event wrapper functions generated by wayland-scanner

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>
12 years agoFixing includes to make it compile again
Jørgen Lind [Mon, 5 Mar 2012 08:33:33 +0000 (09:33 +0100)]
Fixing includes to make it compile again

Change-Id: Id62bf1cb47cd375263a6aaa2e21174d476ab4627
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoUpgrade to newer wayland SHA-1.
Samuel Rødal [Wed, 29 Feb 2012 15:36:05 +0000 (16:36 +0100)]
Upgrade to newer wayland SHA-1.

Change-Id: If0c1d86a3011e266cafabeb875bc5616191a8cf4
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFixed warnings in qwidget-compositor.
Samuel Rødal [Mon, 5 Mar 2012 07:09:17 +0000 (08:09 +0100)]
Fixed warnings in qwidget-compositor.

Change-Id: I22f12e2d78f2951e1c1c5a3b2c05794f0c26abb6
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix so that includes like <QtCompositor/WaylandXXX> work
Jørgen Lind [Thu, 1 Mar 2012 09:56:14 +0000 (10:56 +0100)]
Fix so that includes like <QtCompositor/WaylandXXX> work

Change-Id: I96e78f55aa60f89c12ec0b970aae22abed225142
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agomodify '16 mouse buttons' code within qwaylandinputdevice.cpp
Rick Stockton [Sat, 3 Mar 2012 09:12:32 +0000 (01:12 -0800)]
modify '16 mouse buttons' code within qwaylandinputdevice.cpp

improve readability, match the style used in other plugins.

Task-number: QTBUG-22759

Change-Id: Icf5d6a405c3582364157fc9767c2aca3bc6839f1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdd '16 mouse buttons' feature to InputDevice::toWaylandButton
Rick Stockton [Sat, 3 Mar 2012 08:48:47 +0000 (00:48 -0800)]
Add '16 mouse buttons' feature to InputDevice::toWaylandButton

Task-number: QTBUG-22759

Change-Id: Id886a61a98e07bfeb4a18ef57905d6b7293ca0c8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoDo not crash the compositor when hiding a widget.
Laszlo Agocs [Fri, 2 Mar 2012 12:58:14 +0000 (14:58 +0200)]
Do not crash the compositor when hiding a widget.

Change-Id: I104307b3fc8e037e3871a6cae5c1ed3587ce0998
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoImprove wayland_cast and introduce resolve to simplify code.
Samuel Rødal [Thu, 1 Mar 2012 17:16:23 +0000 (18:16 +0100)]
Improve wayland_cast and introduce resolve to simplify code.

Resolves the wl_resource by accessing the data member.

Change-Id: I10912acea0a3ca6abbc067d07d43a46ec65a77aa
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoGet rid of warnings in compositor source.
Samuel Rødal [Thu, 1 Mar 2012 12:11:01 +0000 (13:11 +0100)]
Get rid of warnings in compositor source.

Change-Id: I8977e370e1036bf1722b5e88fc6cc3ade9a2d9a9
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoGot rid of warnings in wayland plugin source.
Samuel Rødal [Thu, 1 Mar 2012 12:56:07 +0000 (13:56 +0100)]
Got rid of warnings in wayland plugin source.

Change-Id: Id3b39213da79daff2ea952eb0ba90272f98a7da7
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoAvoid flicker when switching back to composited mode
Paul Olav Tvete [Fri, 2 Mar 2012 09:12:29 +0000 (10:12 +0100)]
Avoid flicker when switching back to composited mode

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>
12 years agoMake direct rendering work after QPlatformScreenBuffer refactoring
Paul Olav Tvete [Thu, 1 Mar 2012 16:28:18 +0000 (17:28 +0100)]
Make direct rendering work after QPlatformScreenBuffer refactoring

Change-Id: Iebd082678264178987e2550370663ed2b44a8916
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoMake SurfaceBuffer a QPlatformScreenBuffer
Jørgen Lind [Wed, 29 Feb 2012 15:15:49 +0000 (16:15 +0100)]
Make SurfaceBuffer a QPlatformScreenBuffer

And refactor to make it fit

Done with: Paul

Change-Id: I2bd28abb4ac256a336cd6c2c90e67104d8c27cc5
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoAdd accessibility to wayland.
Frederik Gladhorn [Thu, 23 Feb 2012 14:28:55 +0000 (15:28 +0100)]
Add accessibility to wayland.

The QPlatformAccessibility class simply loads the needed platform plugins on demand.

Change-Id: I9c384b6bb9244379bc14902489170f8877c49a2f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoCompile fix for the new DND interfaces
Jørgen Lind [Thu, 1 Mar 2012 08:34:24 +0000 (09:34 +0100)]
Compile fix for the new DND interfaces

This doesn't mean the DND works for the wayland plugin yet

Change-Id: I6a4ae57e4b19dcedaf10119e033d5cbead8cb19d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoUpdate SHA-1 to match 0.85.0 release.
Samuel Rødal [Wed, 29 Feb 2012 07:55:16 +0000 (08:55 +0100)]
Update SHA-1 to match 0.85.0 release.

Change-Id: I3b90ed63d4e4e5f2f5d1b7936f8622aa477a0ac8
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAdded warning for when xkb_compile_keymap_from_rules fails.
Samuel Rødal [Wed, 29 Feb 2012 12:17:47 +0000 (13:17 +0100)]
Added warning for when xkb_compile_keymap_from_rules fails.

Change-Id: I9b0bde8cc8d2575963db2e3165919b2d78213424
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoLoad the module so we get the correct QT_CONFIG
Jørgen Lind [Mon, 27 Feb 2012 15:10:23 +0000 (16:10 +0100)]
Load the module so we get the correct QT_CONFIG

We need this to autodetect if we'r going to build WaylandSurfaceItem

Change-Id: Icdd5379d8334422ff4f780bf5192e9c01101e9db
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoconform to new plugin api
Jørgen Lind [Sun, 26 Feb 2012 11:23:12 +0000 (12:23 +0100)]
conform to new plugin api

Change-Id: I42c05384767989aa95b49abfadd875d0f8b157d4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRefactor wlsurface,
Jørgen Lind [Tue, 14 Feb 2012 20:03:47 +0000 (21:03 +0100)]
Refactor wlsurface,

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>
12 years agoRemoved obsolete src/plugins/platforms/wayland/wayland_sha1.txt
Samuel Rødal [Tue, 28 Feb 2012 15:10:06 +0000 (16:10 +0100)]
Removed obsolete src/plugins/platforms/wayland/wayland_sha1.txt

The wayland_sha1.txt in the root folder is the correct one.

Change-Id: Ic843dc3110e6d71fbb031691312848369e448e06
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoGet rid of some code in wayland plugin.
Samuel Rødal [Mon, 27 Feb 2012 14:43:35 +0000 (15:43 +0100)]
Get rid of some code in wayland plugin.

We can use the convenience API that has been added to wayland instead.

Change-Id: I9516256a14f62593b3c78064a0f6288bb496c583
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoSupport ShowIsFullScreen in plugin and compositor.
Samuel Rødal [Wed, 22 Feb 2012 09:52:54 +0000 (10:52 +0100)]
Support ShowIsFullScreen in plugin and compositor.

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>
12 years agoclean up qmake-generated projects
Oswald Buddenhagen [Tue, 21 Feb 2012 16:52:56 +0000 (17:52 +0100)]
clean up qmake-generated projects

remove assignmets which are defaults or bogus

Change-Id: I6e4fcef11e905ffbbb7a32210608faac7aa111e5
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
12 years agoMake glx backend compiling again after qtbase broke the includes
Laszlo Agocs [Tue, 21 Feb 2012 11:52:24 +0000 (13:52 +0200)]
Make glx backend compiling again after qtbase broke the includes

Change-Id: I2bbbdad7fdd0c726316a4192240a00326fd4d72e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoDon't send Deactivate events when creating WaylandSurfaceItem
Lasse Holmstedt [Mon, 20 Feb 2012 09:51:53 +0000 (10:51 +0100)]
Don't send Deactivate events when creating WaylandSurfaceItem

The default state is Deactivate, so getting extra ones at startup
is not needed.

Change-Id: I9c6b4b5dab58651f1933900421a3d6d68e00522f
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix issues with sendOnScreenVisibilityChange
Lasse Holmstedt [Mon, 20 Feb 2012 09:35:54 +0000 (10:35 +0100)]
Fix issues with sendOnScreenVisibilityChange

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>
12 years agoCall the correct frameFinished method in Surface::sendFrameCallback
Andy Nichols [Fri, 17 Feb 2012 09:28:43 +0000 (10:28 +0100)]
Call the correct frameFinished method in Surface::sendFrameCallback

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>
12 years agoFix wayland plugin and qwindow-compositor compilation
Laszlo Agocs [Fri, 17 Feb 2012 23:01:32 +0000 (01:01 +0200)]
Fix wayland plugin and qwindow-compositor compilation

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>
12 years agoSend mouse release generated from TouchCancel to the proper window
Laszlo Agocs [Mon, 20 Feb 2012 07:42:49 +0000 (09:42 +0200)]
Send mouse release generated from TouchCancel to the proper window

Change-Id: I3d0ab79eb261de4d22c6aadf0672f5c84ff3533e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoCompositor memory leak fixes
Laszlo Agocs [Tue, 14 Feb 2012 15:33:29 +0000 (16:33 +0100)]
Compositor memory leak fixes

Change-Id: Ia0510e00ffc925cde98ec5345a8129d1979c478c
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix qwindow-compositor memory leaks
Laszlo Agocs [Tue, 14 Feb 2012 18:30:43 +0000 (19:30 +0100)]
Fix qwindow-compositor memory leaks

Change-Id: I85aa62c9deae308612ed2b13468e7f1e48f82acf
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoqtwayland: Add support for 16 mouse buttons
Rick Stockton [Wed, 15 Feb 2012 02:42:37 +0000 (18:42 -0800)]
qtwayland: Add support for 16 mouse buttons

Update expands the mouse button assignment code block, which formerly
handled only values 272, 273, and 274. New version handles all mouse
mouse buttons shown in kernel's input.h header (decimal values 272
through 285).
Value 286 appears to be the first button in the range for joystick
devices, so I did not include any other kernel-enumerated values.
(Other values might be possible- but I don't know of a mouse which
is currently being sold with more than 15 non-wheel buttons. The
mouse with 15 buttons is the Razer Naga, and I don't own it.)

Task-number: QTBUG-22759

Change-Id: I77f16eb89e24d7d6410199badff28c0d48f7df93
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoExpose in a virtual function that surfaces are being destroyed
Jørgen Lind [Wed, 15 Feb 2012 12:28:10 +0000 (13:28 +0100)]
Expose in a virtual function that surfaces are being destroyed

Change-Id: I979e7d9ca7152d4db6c3e7adae8353935a05d6c5
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoPass the correct window on to QWindowSystemInterface.
Samuel Rødal [Tue, 14 Feb 2012 14:22:21 +0000 (15:22 +0100)]
Pass the correct window on to QWindowSystemInterface.

Sometimes, the window's coordinate system is not bounded by
the coordinates of the QScreen (such as if the window uses a
landscape window orientation on a portrait screen).
QGuiApplication::topLevelAt() will fail to find this window, but since
we have the window already at the wayland plugin level we just use that.

We already did this for mouse events, so it's natural to do it here as
well.

Change-Id: Id086dd940aa1cf4eb4480117d243ab8a76da6cca
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoAdded convenience properties in WaylandSurface for window orientation.
Samuel Rødal [Mon, 13 Feb 2012 19:39:22 +0000 (20:39 +0100)]
Added convenience properties in WaylandSurface for window orientation.

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>
12 years agoPrevent occasional crash in qwaylandinputdevice.cpp
Samuel Rødal [Mon, 13 Feb 2012 19:38:44 +0000 (20:38 +0100)]
Prevent occasional crash in qwaylandinputdevice.cpp

Change-Id: I86559add9925dad6aef530433dd92066f1708757
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoRemoving Wayland::SurfacePrivate
Jørgen Lind [Mon, 13 Feb 2012 13:19:22 +0000 (14:19 +0100)]
Removing Wayland::SurfacePrivate

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>
12 years agoFix surface wrapper build when QT_COMPOSITOR_WAYLAND_GL is not set
Laszlo Agocs [Sun, 12 Feb 2012 12:28:04 +0000 (14:28 +0200)]
Fix surface wrapper build when QT_COMPOSITOR_WAYLAND_GL is not set

Change-Id: Ic03d08ec936059344a1e092329a9def0b4ceb9ee
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix build of compositors by always including QOpenGLContext.
Pier Luigi Fiorini [Sat, 11 Feb 2012 21:12:38 +0000 (22:12 +0100)]
Fix build of compositors by always including QOpenGLContext.

QOpenGLContext is always required even when QT_COMPOSITOR_WAYLAND_GL is
not defined.  Moving the include outside the ifdef makes compositors
build without problems.

Change-Id: I4b8903b06a5f58ad8fd2953dbde1476877683cb4
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoSurface::isInverted Dont use xor and move the ret variable
Jørgen Lind [Mon, 30 Jan 2012 08:53:25 +0000 (09:53 +0100)]
Surface::isInverted Dont use xor and move the ret variable

outside the ifdef

Change-Id: I6f9048cd7d5992ef46dcc0e9d05e86f2f7ca4033
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoAdded window flags to the surface-extension protocol
Gunnar Sletta [Fri, 10 Feb 2012 14:43:59 +0000 (15:43 +0100)]
Added window flags to the surface-extension protocol

Change-Id: I1b53c5f0b0f908490dcd0ab30e46ab681f885954
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAdd TouchCancel support.
Laszlo Agocs [Thu, 9 Feb 2012 13:36:28 +0000 (15:36 +0200)]
Add TouchCancel support.

It maps to the protocol's touch_cancel pretty well. :)

Change-Id: Id417aac768106c2f6618b3e7ecb51d6929977c37
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove hack that causes deadlock when waiting in eglSwapBuffers
Andy Nichols [Thu, 9 Feb 2012 18:08:30 +0000 (19:08 +0100)]
Remove hack that causes deadlock when waiting in eglSwapBuffers

This hack was added to work around the problem of calling
wl_display_iterate in two separate threads, but now that we are
are enforceing that wl_display_iterate can only be called in one thread
it now causes a deadlock when we are waiting in eglSwapBuffers for the
gui thread to actually call wl_display_iterate.

Change-Id: Id3153b184c191494838fc363380f7cae621ac64e
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix data device handling.
Laszlo Agocs [Tue, 7 Feb 2012 14:37:11 +0000 (16:37 +0200)]
Fix data device handling.

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>
12 years agoAdd mouse event synthesizing to the touch extension protocol.
Laszlo Agocs [Tue, 7 Feb 2012 09:39:49 +0000 (11:39 +0200)]
Add mouse event synthesizing to the touch extension protocol.

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>
12 years agoSet pointer focus to null when surface is destroyed.
Laszlo Agocs [Fri, 3 Feb 2012 08:30:40 +0000 (10:30 +0200)]
Set pointer focus to null when surface is destroyed.

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>
12 years agoDon't try to carry over qPrintable() pointers
Lasse Holmstedt [Thu, 2 Feb 2012 14:54:05 +0000 (15:54 +0100)]
Don't try to carry over qPrintable() pointers

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>
12 years agoFix mouse handling in qml-compositor.
Laszlo Agocs [Thu, 2 Feb 2012 16:03:10 +0000 (18:03 +0200)]
Fix mouse handling in qml-compositor.

The pointer focus must be set in pressed. We cannot rely on
the implicit mouse tracking behavior of QWindow for QML stuff
because the WaylandSurfaceItems will not get mouse moves outside
of a press-release sequence.

Change-Id: Ic2cf2a7497cac7397bcfa26440dd05cded6182dc
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAdded reporting of window and content orientation to surface extension.
Samuel Rødal [Wed, 25 Jan 2012 13:37:22 +0000 (14:37 +0100)]
Added reporting of window and content orientation to surface extension.

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>
12 years agoRevert "Do not attach null buffer."
Laszlo Agocs [Mon, 30 Jan 2012 14:16:22 +0000 (16:16 +0200)]
Revert "Do not attach null buffer."

This reverts commit 42ed12656016a96b966b7b5e52f0b684ad65c227.

Weston has been fixed so attaching null buffer on hide is now a valid
operation.

Change-Id: I0fc6af7f87c97e07075da03ed1b54d2e3c1d45fd
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoDo not attach null buffer.
Laszlo Agocs [Sat, 28 Jan 2012 18:56:28 +0000 (20:56 +0200)]
Do not attach null buffer.

Apparently Weston does not like this and causes instant crashes when
hiding a top-level widget.  The QtCompositor-side behavior is dubious
too although at least that does not crash. Nevertheless attaching a
null buffer seems unnecessary.

Change-Id: I1d7fe3e0b05e5d77773b661a71bc37311968eded
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoNull out the frame callback ptr properly.
Laszlo Agocs [Sat, 28 Jan 2012 18:47:11 +0000 (20:47 +0200)]
Null out the frame callback ptr properly.

Otherwise shm based apps (widgets) will crash randomly.

Change-Id: I5345ca9419a6702170f93fd817bbab4d9ef2bc59
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix compilation for qwidget and qwindow compositor examples
Laszlo Agocs [Mon, 30 Jan 2012 07:57:04 +0000 (09:57 +0200)]
Fix compilation for qwidget and qwindow compositor examples

Change-Id: If720f7f4797e319ab03d02b6ecb9c88cb71356c2
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove "All rights reserved" line from license headers.
Jason McDonald [Tue, 24 Jan 2012 05:35:27 +0000 (15:35 +1000)]
Remove "All rights reserved" line from license headers.

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>
12 years agoFix qt_compositor.pri to make header exporting work.
Laszlo Agocs [Fri, 27 Jan 2012 11:02:32 +0000 (13:02 +0200)]
Fix qt_compositor.pri to make header exporting work.

Change-Id: I5c54c65f57805372cba101dd62f34818580a90aa
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix compilation
Laszlo Agocs [Fri, 27 Jan 2012 11:03:53 +0000 (13:03 +0200)]
Fix compilation

Change-Id: Ia3e62ed30467bb52555c353a30440ebcc3529d0b
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdd possibillity of overriding invertedY flag for wl_surfaces
Jørgen Lind [Thu, 26 Jan 2012 14:28:36 +0000 (15:28 +0100)]
Add possibillity of overriding invertedY flag for wl_surfaces

Change-Id: I0f4c2696ae5c7071275af326c924dc1eaed6d5b6
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoMake it possible not to have queing of buffers on the serverside
Jørgen Lind [Thu, 26 Jan 2012 14:02:09 +0000 (15:02 +0100)]
Make it possible not to have queing of buffers on the serverside

Change-Id: Ic7d3221321e2d7ecc69e56b7ad7a23322e65995d
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoRevert "Do not generate mouse event on the first motion event."
Laszlo Agocs [Thu, 26 Jan 2012 13:19:42 +0000 (14:19 +0100)]
Revert "Do not generate mouse event on the first motion event."

This was a misunderstanding. The default (and the only) behavior with
QWindows is to have mouse tracking enabled. QML or QApplication can
then filter out the button-less moves, if needed.

This reverts commit bd0681daf6fa91afee16bba619f17b7bd3bd5460.

Change-Id: I2f641a2826e1578f103d1e29939b661cbae4fcc2
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Sanity-Review: Samuel Rødal <samuel.rodal@nokia.com>

12 years agoDo not generate mouse event on the first motion event.
Laszlo Agocs [Wed, 25 Jan 2012 18:36:19 +0000 (19:36 +0100)]
Do not generate mouse event on the first motion event.

This event comes before the button event and thus must not result in a
Qt mouse event. Instead, the button event will generate the
MouseButtonPressed with the position sent in this motion.

Change-Id: I97887d4d5fcd54575d6f4e9523a04569424c0bc2
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdded missing include to fix build.
Samuel Rødal [Wed, 25 Jan 2012 08:45:40 +0000 (09:45 +0100)]
Added missing include to fix build.

Fixes build after change in qtbase requiring Q_DECLARE_METATYPE(T*) to
be fully defined.

Change-Id: I741d91eb0e7e480b5a35a4616b32a90043f01a63
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoAdapted to new orientation API in qtbase.
Samuel Rødal [Fri, 13 Jan 2012 12:58:53 +0000 (13:58 +0100)]
Adapted to new orientation API in qtbase.

Change-Id: I455d06a364a89b6558ab00b15d9541ea397adcd5
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoUpdate obsolete contact address.
Jason McDonald [Fri, 20 Jan 2012 05:26:51 +0000 (15:26 +1000)]
Update obsolete contact address.

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>
12 years agoFix duplicated QOpenGLFunctions usage
Laszlo Agocs [Fri, 20 Jan 2012 13:22:23 +0000 (15:22 +0200)]
Fix duplicated QOpenGLFunctions usage

Change-Id: I3c90b705c0ef07e824768975fe1889e394acd82b
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agopick the right gl version
Gunnar Sletta [Wed, 18 Jan 2012 17:16:28 +0000 (18:16 +0100)]
pick the right gl version

Change-Id: I1bee7028f9cf53383bb76678f1446b86cc2d007f
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoOffer the retained selection when no data source is available anymore
Laszlo Agocs [Tue, 17 Jan 2012 15:30:42 +0000 (17:30 +0200)]
Offer the retained selection when no data source is available anymore

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>
12 years agoImplement selection offers from compositor to clients.
Laszlo Agocs [Tue, 17 Jan 2012 13:32:32 +0000 (15:32 +0200)]
Implement selection offers from compositor to clients.

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>
12 years agoUpdate Wayland sha
Jørgen Lind [Tue, 17 Jan 2012 09:46:56 +0000 (10:46 +0100)]
Update Wayland sha

Change-Id: Ic248b08863e661259ad5f96c35b1135d9de594f8
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoRemove declarations of functions not longer implemented
Jørgen Lind [Tue, 17 Jan 2012 09:45:07 +0000 (10:45 +0100)]
Remove declarations of functions not longer implemented

Change-Id: Ia258fe47d59e3c5a844b939245ad50e2a4f1a6f1
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoRemove unnecessary client list generation in Compositor
Laszlo Agocs [Tue, 17 Jan 2012 13:50:14 +0000 (15:50 +0200)]
Remove unnecessary client list generation in Compositor

Change-Id: Ia240a19a14098bdc76374b9537d501927a6a1a74
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoNull pointer check
Paul Olav Tvete [Tue, 17 Jan 2012 14:26:05 +0000 (15:26 +0100)]
Null pointer check

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>