profile/ivi/qtwayland.git
12 years agoMake touch events working in the qml example compositor.
Laszlo Agocs [Wed, 11 Jan 2012 14:18:21 +0000 (16:18 +0200)]
Make touch events working in the qml example compositor.

Change-Id: I03318359d13caf7287671bcc9e01da91acb928dd
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoMake touch event sending more robust in the InputDevice.
Laszlo Agocs [Wed, 11 Jan 2012 14:01:30 +0000 (16:01 +0200)]
Make touch event sending more robust in the InputDevice.

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>
12 years agoDon't crash when sending touch events.
Laszlo Agocs [Wed, 11 Jan 2012 13:50:51 +0000 (15:50 +0200)]
Don't crash when sending touch events.

Change-Id: I62bf4913338e6daa3245400b0e2c7004907cb29a
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoMove event handling into WaylandInput api
Jørgen Lind [Wed, 11 Jan 2012 08:35:39 +0000 (09:35 +0100)]
Move event handling into WaylandInput api

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>
12 years agoFix so that not all mouse events end up being key events as well
Jørgen Lind [Thu, 5 Jan 2012 12:13:29 +0000 (13:13 +0100)]
Fix so that not all mouse events end up being key events as well

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>
12 years agoAdd global x and y coordinates to our mouse events
Jørgen Lind [Tue, 10 Jan 2012 11:28:32 +0000 (12:28 +0100)]
Add global x and y coordinates to our mouse events

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>
12 years agoRemove unused variables from wlcompositor and wlsurface
Jørgen Lind [Tue, 10 Jan 2012 11:07:48 +0000 (12:07 +0100)]
Remove unused variables from wlcompositor and wlsurface

and add the popupinterface with updated sha1

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

12 years agoHandle changeCursor in QWindowCompositor
Jørgen Lind [Tue, 10 Jan 2012 07:14:36 +0000 (08:14 +0100)]
Handle changeCursor in QWindowCompositor

Change-Id: I8ef3b9b36aad00177170f98bcc5c832f884bab04
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoHandle mouse focus in the QWindowCompositor
Jørgen Lind [Tue, 10 Jan 2012 07:13:55 +0000 (08:13 +0100)]
Handle mouse focus in the QWindowCompositor

Change-Id: Ibb994eb8b9e2c69aecdee7daf704475d4d84b183
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoExpose the mouse focus functions from Wayland::Compositor
Jørgen Lind [Tue, 10 Jan 2012 07:09:58 +0000 (08:09 +0100)]
Expose the mouse focus functions from Wayland::Compositor

For Compositors to handle mouse focus handling, ie enter/leave. This
calls down into wayland-server which keeps track of which surface holds
the focus. Trivial implementation in compositor would be to call
this function for all mouseMove events. I believe overhead should not be
significant.

Change-Id: I8fdd5115cc512562c1a8d8b90c28f8ef2d5b53c9
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoCleanup Wayland::Surface's client handle logic
Jørgen Lind [Tue, 10 Jan 2012 07:06:45 +0000 (08:06 +0100)]
Cleanup Wayland::Surface's client handle logic

This is code which is either fairly old or where the api has changed.
Anyway, Surfaces allways have a client handle in the resource, so no
need to check it or store it.

Change-Id: If0be4bed177d42f168b5384a820b8e681e6d9539
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoCreate a ShellSurface class
Jørgen Lind [Mon, 9 Jan 2012 17:53:22 +0000 (18:53 +0100)]
Create a ShellSurface class

so that we can actually do something usefull in the callbacks

Change-Id: Ie8e85757bf5c90caa40db34df1b8bc642ba09962
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoDont keep track of the focus surfaces
Jørgen Lind [Mon, 9 Jan 2012 18:02:16 +0000 (19:02 +0100)]
Dont keep track of the focus surfaces

waylands-server does this for us

Change-Id: Ib9980d6023b9b80a9823162d1685ae64da5b61e0
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoDirect rendering fix for previous fix.
Paul Olav Tvete [Tue, 10 Jan 2012 12:40:31 +0000 (13:40 +0100)]
Direct rendering fix for previous fix.

