summaryrefslogtreecommitdiffstats
path: root/src/compositor/wayland_wrapper/qwlshellsurface.cpp
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-10-23 18:37:16 +0300
committerGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-10-28 09:52:16 +0100
commit7882407bb6bab6c042fd20592a63a875b74eb581 (patch)
tree811ad63b66919641735117260db76ee442ad0812 /src/compositor/wayland_wrapper/qwlshellsurface.cpp
parent806ada3e8b8d1ea8f29c839f22963417f7c34a90 (diff)
Be more careful when destroying wl_resourcesv5.4.0-rc1v5.4.0
The compositor must not destroy wl_resources when it wants to, else it breaks the contract with the client. Change-Id: Ic0d298072cdf0954d2504c04bff2bcc99733e621 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/compositor/wayland_wrapper/qwlshellsurface.cpp')
-rw-r--r--src/compositor/wayland_wrapper/qwlshellsurface.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/compositor/wayland_wrapper/qwlshellsurface.cpp b/src/compositor/wayland_wrapper/qwlshellsurface.cpp
index 97380feba..80304f3cb 100644
--- a/src/compositor/wayland_wrapper/qwlshellsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlshellsurface.cpp
@@ -91,7 +91,6 @@ ShellSurface::ShellSurface(Shell *shell, wl_client *client, uint32_t id, Surface
, wl_shell_surface(client, id, 1)
, m_shell(shell)
, m_surface(surface)
- , m_deleting(false)
, m_resizeGrabber(0)
, m_moveGrabber(0)
, m_popupGrabber(0)
@@ -104,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)
@@ -200,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,