diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2011-12-20 13:34:18 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-12-20 14:21:03 +0100 |
commit | c399ce07c338f4b4d0173f72dc2dad493ec58ad6 (patch) | |
tree | 40fd2bf05d1ece8844e7e1cf96041ac73e205166 /src/compositor/wayland_wrapper/wlextendedoutput.cpp | |
parent | 598b3a590045ec77b33062cd8d248668ab9b84df (diff) |
Send the orientation when client binds to the extended output
Change-Id: I27875115d64a1d06de7097b09f928cfd11fe2d2e
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Diffstat (limited to 'src/compositor/wayland_wrapper/wlextendedoutput.cpp')
-rw-r--r-- | src/compositor/wayland_wrapper/wlextendedoutput.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/compositor/wayland_wrapper/wlextendedoutput.cpp b/src/compositor/wayland_wrapper/wlextendedoutput.cpp index 0ce55ed44..542cc8a2c 100644 --- a/src/compositor/wayland_wrapper/wlextendedoutput.cpp +++ b/src/compositor/wayland_wrapper/wlextendedoutput.cpp @@ -62,21 +62,23 @@ void OutputExtensionGlobal::bind_func(wl_client *client, void *data, uint32_t ve void OutputExtensionGlobal::get_extended_output(wl_client *client, wl_resource *output_extension_resource, uint32_t id, wl_resource *output_resource) { - Q_UNUSED(output_extension_resource); + OutputExtensionGlobal *output_extension = static_cast<OutputExtensionGlobal *>(output_extension_resource->data); Output *output = static_cast<Output *>(output_resource->data); - new ExtendedOutput(client,id,output); + new ExtendedOutput(client,id,output,output_extension->m_compositor); } const struct wl_output_extension_interface OutputExtensionGlobal::output_extension_interface = { OutputExtensionGlobal::get_extended_output }; -ExtendedOutput::ExtendedOutput(struct wl_client *client, uint32_t id, Output *output) +ExtendedOutput::ExtendedOutput(struct wl_client *client, uint32_t id, Output *output, Compositor *compositor) : m_output(output) + , m_compositor(compositor) { Q_ASSERT(m_output->extendedOutput() == 0); m_output->setExtendedOutput(this); m_extended_output_resource = wl_client_add_object(client,&wl_extended_output_interface,0,id,this); + sendOutputOrientation(m_compositor->screenOrientation()); } void ExtendedOutput::sendOutputOrientation(Qt::ScreenOrientation orientation) |