In the direct rendering case we disown the buffer, so we end up in
yet another strange state. This code definitely needs refactoring...

Change-Id: Ie5495f9cb1e993e195ba9ecbe19f74425600efa9
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoMake compositor handle subsurfaces with shm buffers.
Jørgen Lind [Sat, 7 Jan 2012 19:28:25 +0000 (20:28 +0100)]
Make compositor handle subsurfaces with shm buffers.

So we'r lying for now for shm buffers, and assuming they
have allways been displayed.

Also, this patch fixes so that if you attach a buffer, and the last
buffer has not gotten any damages, then it will be released.

Change-Id: Id1b9789aa8e4dcff75147f6c96220039defc0d8f
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
12 years agoWhen changing the cursor, call damage on it
Jørgen Lind [Mon, 9 Jan 2012 07:58:08 +0000 (08:58 +0100)]
When changing the cursor, call damage on it

so the image is recreated on the server side. If we don't do this any
the QImage/QPixmap on the serverside will not change its cache key

Change-Id: Ie085038e467a4f9676a32bdbecbd27e7cca4c0ff
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdd an interface to call damage on a wl_buffer
Jørgen Lind [Mon, 9 Jan 2012 07:56:35 +0000 (08:56 +0100)]
Add an interface to call damage on a wl_buffer

Change-Id: Id3814572be31fc2e7812fea33e8ed21c53f2d6f1
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove unnecessary state keeping in input device
Laszlo Agocs [Tue, 10 Jan 2012 08:47:03 +0000 (10:47 +0200)]
Remove unnecessary state keeping in input device

Change-Id: I6325573d27b099a21fa5ac5e141764d5172b2453
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAdd a function to the compositor api to send full touch events
Laszlo Agocs [Tue, 10 Jan 2012 08:33:55 +0000 (10:33 +0200)]
Add a function to the compositor api to send full touch events

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>
12 years agoAdd an option to qwindow-compositor for disabling random positioning
Laszlo Agocs [Tue, 10 Jan 2012 08:29:38 +0000 (10:29 +0200)]
Add an option to qwindow-compositor for disabling random positioning

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>
12 years agoWorkaround for race condition when compositor is animating
Paul Olav Tvete [Mon, 9 Jan 2012 16:24:45 +0000 (17:24 +0100)]
Workaround for race condition when compositor is animating

If the compositor is animating, and rendering in another thread, we
may get a frameFinished call for a buffer that has not been displayed
yet. This buffer would then never get released, and the client would
hang. This is just a workaround: the real solution would fix the
race condition between markSurfaceAsDirty() and emit damaged().

Also fix misplaced paranthesis.

Change-Id: Iadecc77a6c6e3999a9f07815db0d0f810d92c1d3
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoMake the queueing work.
Paul Olav Tvete [Mon, 9 Jan 2012 13:12:49 +0000 (14:12 +0100)]
Make the queueing work.

Unconditionally dequeue in frameFinished, instead of checking for
whether a texture has been created.

This removes the frameFinishedTooEarly hack, which was not only ugly,
but also wrong. We have to rely on the compositor calling frameFinished()
for every buffer anyway.

Change-Id: Id284b4578ff5f0813b2e8a12a5cc43293cf79bf8
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoRemove unused clientAdded signal in compositor.
Laszlo Agocs [Mon, 9 Jan 2012 11:57:47 +0000 (13:57 +0200)]
Remove unused clientAdded signal in compositor.

This signal is not used by anything anymore and so there is no need to
spend time on the contains() call.

Change-Id: I003370e66048a54d1c9e2ec384ad740506d113a2
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoUse QOpenGLFunctions in qwindow-compositor.
Laszlo Agocs [Mon, 9 Jan 2012 09:19:56 +0000 (11:19 +0200)]
Use QOpenGLFunctions in qwindow-compositor.

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>
12 years agoRemove logging of key presses in qwindow-compositor.
Laszlo Agocs [Mon, 9 Jan 2012 09:21:21 +0000 (11:21 +0200)]
Remove logging of key presses in qwindow-compositor.

