diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2011-12-14 10:32:13 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-12-14 16:51:13 +0100 |
commit | 8abec2446d38e8963468f60e2436ba34595b644d (patch) | |
tree | b8e75bb61e9663cd944a6c386d8a9f059b81b0e8 /src/compositor/wayland_wrapper/wlinputdevice.cpp | |
parent | d0d4b2056d49049da29713ed4d54e9e323fddffa (diff) |
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>
Diffstat (limited to 'src/compositor/wayland_wrapper/wlinputdevice.cpp')
-rw-r--r-- | src/compositor/wayland_wrapper/wlinputdevice.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compositor/wayland_wrapper/wlinputdevice.cpp b/src/compositor/wayland_wrapper/wlinputdevice.cpp index a7ce0d43a..60ccabe16 100644 --- a/src/compositor/wayland_wrapper/wlinputdevice.cpp +++ b/src/compositor/wayland_wrapper/wlinputdevice.cpp @@ -54,6 +54,7 @@ namespace Wayland { static ShmBuffer *currentCursor; InputDevice::InputDevice(Compositor *compositor) + : m_compositor(compositor) { wl_input_device_init(base()); wl_display_add_global(compositor->wl_display(),&wl_input_device_interface,this,InputDevice::bind_func); @@ -119,10 +120,10 @@ void InputDevice::input_device_attach(struct wl_client *client, struct wl_buffer *buffer = reinterpret_cast<struct wl_buffer *>(buffer_resource); qDebug() << "Client input device attach" << client << buffer << x << y; -// Compositor *compositor = wayland_cast<Compositor *>(device_base->compositor); + InputDevice *inputDevice = wayland_cast<InputDevice *>(device_base); ShmBuffer *shmBuffer = static_cast<ShmBuffer *>(buffer->user_data); if (shmBuffer) { -// compositor->qtCompositor()->changeCursor(shmBuffer->image(), x, y); + inputDevice->m_compositor->qtCompositor()->changeCursor(shmBuffer->image(), x, y); currentCursor = shmBuffer; } } |