summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandextendedsurface.cpp
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-07-01 15:56:11 +0300
committerPier Luigi Fiorini <pierluigi.fiorini@gmail.com>2014-08-07 07:59:00 +0200
commitd107e2ba88e44590f77c608073eee6429f3d3a8c (patch)
tree5b96804a31b04c8f17fff03907815f9a90fc24ab /src/client/qwaylandextendedsurface.cpp
parent3419c5a868b6f528cfb17ee19261c937163ea7e0 (diff)
Add a way to have out of source shell integrations
Some platforms (especially non-desktop ones) may use a custom Wayland shell extension, more tailored to the form factor than the generic and desktoppy wl_shell or xdg_shell. Instead of stuffing N protocol implementations in the QPA plugin use a plugin architecture to allow them to live out of tree. When creating a shell surface the QT_WAYLAND_SHELL_INTEGRATION env variable will be checked, and if it points to a valid plugin that will be used to create the shell surface, falling back to wl_shell or xdg_shell if no plugin is specified. Change-Id: I05019174bb915199dd726f5fdcc0385ef846e8de Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Philippe Coval <rzr@gna.org> Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/client/qwaylandextendedsurface.cpp')
-rw-r--r--src/client/qwaylandextendedsurface.cpp30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/client/qwaylandextendedsurface.cpp b/src/client/qwaylandextendedsurface.cpp
index b2b22688c..e589698ef 100644
--- a/src/client/qwaylandextendedsurface.cpp
+++ b/src/client/qwaylandextendedsurface.cpp
@@ -53,8 +53,8 @@
QT_BEGIN_NAMESPACE
-QWaylandExtendedSurface::QWaylandExtendedSurface(QWaylandWindow *window, struct ::qt_extended_surface *extended_surface)
- : QtWayland::qt_extended_surface(extended_surface)
+QWaylandExtendedSurface::QWaylandExtendedSurface(QWaylandWindow *window)
+ : QtWayland::qt_extended_surface(window->display()->windowExtension()->get_extended_surface(window->object()))
, m_window(window)
{
}
@@ -71,11 +71,6 @@ void QWaylandExtendedSurface::updateGenericProperty(const QString &name, const Q
ds << value;
update_generic_property(name, byteValue);
-
- m_properties.insert(name, value);
- QWaylandNativeInterface *nativeInterface = static_cast<QWaylandNativeInterface *>(
- QGuiApplication::platformNativeInterface());
- nativeInterface->emitWindowPropertyChanged(m_window, name);
}
void QWaylandExtendedSurface::setContentOrientationMask(Qt::ScreenOrientations mask)
@@ -94,21 +89,6 @@ void QWaylandExtendedSurface::setContentOrientationMask(Qt::ScreenOrientations m
set_content_orientation_mask(wlmask);
}
-QVariantMap QWaylandExtendedSurface::properties() const
-{
- return m_properties;
-}
-
-QVariant QWaylandExtendedSurface::property(const QString &name)
-{
- return m_properties.value(name);
-}
-
-QVariant QWaylandExtendedSurface::property(const QString &name, const QVariant &defaultValue)
-{
- return m_properties.value(name,defaultValue);
-}
-
void QWaylandExtendedSurface::extended_surface_onscreen_visibility(int32_t visibility)
{
m_window->window()->setVisibility(static_cast<QWindow::Visibility>(visibility));
@@ -122,11 +102,7 @@ void QWaylandExtendedSurface::extended_surface_set_generic_property(const QStrin
QDataStream ds(data);
ds >> variantValue;
- m_properties.insert(name, variantValue);
-
- QWaylandNativeInterface *nativeInterface = static_cast<QWaylandNativeInterface *>(
- QGuiApplication::platformNativeInterface());
- nativeInterface->emitWindowPropertyChanged(m_window, name);
+ m_window->setProperty(name, variantValue);
}
void QWaylandExtendedSurface::extended_surface_close()