Change-Id: I505b262687bb32853a69c4dccb79a05f68b1dced
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoHave a crack at fixing setGeometry calls.
Robin Burchell [Thu, 5 Jan 2012 00:19:52 +0000 (01:19 +0100)]
Have a crack at fixing setGeometry calls.

Commit a5ce91c023aeb433f1b5b792291a88c9a5683955 removed setGeometry, so let's
make an effort at still functioning.

Change-Id: Iaae877a2312712ba63aa94a8ae3a3939554c5592
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoUpdate copyright year in license headers.
Jason McDonald [Thu, 5 Jan 2012 07:06:27 +0000 (17:06 +1000)]
Update copyright year in license headers.

Change-Id: Idfa1e4479b9ea0c793dcbf8570354d657a1db8cb
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoCorrected wayland_sha1.txt
Samuel Rødal [Thu, 5 Jan 2012 14:36:45 +0000 (15:36 +0100)]
Corrected wayland_sha1.txt

Change d9ea435f0179fe2b5fe0 updated wayland_sha1.txt with a SHA-1 that
was too old, touch_down had not gotten the focus surface as a parameter
yet.

Change-Id: I1979238261758ef0b145997d5cd11c4c8953f1c5
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoFix direct rendering after buffer queue change
Paul Olav Tvete [Wed, 4 Jan 2012 13:51:29 +0000 (14:51 +0100)]
Fix direct rendering after buffer queue change

Change-Id: Ia2ff6f539a8e59ca00ae8506b9367c277ae50304
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoQueue buffers instead of discarding them
Paul Olav Tvete [Wed, 4 Jan 2012 12:27:32 +0000 (13:27 +0100)]
Queue buffers instead of discarding them

Queue up buffers if the client renders faster than the compositor can display

Change-Id: I1449f60ae35a813c7ef88a15e50fb330e9668231
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAdd isYInverted property with notification
Paul Olav Tvete [Fri, 16 Dec 2011 10:13:59 +0000 (11:13 +0100)]
Add isYInverted property with notification

Change-Id: I6a835a2be4513fa6c24f172503669bc3c95fad0b
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoClear dirty set before sending frame callback.
Paul Olav Tvete [Tue, 3 Jan 2012 08:58:43 +0000 (09:58 +0100)]
Clear dirty set before sending frame callback.

Previously, markSurfaceAsDirty() would have no effect when triggered
by the frame callback function.

Change-Id: Ife7c40757f1cba10e8cdbfab3d514a1dcdac76db
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoActually return the size from the size() function
Paul Olav Tvete [Thu, 5 Jan 2012 13:24:09 +0000 (14:24 +0100)]
Actually return the size from the size() function

Change-Id: I885b1c39f934f2b806843cd9b813a75ea9d8954f
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoRemove QSize from surfaceMapped signal.
Robin Burchell [Thu, 5 Jan 2012 06:33:58 +0000 (07:33 +0100)]
Remove QSize from surfaceMapped signal.

Commit 6307ca5e22d81da9a39289c2cca9165fea81b3a5 removed this from the signal, so
we must follow suit.

Change-Id: I4073cfb7e9f6c722c1ac097e3d939767868027cb
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoQSGTextureProvider is now public API in QtQuick.
Robin Burchell [Thu, 5 Jan 2012 00:09:28 +0000 (01:09 +0100)]
QSGTextureProvider is now public API in QtQuick.

Commit 42d6acd0a3ea5fa5cf7ab69f1f8f2206559107ea in the QtDeclarative repo moved
QSGTextureProvider to be public API, so we should probably follow if we want to
keep building :)

Change-Id: I1514c0eef9d3d2c2660b38f0bd352c0f885641ba
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoRemove the geometry from the wayland surface
Jørgen Lind [Wed, 4 Jan 2012 09:26:20 +0000 (10:26 +0100)]
Remove the geometry from the wayland surface

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>
12 years agoFixup waylandsurface item after QSize was removed
Jørgen Lind [Wed, 4 Jan 2012 09:22:49 +0000 (10:22 +0100)]
Fixup waylandsurface item after QSize was removed

