summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fbconvenience/qfbscreen.cpp
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-07-07 08:49:12 +0530
committerQt by Nokia <qt-info@nokia.com>2012-07-11 12:44:56 +0200
commite32ee62c7a1938c7ba331a8838120b0ea9c9ce3c (patch)
tree2a46319c4aba685a4949ecb7a7f5e8a9cf2f95b6 /src/platformsupport/fbconvenience/qfbscreen.cpp
parentc2b9c0ec89b3b4cfe1ace96bd8a54bdf765c85ad (diff)
linuxfb: raise and lower should take QFbWindow as args
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Thomas Senyk <thomas.senyk@nokia.com> Change-Id: I856ea141a39f23968169ba29be1445fa089f7f02 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'src/platformsupport/fbconvenience/qfbscreen.cpp')
-rw-r--r--src/platformsupport/fbconvenience/qfbscreen.cpp42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/platformsupport/fbconvenience/qfbscreen.cpp b/src/platformsupport/fbconvenience/qfbscreen.cpp
index 5d2208a3a1..537a49819b 100644
--- a/src/platformsupport/fbconvenience/qfbscreen.cpp
+++ b/src/platformsupport/fbconvenience/qfbscreen.cpp
@@ -67,26 +67,38 @@ void QFbScreen::initializeCompositor()
connect(&redrawTimer, SIGNAL(timeout()), this, SLOT(doRedraw()));
}
-void QFbScreen::raise(QPlatformWindow * surface)
+void QFbScreen::addWindow(QFbWindow *window)
{
- QFbWindow *s = static_cast<QFbWindow *>(surface);
- int index = windowStack.indexOf(s);
+ windowStack.prepend(window);
+ invalidateRectCache();
+ setDirty(window->geometry());
+}
+
+void QFbScreen::removeWindow(QFbWindow *window)
+{
+ windowStack.removeOne(window);
+ invalidateRectCache();
+ setDirty(window->geometry());
+}
+
+void QFbScreen::raise(QFbWindow *window)
+{
+ int index = windowStack.indexOf(window);
if (index <= 0)
return;
windowStack.move(index, 0);
invalidateRectCache();
- setDirty(s->geometry());
+ setDirty(window->geometry());
}
-void QFbScreen::lower(QPlatformWindow * surface)
+void QFbScreen::lower(QFbWindow *window)
{
- QFbWindow *s = static_cast<QFbWindow *>(surface);
- int index = windowStack.indexOf(s);
+ int index = windowStack.indexOf(window);
if (index == -1 || index == (windowStack.size() - 1))
return;
windowStack.move(index, windowStack.size() - 1);
invalidateRectCache();
- setDirty(s->geometry());
+ setDirty(window->geometry());
}
QWindow *QFbScreen::topLevelAt(const QPoint & p) const
@@ -222,19 +234,5 @@ QRegion QFbScreen::doRedraw()
return touchedRegion;
}
-void QFbScreen::addWindow(QFbWindow *surface)
-{
- windowStack.prepend(surface);
- invalidateRectCache();
- setDirty(surface->geometry());
-}
-
-void QFbScreen::removeWindow(QFbWindow * surface)
-{
- windowStack.removeOne(surface);
- invalidateRectCache();
- setDirty(surface->geometry());
-}
-
QT_END_NAMESPACE