From: Jørgen Lind Date: Tue, 10 Jan 2012 11:07:48 +0000 (+0100) Subject: Remove unused variables from wlcompositor and wlsurface X-Git-Tag: qt-v5.0.0-alpha1~95 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=debc2fe12192cbd2ae1899ab4e3d237bbd915f0b;p=profile%2Fivi%2Fqtwayland.git Remove unused variables from wlcompositor and wlsurface and add the popupinterface with updated sha1 Change-Id: I4c35039451edc0175be4f570b6de1036a147d86f Reviewed-by: Samuel Rødal Sanity-Review: Samuel Rødal --- diff --git a/src/compositor/wayland_wrapper/wlcompositor.cpp b/src/compositor/wayland_wrapper/wlcompositor.cpp index 9d95387..98a9625 100644 --- a/src/compositor/wayland_wrapper/wlcompositor.cpp +++ b/src/compositor/wayland_wrapper/wlcompositor.cpp @@ -90,6 +90,7 @@ const static struct wl_compositor_interface compositor_interface = { void Compositor::bind_func(struct wl_client *client, void *data, uint32_t version, uint32_t id) { + Q_UNUSED(version); wl_client_add_object(client,&wl_compositor_interface, &compositor_interface, id,data); } @@ -110,10 +111,10 @@ Compositor::Compositor(WaylandCompositor *qt_compositor) #if defined (QT_COMPOSITOR_WAYLAND_GL) , m_graphics_hw_integration(0) #endif - , m_retainNotify(0) , m_outputExtension(0) , m_surfaceExtension(0) , m_subSurfaceExtension(0) + , m_retainNotify(0) { compositor = this; qDebug() << "Compositor instance is" << this; @@ -135,7 +136,7 @@ Compositor::Compositor(WaylandCompositor *qt_compositor) wl_display_add_global(m_display->handle(), &wl_shell_interface, &m_shell, Shell::bind_func); - m_shell = new Shell(this); + m_shell = new Shell(); m_outputExtension = new OutputExtensionGlobal(this); m_surfaceExtension = new SurfaceExtensionGlobal(this); @@ -414,6 +415,7 @@ void Compositor::feedRetainedSelectionData(QMimeData *data) void Compositor::overrideSelection(QMimeData *data) { + Q_UNUSED(data); // ### TODO implement } @@ -425,6 +427,9 @@ bool Compositor::isDragging() const void Compositor::sendDragMoveEvent(const QPoint &global, const QPoint &local, Surface *surface) { + Q_UNUSED(global); + Q_UNUSED(local); + Q_UNUSED(surface); // Drag::instance()->dragMove(global, local, surface); } diff --git a/src/compositor/wayland_wrapper/wlshellsurface.cpp b/src/compositor/wayland_wrapper/wlshellsurface.cpp index 3b7e29e..862174f 100644 --- a/src/compositor/wayland_wrapper/wlshellsurface.cpp +++ b/src/compositor/wayland_wrapper/wlshellsurface.cpp @@ -49,7 +49,7 @@ namespace Wayland { -Shell::Shell(Compositor *compositor) +Shell::Shell() { } @@ -81,6 +81,7 @@ ShellSurface::ShellSurface(wl_client *client, uint32_t id, Surface *surface) } + void ShellSurface::move(struct wl_client *client, struct wl_resource *shell_surface_resource, struct wl_resource *input_device, @@ -99,8 +100,14 @@ void ShellSurface::resize(struct wl_client *client, uint32_t edges) { Q_UNUSED(shell_surface_resource); + Q_UNUSED(client); + Q_UNUSED(time); + Q_UNUSED(edges); ShellSurface *shell_surface = static_cast(shell_surface_resource->data); + Q_UNUSED(shell_surface); InputDevice *input_device = static_cast(input_device_super->data); + Q_UNUSED(input_device); + } void ShellSurface::set_toplevel(struct wl_client *client, @@ -133,12 +140,26 @@ void ShellSurface::set_fullscreen(struct wl_client *client, Q_UNUSED(shell_surface_resource); } +void ShellSurface::set_popup(wl_client *client, wl_resource *resource, wl_resource *input_device, uint32_t time, wl_resource *parent, int32_t x, int32_t y, uint32_t flags) +{ + Q_UNUSED(client); + Q_UNUSED(resource); + Q_UNUSED(input_device); + Q_UNUSED(time); + Q_UNUSED(parent); + Q_UNUSED(x); + Q_UNUSED(y); + Q_UNUSED(flags); +} + const struct wl_shell_surface_interface ShellSurface::shell_surface_interface = { ShellSurface::move, ShellSurface::resize, ShellSurface::set_toplevel, ShellSurface::set_transient, - ShellSurface::set_fullscreen + ShellSurface::set_fullscreen, + ShellSurface::set_popup + }; } diff --git a/src/compositor/wayland_wrapper/wlshellsurface.h b/src/compositor/wayland_wrapper/wlshellsurface.h index a97d079..1c63a83 100644 --- a/src/compositor/wayland_wrapper/wlshellsurface.h +++ b/src/compositor/wayland_wrapper/wlshellsurface.h @@ -51,7 +51,7 @@ class Surface; class Shell { public: - Shell(Compositor *compositor); + Shell(); static void bind_func(struct wl_client *client, void *data, uint32_t version, uint32_t id); @@ -74,24 +74,32 @@ private: Surface *m_surface; static void move(struct wl_client *client, - struct wl_resource *shell_surface_resource, - struct wl_resource *input_device_super, - uint32_t time); + struct wl_resource *shell_surface_resource, + struct wl_resource *input_device_super, + uint32_t time); static void resize(struct wl_client *client, - struct wl_resource *shell_surface_resource, - struct wl_resource *input_device, - uint32_t time, - uint32_t edges); + struct wl_resource *shell_surface_resource, + struct wl_resource *input_device, + uint32_t time, + uint32_t edges); static void set_toplevel(struct wl_client *client, - struct wl_resource *shell_surface_resource); + struct wl_resource *shell_surface_resource); static void set_transient(struct wl_client *client, - struct wl_resource *shell_surface_resource, + struct wl_resource *shell_surface_resource, + struct wl_resource *parent, + int x, + int y, + uint32_t flags); + static void set_fullscreen(struct wl_client *client, + struct wl_resource *shell_surface_resource); + static void set_popup(struct wl_client *client, + struct wl_resource *resource, + struct wl_resource *input_device, + uint32_t time, struct wl_resource *parent, - int x, - int y, + int32_t x, + int32_t y, uint32_t flags); - static void set_fullscreen(struct wl_client *client, - struct wl_resource *shell_surface_resource); static const struct wl_shell_surface_interface shell_surface_interface;