from the mapped signal

Change-Id: Ib05fad9393d33a965e50ea3459fa83b10cd6d567
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoMake it possible to drag windows around
Jørgen Lind [Wed, 4 Jan 2012 07:16:27 +0000 (08:16 +0100)]
Make it possible to drag windows around

while holding the windows key down.

Change-Id: I1b5cd7fb39b5ec0ead6a4c312b4bb653a0191a00
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoImplement subsurfaces extension
Jørgen Lind [Wed, 4 Jan 2012 07:33:28 +0000 (08:33 +0100)]
Implement subsurfaces extension

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>
12 years agoAdd mouse move events to the window compositor
Jørgen Lind [Tue, 3 Jan 2012 12:47:33 +0000 (13:47 +0100)]
Add mouse move events to the window compositor

Change-Id: Iacdfbd55feb5db4d38eac6e2729684052a46afa9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdd a .gitignore
Jørgen [Tue, 3 Jan 2012 11:36:38 +0000 (12:36 +0100)]
Add a .gitignore

Change-Id: I3e5e42425825c61a76197c91c8bd2faf7bc64231
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoDont have subdirectories in the extensions folder
Jørgen [Tue, 3 Jan 2012 11:30:58 +0000 (12:30 +0100)]
Dont have subdirectories in the extensions folder

This folder is just for the xml files

Change-Id: I20820bac6ed46cb0267b20afddd129ddf64141c5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix rename of the define QT_COMPOSITOR_DECLARATIVE to QT_..._QUICK
Jørgen [Tue, 3 Jan 2012 09:33:28 +0000 (10:33 +0100)]
Fix rename of the define QT_COMPOSITOR_DECLARATIVE to  QT_..._QUICK

Change-Id: I4bcc5466711a3cfcc10812d519555a7b604dffb1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQImage when uploaded to a texture using glTexImage2D is flipped
Jørgen [Tue, 3 Jan 2012 09:28:27 +0000 (10:28 +0100)]
QImage when uploaded to a texture using glTexImage2D is flipped

Change-Id: I95a5c1d34a7233c0cfd58bc29183d8cd4396addd
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove the size from the mapped signal
Jørgen Lind [Wed, 4 Jan 2012 07:32:17 +0000 (08:32 +0100)]
Remove the size from the mapped signal

Change-Id: I4b49e115c569cab580665040cc9b173c697b1fcc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove QtOpenGL includes
Jørgen Lind [Wed, 4 Jan 2012 07:19:54 +0000 (08:19 +0100)]
Remove QtOpenGL includes

Change-Id: I66c4c98b308bd97760ad2db720785ee64fc64959
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoMake QtCompositor.so compile with pkg-config as a default
Jørgen [Tue, 27 Dec 2011 09:52:48 +0000 (10:52 +0100)]
Make QtCompositor.so compile with pkg-config as a default

Change-Id: Ibf599e66a6172e4fedbb41be4e179f43ce21d5c2
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoPrevent the use of an empty variable for a LIBDIR
Andy Nichols [Wed, 28 Dec 2011 16:28:22 +0000 (17:28 +0100)]
Prevent the use of an empty variable for a LIBDIR

Because it's not very sensible to send -L alone to the linker.

Change-Id: Id6556a010c86a42d00dcf97c39df6e1772350ef0
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoMake it possible to hide windows
Jørgen Lind [Fri, 23 Dec 2011 13:37:16 +0000 (14:37 +0100)]
Make it possible to hide windows

take2 :)

Change-Id: Ib53a346cf3237285ea6c810ec75b47b2e2db2697
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoUse some sensible build variables in compositor
Jørgen Lind [Fri, 23 Dec 2011 12:53:15 +0000 (13:53 +0100)]
Use some sensible build variables in compositor

when not haivng pkg-config

Change-Id: I585d4468e6830f1989b69de2733542f6f64d0f5f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoIts ok to attach on a not allready displayed buffer.
Jørgen Lind [Fri, 23 Dec 2011 08:24:24 +0000 (09:24 +0100)]
Its ok to attach on a not allready displayed buffer.

