summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-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
-rw-r--r--src/extensions/surface-extension.xml4
-rw-r--r--src/plugins/platforms/wayland/qwaylanddecoration.cpp2
-rw-r--r--src/plugins/platforms/wayland/qwaylandextendedsurface.cpp5
-rw-r--r--src/plugins/platforms/wayland/qwaylandextendedsurface.h1
-rw-r--r--src/plugins/platforms/wayland/qwaylandshellsurface.cpp2
-rw-r--r--src/plugins/platforms/wayland/qwaylandwindow.cpp18
-rw-r--r--src/plugins/platforms/wayland/qwaylandwindow.h1
11 files changed, 6 insertions, 86 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);
diff --git a/src/extensions/surface-extension.xml b/src/extensions/surface-extension.xml
index 4c5576726..c99f63b6c 100644
--- a/src/extensions/surface-extension.xml
+++ b/src/extensions/surface-extension.xml
@@ -68,10 +68,6 @@
<entry name="InvertedLandscapeOrientation" value="8"/>
</enum>
- <request name="set_window_orientation">
- <arg name="orientation" type="int"/>
- </request>
-
<request name="set_content_orientation">
<arg name="orientation" type="int"/>
</request>
diff --git a/src/plugins/platforms/wayland/qwaylanddecoration.cpp b/src/plugins/platforms/wayland/qwaylanddecoration.cpp
index 955a53ef3..9cd7a1e23 100644
--- a/src/plugins/platforms/wayland/qwaylanddecoration.cpp
+++ b/src/plugins/platforms/wayland/qwaylanddecoration.cpp
@@ -97,7 +97,7 @@ void QWaylandDecoration::paint(QPaintDevice *device)
}
- QString windowTitleText = window()->windowTitle();
+ QString windowTitleText = window()->title();
if (!windowTitleText.isEmpty()) {
if (m_windowTitle.text() != windowTitleText) {
m_windowTitle.setText(windowTitleText);
diff --git a/src/plugins/platforms/wayland/qwaylandextendedsurface.cpp b/src/plugins/platforms/wayland/qwaylandextendedsurface.cpp
index 3a6d6efcd..0f30fcf26 100644
--- a/src/plugins/platforms/wayland/qwaylandextendedsurface.cpp
+++ b/src/plugins/platforms/wayland/qwaylandextendedsurface.cpp
@@ -110,11 +110,6 @@ static int32_t waylandRotationFromScreenOrientation(Qt::ScreenOrientation orient
}
}
-void QWaylandExtendedSurface::setWindowOrientation(Qt::ScreenOrientation orientation)
-{
- wl_extended_surface_set_window_orientation(m_extended_surface, waylandRotationFromScreenOrientation(orientation));
-}
-
void QWaylandExtendedSurface::setContentOrientation(Qt::ScreenOrientation orientation)
{
wl_extended_surface_set_content_orientation(m_extended_surface, waylandRotationFromScreenOrientation(orientation));
diff --git a/src/plugins/platforms/wayland/qwaylandextendedsurface.h b/src/plugins/platforms/wayland/qwaylandextendedsurface.h
index 67b51d30e..9588dfbba 100644
--- a/src/plugins/platforms/wayland/qwaylandextendedsurface.h
+++ b/src/plugins/platforms/wayland/qwaylandextendedsurface.h
@@ -66,7 +66,6 @@ class QWaylandExtendedSurface
public:
QWaylandExtendedSurface(QWaylandWindow *window, struct wl_extended_surface *extended_surface);
- void setWindowOrientation(Qt::ScreenOrientation orientation);
void setContentOrientation(Qt::ScreenOrientation orientation);
void updateGenericProperty(const QString &name, const QVariant &value);
diff --git a/src/plugins/platforms/wayland/qwaylandshellsurface.cpp b/src/plugins/platforms/wayland/qwaylandshellsurface.cpp
index f9a3ee532..60176ef88 100644
--- a/src/plugins/platforms/wayland/qwaylandshellsurface.cpp
+++ b/src/plugins/platforms/wayland/qwaylandshellsurface.cpp
@@ -95,7 +95,7 @@ void QWaylandShellSurface::updateTransientParent(QWindow *parent)
}
uint32_t flags = 0;
- Qt::WindowFlags wf = m_window->window()->windowFlags();
+ Qt::WindowFlags wf = m_window->window()->flags();
if (wf.testFlag(Qt::ToolTip)
|| wf.testFlag(Qt::WindowTransparentForInput))
flags |= WL_SHELL_SURFACE_TRANSIENT_INACTIVE;
diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp
index b41db4d17..8bb135675 100644
--- a/src/plugins/platforms/wayland/qwaylandwindow.cpp
+++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp
@@ -102,7 +102,7 @@ QWaylandWindow::QWaylandWindow(QWindow *window)
mShellSurface->setTopLevel();
}
- setWindowFlags(window->windowFlags());
+ setWindowFlags(window->flags());
}
QWaylandWindow::~QWaylandWindow()
@@ -282,22 +282,12 @@ void QWaylandWindow::handleContentOrientationChange(Qt::ScreenOrientation orient
mExtendedWindow->setContentOrientation(orientation);
}
-Qt::ScreenOrientation QWaylandWindow::requestWindowOrientation(Qt::ScreenOrientation orientation)
-{
- if (mExtendedWindow) {
- mExtendedWindow->setWindowOrientation(orientation);
- return orientation;
- }
-
- return Qt::PrimaryOrientation;
-}
-
void QWaylandWindow::setWindowState(Qt::WindowState state)
{
if (state == Qt::WindowFullScreen || state == Qt::WindowMaximized) {
QScreen *screen = window()->screen();
- QRect geometry = screen->mapBetween(window()->windowOrientation(), screen->primaryOrientation(), screen->geometry());
+ QRect geometry = screen->geometry();
setGeometry(geometry);
QWindowSystemInterface::handleGeometryChange(window(), geometry);
@@ -313,7 +303,7 @@ void QWaylandWindow::setWindowFlags(Qt::WindowFlags flags)
bool QWaylandWindow::createDecoration()
{
bool decoration = false;
- switch (window()->windowType()) {
+ switch (window()->type()) {
case Qt::Window:
case Qt::Widget:
case Qt::Dialog:
@@ -324,7 +314,7 @@ bool QWaylandWindow::createDecoration()
default:
break;
}
- if (window()->windowFlags() & Qt::FramelessWindowHint) {
+ if (window()->flags() & Qt::FramelessWindowHint) {
decoration = false;
}
diff --git a/src/plugins/platforms/wayland/qwaylandwindow.h b/src/plugins/platforms/wayland/qwaylandwindow.h
index cd1e860eb..3accd3ca8 100644
--- a/src/plugins/platforms/wayland/qwaylandwindow.h
+++ b/src/plugins/platforms/wayland/qwaylandwindow.h
@@ -94,7 +94,6 @@ public:
QWaylandSubSurface *subSurfaceWindow() const;
void handleContentOrientationChange(Qt::ScreenOrientation orientation);
- Qt::ScreenOrientation requestWindowOrientation(Qt::ScreenOrientation orientation);
void setWindowState(Qt::WindowState state);
void setWindowFlags(Qt::WindowFlags flags);