diff options
Diffstat (limited to 'src/compositor/wayland_wrapper/qwlshellsurface.cpp')
-rw-r--r-- | src/compositor/wayland_wrapper/qwlshellsurface.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/compositor/wayland_wrapper/qwlshellsurface.cpp b/src/compositor/wayland_wrapper/qwlshellsurface.cpp index d54a223d6..80304f3cb 100644 --- a/src/compositor/wayland_wrapper/qwlshellsurface.cpp +++ b/src/compositor/wayland_wrapper/qwlshellsurface.cpp @@ -67,8 +67,7 @@ const wl_interface *Shell::interface() const void Shell::bind(struct wl_client *client, uint32_t version, uint32_t id) { - Q_UNUSED(version) - add(client, id); + add(client, id, version); } ShellSurfacePopupGrabber *Shell::getPopupGrabber(InputDevice *input) @@ -89,10 +88,9 @@ void Shell::shell_get_shell_surface(Resource *resource, uint32_t id, struct ::wl ShellSurface::ShellSurface(Shell *shell, wl_client *client, uint32_t id, Surface *surface) : QWaylandSurfaceInterface(surface->waylandSurface()) - , wl_shell_surface(client, id) + , wl_shell_surface(client, id, 1) , m_shell(shell) , m_surface(surface) - , m_deleting(false) , m_resizeGrabber(0) , m_moveGrabber(0) , m_popupGrabber(0) @@ -105,13 +103,6 @@ ShellSurface::ShellSurface(Shell *shell, wl_client *client, uint32_t id, Surface ShellSurface::~ShellSurface() { - // We must destroy the wl_resource here, but be careful not to do it - // if we're here from shell_surface_destroy_resource(), i.e. if the - // wl_resource was destroyed already - if (!m_deleting) { - m_deleting = true; - wl_resource_destroy(resource()->handle); - } } void ShellSurface::sendConfigure(uint32_t edges, int32_t width, int32_t height) @@ -201,11 +192,7 @@ void ShellSurface::shell_surface_destroy_resource(Resource *) if (m_popupGrabber) m_popupGrabber->removePopup(this); - // If we're here from the destructor don't delete this again - if (!m_deleting) { - m_deleting = true; - delete this; - } + delete this; } void ShellSurface::shell_surface_move(Resource *resource, |