Change-Id: Ieb0ea84f40a3878af50ea24d1af54ef0dc90ffb8
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoUpdate wayland-sha and implement the surface on the touchdown event
Jørgen Lind [Fri, 23 Dec 2011 07:57:11 +0000 (08:57 +0100)]
Update wayland-sha and implement the surface on the touchdown event

Change-Id: I32435569e6e1181c6bbafb87d885834a883bf43b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoMake it possible to hide surfaces
Jørgen Lind [Wed, 21 Dec 2011 08:03:49 +0000 (09:03 +0100)]
Make it possible to hide surfaces

Change-Id: Ie3ba75335717e8dbae906c1a13cc8f852b77bd1b
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoRemove Qt4 stuff from qmake files
Jørgen Lind [Tue, 20 Dec 2011 12:36:07 +0000 (13:36 +0100)]
Remove Qt4 stuff from qmake files

Change-Id: I008cddcdba58a7a9b77aac8729a643a1ea0ea445
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoSend the orientation when client binds to the extended output
Jørgen Lind [Tue, 20 Dec 2011 12:34:18 +0000 (13:34 +0100)]
Send the orientation when client binds to the extended output

Change-Id: I27875115d64a1d06de7097b09f928cfd11fe2d2e
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoMake QtCompositor work with wayland-demo clients.
Jørgen Lind [Tue, 20 Dec 2011 11:03:00 +0000 (12:03 +0100)]
Make QtCompositor work with wayland-demo clients.

Make it possible to have >1 registered frame callbacks

Also remove the QShmBuffer destory callback, since we should use destory
listeners instead.

Change-Id: I407fc2075f62aaf9f042e85b003b3aaf7ee72cf5
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoMake all QWaylandWindows have a wl_surface for the entire lifespan
Jørgen Lind [Mon, 19 Dec 2011 11:48:47 +0000 (12:48 +0100)]
Make all QWaylandWindows have a wl_surface for the entire lifespan

This solves that we dont have to cache the generic objects,
and we conform with upstream wayland

Change-Id: Ib8e15b734f09988f4f00989aeb1c274636709dc9
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoAdded surface_extension and output_extension
Jørgen Lind [Mon, 19 Dec 2011 09:51:12 +0000 (10:51 +0100)]
Added surface_extension and output_extension

This is an atempt on removing WindowManagerIntegration and create more
specialised extensions. Hopefully it will reduce tha "map lookups" we
have all because of the windowmanagerintegration is way to generic, and
hopefully it will make it easier to ready and understand the code

Change-Id: I126c430e87909e4520f6d241c0a6023214cb509a
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoRestore retained selection support in qt-compositor.
Laszlo Agocs [Fri, 16 Dec 2011 13:11:18 +0000 (15:11 +0200)]
Restore retained selection support in qt-compositor.

Change-Id: I20fdffacd4f62d2e7083c269c7f82c059f3e24fc
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoDo not pass mime type by value in data source.
Laszlo Agocs [Thu, 15 Dec 2011 08:48:25 +0000 (10:48 +0200)]
Do not pass mime type by value in data source.

Change-Id: I2aff8fd090cee82f37b52ad0a6a3cd437c39fcdd
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAdded a resourcecollection class
Jørgen Lind [Wed, 14 Dec 2011 09:32:13 +0000 (10:32 +0100)]
Added a resourcecollection class

This class will typically be the super class of globals which creates
wl_resources in the bind functions. If for some reason some other class
needs to get a resource for a given client of the global, it can look it
up

Change-Id: I939cc7aaeb15586f2c760c600c188a8cbf19f358
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoRemove the window_manager_integration object.
Jørgen Lind [Tue, 13 Dec 2011 11:41:02 +0000 (12:41 +0100)]
Remove the window_manager_integration object.

We don't need a wl_object anymore for registering the callbacks

Also did some additional cleanups, and removed the static instance since
we can just get the windowmamager instance from the compositor object

Change-Id: I772822f42006aba709f9f967ae293903415e21bc
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoFixup variable names to not use widget
Jørgen Lind [Mon, 12 Dec 2011 14:15:10 +0000 (15:15 +0100)]
Fixup variable names to not use widget

