summaryrefslogtreecommitdiffstats
path: root/src/compositor
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2012-12-05 20:39:34 +0100
committerSamuel Rødal <samuel.rodal@digia.com>2012-12-06 20:23:32 +0100
commit75bbcca373018d93ea934a879020e9940b53d9fd (patch)
tree220f312c5e475f3ff1b2de43905312ec95f27b45 /src/compositor
parentc2651cb953c4dfcf1578a380e65d6a0ec20ca571 (diff)
Cleaned out usages of removed or to be removed APIs.
Change-Id: Iabbada23d010ac0fdf99f88af3f109f94814b5ea Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
Diffstat (limited to 'src/compositor')
-rw-r--r--src/compositor/compositor_api/waylandsurface.cpp27
-rw-r--r--src/compositor/compositor_api/waylandsurface.h6
-rw-r--r--src/compositor/wayland_wrapper/wlextendedsurface.cpp20
-rw-r--r--src/compositor/wayland_wrapper/wlextendedsurface.h6
4 files changed, 0 insertions, 59 deletions
diff --git a/src/compositor/compositor_api/waylandsurface.cpp b/src/compositor/compositor_api/waylandsurface.cpp
index 9179f55f2..33032e034 100644
--- a/src/compositor/compositor_api/waylandsurface.cpp
+++ b/src/compositor/compositor_api/waylandsurface.cpp
@@ -85,7 +85,6 @@ public:
WaylandSurface::WaylandSurface(Wayland::Surface *surface)
: QObject(*new WaylandSurfacePrivate(surface))
{
- connect(this, SIGNAL(windowOrientationChanged()), this, SIGNAL(windowRotationChanged()));
}
WaylandClient *WaylandSurface::client() const
@@ -175,32 +174,6 @@ Qt::ScreenOrientation WaylandSurface::contentOrientation() const
return d->surface->extendedSurface()->contentOrientation();
}
-Qt::ScreenOrientation WaylandSurface::windowOrientation() const
-{
- Q_D(const WaylandSurface);
- if (!d->surface->extendedSurface())
- return Qt::PrimaryOrientation;
- return d->surface->extendedSurface()->windowOrientation();
-}
-
-/*!
- \property windowRotation
-
- Convenience property to get the rotation required to map the surface to the screen
- based on its windowOrientation.
- */
-int WaylandSurface::windowRotation() const
-{
- QRect geometry = compositor()->outputGeometry();
- Qt::ScreenOrientation compositorOrientation = geometry.width() >= geometry.height() ? Qt::LandscapeOrientation : Qt::PortraitOrientation;
- Qt::ScreenOrientation wOrientation = windowOrientation();
-
- if (wOrientation == Qt::PrimaryOrientation)
- return 0;
-
- return QGuiApplication::primaryScreen()->angleBetween(wOrientation, compositorOrientation);
-}
-
WaylandSurface::WindowFlags WaylandSurface::windowFlags() const
{
Q_D(const WaylandSurface);
diff --git a/src/compositor/compositor_api/waylandsurface.h b/src/compositor/compositor_api/waylandsurface.h
index 1be4a5361..6cfe084a9 100644
--- a/src/compositor/compositor_api/waylandsurface.h
+++ b/src/compositor/compositor_api/waylandsurface.h
@@ -73,9 +73,7 @@ class Q_COMPOSITOR_EXPORT WaylandSurface : public QObject
Q_PROPERTY(QSize size READ size WRITE setSize NOTIFY sizeChanged)
Q_PROPERTY(QPointF pos READ pos WRITE setPos NOTIFY posChanged)
Q_PROPERTY(WaylandSurface::WindowFlags windowFlags READ windowFlags NOTIFY windowFlagsChanged)
- Q_PROPERTY(Qt::ScreenOrientation windowOrientation READ windowOrientation NOTIFY windowOrientationChanged)
Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation NOTIFY contentOrientationChanged)
- Q_PROPERTY(int windowRotation READ windowRotation NOTIFY windowRotationChanged)
Q_PROPERTY(QString title READ title NOTIFY titleChanged)
Q_PROPERTY(Qt::ScreenOrientations orientationUpdateMask READ orientationUpdateMask NOTIFY orientationUpdateMaskChanged)
@@ -115,8 +113,6 @@ public:
Qt::ScreenOrientations orientationUpdateMask() const;
Qt::ScreenOrientation contentOrientation() const;
- Qt::ScreenOrientation windowOrientation() const;
- int windowRotation() const;
WindowFlags windowFlags() const;
@@ -163,9 +159,7 @@ signals:
void posChanged();
void windowPropertyChanged(const QString &name, const QVariant &value);
void windowFlagsChanged(WindowFlags flags);
- void windowOrientationChanged();
void contentOrientationChanged();
- void windowRotationChanged();
void orientationUpdateMaskChanged();
void extendedSurfaceReady();
void titleChanged();
diff --git a/src/compositor/wayland_wrapper/wlextendedsurface.cpp b/src/compositor/wayland_wrapper/wlextendedsurface.cpp
index e0d6d2055..1ffb9c421 100644
--- a/src/compositor/wayland_wrapper/wlextendedsurface.cpp
+++ b/src/compositor/wayland_wrapper/wlextendedsurface.cpp
@@ -77,7 +77,6 @@ void SurfaceExtensionGlobal::get_extended_surface(struct wl_client *client,
ExtendedSurface::ExtendedSurface(struct wl_client *client, uint32_t id, Surface *surface)
: m_surface(surface)
- , m_windowOrientation(Qt::PrimaryOrientation)
, m_contentOrientation(Qt::PrimaryOrientation)
, m_windowFlags(0)
{
@@ -138,29 +137,11 @@ static Qt::ScreenOrientation screenOrientationFromWaylandOrientation(int32_t ori
}
}
-Qt::ScreenOrientation ExtendedSurface::windowOrientation() const
-{
- return m_windowOrientation;
-}
-
Qt::ScreenOrientation ExtendedSurface::contentOrientation() const
{
return m_contentOrientation;
}
-void ExtendedSurface::set_window_orientation(struct wl_client *client,
- struct wl_resource *extended_surface_resource,
- int32_t orientation)
-{
- Q_UNUSED(client);
- ExtendedSurface *extended_surface = static_cast<ExtendedSurface *>(extended_surface_resource->data);
-
- Qt::ScreenOrientation oldOrientation = extended_surface->m_windowOrientation;
- extended_surface->m_windowOrientation = screenOrientationFromWaylandOrientation(orientation);
- if (extended_surface->m_windowOrientation != oldOrientation)
- emit extended_surface->m_surface->waylandSurface()->windowOrientationChanged();
-}
-
void ExtendedSurface::set_content_orientation(struct wl_client *client,
struct wl_resource *extended_surface_resource,
int32_t orientation)
@@ -210,7 +191,6 @@ void ExtendedSurface::set_window_flags(wl_client *client, wl_resource *resource,
const struct wl_extended_surface_interface ExtendedSurface::extended_surface_interface = {
ExtendedSurface::update_generic_property,
- ExtendedSurface::set_window_orientation,
ExtendedSurface::set_content_orientation,
ExtendedSurface::set_window_flags
};
diff --git a/src/compositor/wayland_wrapper/wlextendedsurface.h b/src/compositor/wayland_wrapper/wlextendedsurface.h
index 651acb35c..bb3192248 100644
--- a/src/compositor/wayland_wrapper/wlextendedsurface.h
+++ b/src/compositor/wayland_wrapper/wlextendedsurface.h
@@ -89,7 +89,6 @@ public:
void setParent(ExtendedSurface *parent);
QLinkedList<WaylandSurface *> subSurfaces() const;
- Qt::ScreenOrientation windowOrientation() const;
Qt::ScreenOrientation contentOrientation() const;
WaylandSurface::WindowFlags windowFlags() const { return m_windowFlags; }
@@ -105,7 +104,6 @@ private:
struct wl_resource *m_extended_surface_resource;
Surface *m_surface;
- Qt::ScreenOrientation m_windowOrientation;
Qt::ScreenOrientation m_contentOrientation;
WaylandSurface::WindowFlags m_windowFlags;
@@ -119,10 +117,6 @@ private:
const char *name,
struct wl_array *value);
- static void set_window_orientation(struct wl_client *client,
- struct wl_resource *resource,
- int32_t orientation);
-
static void set_content_orientation(struct wl_client *client,
struct wl_resource *resource,
int32_t orientation);