summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-07-25 13:33:06 +0300
committerJørgen Lind <jorgen.lind@nokia.com>2012-07-25 13:04:34 +0200
commit9b816ca12721176e176b450060db98557c718fed (patch)
tree1d134b753590b93c68fcfee579d2f730c070ddfb
parentc4a3cf4c25ef6db852b5fd9433d7c0b9556ca98a (diff)
downloadqtwayland-9b816ca12721176e176b450060db98557c718fed.tar.gz
qtwayland-9b816ca12721176e176b450060db98557c718fed.tar.bz2
qtwayland-9b816ca12721176e176b450060db98557c718fed.zip
Fix fall out from shell protocol change
Compositors were crashing every time a new surface having the transient parent set was created. Change-Id: I3c5c0d8ca34c6739f7886281f17d1a8b0aa1c7cb Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
-rw-r--r--src/compositor/wayland_wrapper/wlshellsurface.cpp6
-rw-r--r--src/compositor/wayland_wrapper/wlshellsurface.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/compositor/wayland_wrapper/wlshellsurface.cpp b/src/compositor/wayland_wrapper/wlshellsurface.cpp
index a0d3e93..ee6f3e6 100644
--- a/src/compositor/wayland_wrapper/wlshellsurface.cpp
+++ b/src/compositor/wayland_wrapper/wlshellsurface.cpp
@@ -210,7 +210,7 @@ void ShellSurface::set_toplevel(struct wl_client *client,
void ShellSurface::set_transient(struct wl_client *client,
struct wl_resource *shell_surface_resource,
- struct wl_resource *parent_shell_surface_resource,
+ struct wl_resource *parent_surface_resource,
int x,
int y,
uint32_t flags)
@@ -219,8 +219,8 @@ void ShellSurface::set_transient(struct wl_client *client,
Q_UNUSED(client);
Q_UNUSED(flags);
ShellSurface *shell_surface = static_cast<ShellSurface *>(shell_surface_resource->data);
- ShellSurface *parent_shell_surface = static_cast<ShellSurface *>(parent_shell_surface_resource->data);
- shell_surface->m_transientParent = parent_shell_surface;
+ Surface *parent_surface = static_cast<Surface *>(parent_surface_resource->data);
+ shell_surface->m_transientParent = parent_surface->shellSurface();
shell_surface->m_xOffset = x;
shell_surface->m_yOffset = y;
if (flags & WL_SHELL_SURFACE_TRANSIENT_INACTIVE)
diff --git a/src/compositor/wayland_wrapper/wlshellsurface.h b/src/compositor/wayland_wrapper/wlshellsurface.h
index 2661afe..e8b993b 100644
--- a/src/compositor/wayland_wrapper/wlshellsurface.h
+++ b/src/compositor/wayland_wrapper/wlshellsurface.h
@@ -111,7 +111,7 @@ private:
struct wl_resource *shell_surface_resource);
static void set_transient(struct wl_client *client,
struct wl_resource *shell_surface_resource,
- struct wl_resource *parent,
+ struct wl_resource *parent_surface_resource,
int x,
int y,
uint32_t flags);