Change-Id: I4c2212d27aaebbefe5e8524438bc444fdec74c8a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agofixup xcomposite egl integration
Jørgen Lind [Mon, 12 Dec 2011 14:49:09 +0000 (15:49 +0100)]
fixup xcomposite egl integration

Change-Id: Ieead02e7fd97356e6296a2f073b62f3557de3321
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoUse qmake wayland-scanner rules for the window manager integration
Jørgen Lind [Mon, 12 Dec 2011 14:12:17 +0000 (15:12 +0100)]
Use qmake wayland-scanner rules for the window manager integration

Change-Id: Ic75349df412e906d292d0ad76c9a35096fb9bb82
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoUse the wayland-scanner qmake compiler rules for xcomposite
Jørgen Lind [Mon, 12 Dec 2011 14:10:28 +0000 (15:10 +0100)]
Use the wayland-scanner qmake compiler rules for xcomposite

Change-Id: I45e601ac1cc0183b03f2467a8376a1d6c65315cd
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoRemove the dri2_xcb hardware integration
Jørgen Lind [Mon, 12 Dec 2011 14:07:01 +0000 (15:07 +0100)]
Remove the dri2_xcb hardware integration

EGL has bind_display instead

Change-Id: I643f06e7412bae9513d8b30eef655cd0a60cb57d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoMake xcomposite-egl work without widgets
Jørgen Lind [Mon, 12 Dec 2011 14:08:20 +0000 (15:08 +0100)]
Make xcomposite-egl work without widgets

Change-Id: Ie9bfd6ca1a36650864ca8af70c25beb1baa5ac43
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoRemove usage of deprecated class QSGEngine
Andy Nichols [Mon, 12 Dec 2011 13:25:00 +0000 (14:25 +0100)]
Remove usage of deprecated class QSGEngine

Replaced by direct calls in QQuickCanvas to createTextureFromId
and createTextureFromImage.

Change-Id: I8aad61f9c48ccd5c6ca703b32df9c2c5fb199f1c
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoImplement shell_surface
Jørgen Lind [Mon, 12 Dec 2011 09:22:54 +0000 (10:22 +0100)]
Implement shell_surface

shell_surface is the compositors view of surfaces while wl_surface is
the clients view of the surface

Change-Id: Ic84eda94ac03960ab566cfc569a103c2b6ad1d44
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoDestroy callback objects in the sync callback on client-side.
Laszlo Agocs [Sun, 11 Dec 2011 18:31:58 +0000 (20:31 +0200)]
Destroy callback objects in the sync callback on client-side.

Previously these were leaked, resulting in obscure "server sent live
delete_id" messages sometimes (esp. with selection offers).

Change-Id: Ida07b5c206ed8a8e4f68f9a8b651a176c45101ff
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAvoid showing incorrect warning when changing the data source.
Laszlo Agocs [Sun, 11 Dec 2011 17:22:58 +0000 (19:22 +0200)]
Avoid showing incorrect warning when changing the data source.

Also fix a typo.

Change-Id: Ic4a059edc3b3bcbbf5acd318e3ba05fad45190eb
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoRegister a touch device in the Wayland plug-in.
Laszlo Agocs [Thu, 8 Dec 2011 12:42:54 +0000 (14:42 +0200)]
Register a touch device in the Wayland plug-in.

This makes the plug-in compatible with the recent QTouchEvent changes
in qtbase.

Change-Id: I30891ef945dbb2f5863b0a1a097056c5586ac160
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoMade a global directory, and moved the export header there...
Jørgen Lind [Wed, 7 Dec 2011 20:30:35 +0000 (21:30 +0100)]
Made a global directory, and moved the export header there...

I'm not sure if the header file name is what we want, but will do for
now.

Change-Id: Ief7f006b0f59b53295e6a11c222d8c459a80683d
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoRemove unused header
Jørgen Lind [Wed, 7 Dec 2011 20:28:29 +0000 (21:28 +0100)]
Remove unused header

