summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLasse Holmstedt <lasse.holmstedt@nokia.com>2012-02-20 10:35:54 +0100
committerJørgen Lind <jorgen.lind@nokia.com>2012-02-20 10:40:37 +0100
commitb1dcf79595b2749de83e558992973ee16cce39aa (patch)
tree41e74cd0e71f0fc74652b2773c79d0320e8e8f9d
parenta9d6833693a8fcbb54f575ff3994b216b7b19d84 (diff)
Fix issues with sendOnScreenVisibilityChange
Initialize variables and send the event in the beginning so that we can be sure both client and server are in sync. Change-Id: Ibabd2fa3cfc2c7defd4804f3fcbdd184eba46652 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
-rw-r--r--src/compositor/compositor_api/waylandsurface.cpp2
-rw-r--r--src/compositor/compositor_api/waylandsurfaceitem.cpp5
-rw-r--r--src/compositor/wayland_wrapper/wlextendedsurface.cpp2
-rw-r--r--src/compositor/wayland_wrapper/wlextendedsurface.h2
4 files changed, 8 insertions, 3 deletions
diff --git a/src/compositor/compositor_api/waylandsurface.cpp b/src/compositor/compositor_api/waylandsurface.cpp
index 7effff050..f846aecb9 100644
--- a/src/compositor/compositor_api/waylandsurface.cpp
+++ b/src/compositor/compositor_api/waylandsurface.cpp
@@ -307,5 +307,5 @@ void WaylandSurface::sendOnScreenVisibilityChange(bool visible)
{
Q_D(WaylandSurface);
if (d->surface->extendedSurface())
- d->surface->extendedSurface()->sendOnScreenVisibllity(visible);
+ d->surface->extendedSurface()->sendOnScreenVisibility(visible);
}
diff --git a/src/compositor/compositor_api/waylandsurfaceitem.cpp b/src/compositor/compositor_api/waylandsurfaceitem.cpp
index 9418b4297..fa12b389b 100644
--- a/src/compositor/compositor_api/waylandsurfaceitem.cpp
+++ b/src/compositor/compositor_api/waylandsurfaceitem.cpp
@@ -75,6 +75,8 @@ WaylandSurfaceItem::WaylandSurfaceItem(QQuickItem *parent)
, m_texture(0)
, m_provider(0)
, m_paintEnabled(true)
+ , m_useTextureAlpha(false)
+ , m_clientRenderingEnabled(false)
, m_touchEventsEnabled(false)
{
}
@@ -85,6 +87,8 @@ WaylandSurfaceItem::WaylandSurfaceItem(WaylandSurface *surface, QQuickItem *pare
, m_texture(0)
, m_provider(0)
, m_paintEnabled(true)
+ , m_useTextureAlpha(false)
+ , m_clientRenderingEnabled(false)
, m_touchEventsEnabled(false)
{
init(surface);
@@ -101,6 +105,7 @@ void WaylandSurfaceItem::init(WaylandSurface *surface)
m_surface = surface;
m_surface->setSurfaceItem(this);
+ m_surface->sendOnScreenVisibilityChange(m_clientRenderingEnabled);
setWidth(surface->size().width());
setHeight(surface->size().height());
diff --git a/src/compositor/wayland_wrapper/wlextendedsurface.cpp b/src/compositor/wayland_wrapper/wlextendedsurface.cpp
index e4dd6bf45..1baa6e9fb 100644
--- a/src/compositor/wayland_wrapper/wlextendedsurface.cpp
+++ b/src/compositor/wayland_wrapper/wlextendedsurface.cpp
@@ -108,7 +108,7 @@ void ExtendedSurface::sendGenericProperty(const QString &name, const QVariant &v
}
-void ExtendedSurface::sendOnScreenVisibllity(bool visible)
+void ExtendedSurface::sendOnScreenVisibility(bool visible)
{
int32_t visibleInt = visible;
wl_resource_post_event(m_extended_surface_resource,WL_EXTENDED_SURFACE_ONSCREEN_VISIBILITY,visibleInt);
diff --git a/src/compositor/wayland_wrapper/wlextendedsurface.h b/src/compositor/wayland_wrapper/wlextendedsurface.h
index 0a28a9156..6edf64a08 100644
--- a/src/compositor/wayland_wrapper/wlextendedsurface.h
+++ b/src/compositor/wayland_wrapper/wlextendedsurface.h
@@ -80,7 +80,7 @@ public:
~ExtendedSurface();
void sendGenericProperty(const QString &name, const QVariant &variant);
- void sendOnScreenVisibllity(bool visible);
+ void sendOnScreenVisibility(bool visible);
void setSubSurface(ExtendedSurface *subSurface,int x, int y);
void removeSubSurface(ExtendedSurface *subSurfaces);