Change-Id: I54c0840a5b6f198ca9619d6888e506daa4b66df8
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoRemove dependency on libQtWidgets and libQtOpenGL
Gunnar Sletta [Tue, 6 Dec 2011 11:48:00 +0000 (12:48 +0100)]
Remove dependency on libQtWidgets and libQtOpenGL

Change-Id: I15ec75922d476080283e1c9759ed49e63a871b1f
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoMake qwindow-compositor work without opengl module dependency.
Laszlo Agocs [Wed, 7 Dec 2011 09:31:32 +0000 (11:31 +0200)]
Make qwindow-compositor work without opengl module dependency.

Change-Id: Icb05b076b46dfbf36154343083bd332a4d9a7468
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoI removed the qwidget-compositor-mdi.pro
Jørgen Lind [Wed, 7 Dec 2011 09:22:12 +0000 (10:22 +0100)]
I removed the qwidget-compositor-mdi.pro

I cant revert the patch, so I just have to add it.

Change-Id: I05531ca973ada7043f39c46faccc35ffd6800bf9
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoAdd comments to example pro file to explain how to include pri
Jørgen Lind [Wed, 7 Dec 2011 09:01:39 +0000 (10:01 +0100)]
Add comments to example pro file to explain how to include pri

Change-Id: Ic5cb0aff2bf70158905a8d6c4487670ce76c9355
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoResolve the gl and egl extensions before we use them
Jørgen Lind [Wed, 30 Nov 2011 10:10:59 +0000 (11:10 +0100)]
Resolve the gl and egl extensions before we use them

Change-Id: Iafe68f71807cc8aa8964444adccb25128c597514
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoMake wayland actually a module
Jørgen Lind [Mon, 5 Dec 2011 16:09:02 +0000 (17:09 +0100)]
Make wayland actually a module

Also fix so that QtCompositor can be built as shared object.

+ fix so that the default QT_WAYLAND_GL_CONFIG is wayland_egl

Change-Id: I02b72e99286584426bd37ab2d00bbc84af11efdc
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoAdd a exportglobal file since we cant use qglobal.h anymore
Jørgen Lind [Tue, 6 Dec 2011 18:06:36 +0000 (19:06 +0100)]
Add a exportglobal file since we cant use qglobal.h anymore

Change-Id: I993132278bb26467a13199afbb9b4aecfe0da7fa
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoDirect rendering changes
Paul Olav Tvete [Mon, 5 Dec 2011 16:31:30 +0000 (17:31 +0100)]
Direct rendering changes

Change-Id: Ie3bebae680e370d5351279a988945c6a5d65ed75
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoRemove the input device resource from wayland's list upon destruction.
Laszlo Agocs [Tue, 6 Dec 2011 10:43:32 +0000 (12:43 +0200)]
Remove the input device resource from wayland's list upon destruction.

Otherwise exiting and starting new apps would sooner or later end
in a compositor crash due to dangling pointers in
input_device->resource_list.

Change-Id: I85ec0f2ffcdc014bf8d714b95772a4d7250d0be5
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoAvoid qt-compositor crash with data devices.
Laszlo Agocs [Tue, 6 Dec 2011 10:31:40 +0000 (12:31 +0200)]
Avoid qt-compositor crash with data devices.

The datadevice list must be cleared on a resource_destroy, otherwise
a subsequent datadevice request will end up finding and accessing
already freed pointers.

Change-Id: Iae7b87d0910d2e3278f8c79fbb7b5aacfbe6ade7
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix data source resource destruction in qt-compositor.
Laszlo Agocs [Tue, 6 Dec 2011 10:21:05 +0000 (12:21 +0200)]
Fix data source resource destruction in qt-compositor.

Change-Id: Ieb7551c6d85979b5e6bb07927abeaabcf2466c20
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix wm object resource destruction in qt-compositor.
Laszlo Agocs [Tue, 6 Dec 2011 10:15:52 +0000 (12:15 +0200)]
Fix wm object resource destruction in qt-compositor.

There was no destroy_resource callback which is very bad because
this meant the list containg the resource was not maintained properly.

Also remove a meaningless loop.

Change-Id: Ib82a6b76581061149130bb3322813f9a1716561f
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix non-responsiveness issue with threaded GL
Paul Olav Tvete [Wed, 30 Nov 2011 12:38:25 +0000 (13:38 +0100)]
Fix non-responsiveness issue with threaded GL

Use our experimental patch for Wayland to make sure
that we always deliver requests made by other threads.
Previously, if wl_surface_damage() was called from a
thread other than the main thread, it would be blocked
until the main thread returned from select() for some
other reason.

Change-Id: I65fd6481c51b93f924c1706aa70cb328fd24c6e0
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoOur patches to Wayland
Paul Olav Tvete [Thu, 1 Dec 2011 08:24:55 +0000 (09:24 +0100)]
Our patches to Wayland

Change-Id: I342ccda193cbfb809e9011aeb4a87a4ed94d7d52
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoMake it possible to run qwindow-compositor in non-fullscreen.
Laszlo Agocs [Tue, 6 Dec 2011 10:12:09 +0000 (12:12 +0200)]
Make it possible to run qwindow-compositor in non-fullscreen.

Also remove some leftovers from the pro file.

Change-Id: Ic4f461054855d7e5b9ea907818f2c58565f6ea3b
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
12 years agoDirect rendering fixes
Paul Olav Tvete [Wed, 30 Nov 2011 14:59:54 +0000 (15:59 +0100)]
Direct rendering fixes

Make sure that we release the right buffer at the right time.

Change-Id: I181f92ad3eb27fda43a616dcf26aa611e144a2f1
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoFix xcomposite-glx backend, avoid crashes in frame callback and touch
Laszlo Agocs [Wed, 30 Nov 2011 15:39:38 +0000 (17:39 +0200)]
Fix xcomposite-glx backend, avoid crashes in frame callback and touch

Change-Id: Id66dcc76d73eef7242b69cbbc488485db4daa648
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoRemove file that I never committed
Jørgen Lind [Wed, 30 Nov 2011 14:20:46 +0000 (15:20 +0100)]
Remove file that I never committed

Change-Id: Ia35fc2ebca8b5f00a7f108755e3c74d3cca917a4
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoUse correct include syntax for waylandobject.h
Andy Nichols [Wed, 30 Nov 2011 12:17:08 +0000 (13:17 +0100)]
Use correct include syntax for waylandobject.h

Change-Id: I10c5cd74e923f66cdfffda4ec996382484815d20
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoDisable not-yet-supported drag and drop code
Andy Nichols [Tue, 29 Nov 2011 15:06:52 +0000 (16:06 +0100)]
Disable not-yet-supported drag and drop code

Change-Id: Ica70987fe75f751aee6163322903b6545e9d8e8b
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoupdate window mamager protocol
Jørgen Lind [Tue, 29 Nov 2011 09:17:11 +0000 (10:17 +0100)]
update window mamager protocol

Change-Id: I29e70f26dbdf71e54c69b2e49342fa51928945d9
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoAdded data objects
Jørgen Lind [Mon, 31 Oct 2011 07:42:58 +0000 (08:42 +0100)]
Added data objects

ie. new clipboard and dnd protocol

Change-Id: I0ebdc6dc2972b6cb1dc882cd6b6f4ddde2621186
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoUpdated to head of Wayland, but did not fix clipboard or dnd
Jørgen Lind [Mon, 31 Oct 2011 07:41:18 +0000 (08:41 +0100)]
Updated to head of Wayland, but did not fix clipboard or dnd

Change-Id: I9f4d4101947b2cc64b52eed070d3a37c00ab07da
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoupdate sha
Jørgen Lind [Mon, 28 Nov 2011 09:06:55 +0000 (10:06 +0100)]
update sha

Change-Id: If17fdd64fa49fdc8f717cd638d7c09d951d93c4e
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoFix Wayland touch position mapping on client side.
Laszlo Agocs [Sun, 27 Nov 2011 16:34:23 +0000 (18:34 +0200)]
Fix Wayland touch position mapping on client side.

The previous solution was more or less working but was inaccurate and
an overkill. What we need here is a simple call to mapToGlobal().

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