summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fbconvenience/qfbscreen.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-02-16 16:26:15 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-02-25 14:35:34 +0000
commitcb27388eb06335ce50bf599e5fc15b2d2c9a543a (patch)
tree6ea2ab66e621b987450596a28417cb57edd4b568 /src/platformsupport/fbconvenience/qfbscreen.cpp
parent4f39e8b9f71a418d5194621eb4fcbb766da40e4d (diff)
Support grabWindow() in linuxfb
Task-number: QTBUG-44465 Change-Id: Id74a6cc109113e6054ab31f0e765b4e7e220b657 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/platformsupport/fbconvenience/qfbscreen.cpp')
-rw-r--r--src/platformsupport/fbconvenience/qfbscreen.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/platformsupport/fbconvenience/qfbscreen.cpp b/src/platformsupport/fbconvenience/qfbscreen.cpp
index 04aa9f2fae..566f84c9ea 100644
--- a/src/platformsupport/fbconvenience/qfbscreen.cpp
+++ b/src/platformsupport/fbconvenience/qfbscreen.cpp
@@ -74,15 +74,15 @@ bool QFbScreen::event(QEvent *event)
void QFbScreen::addWindow(QFbWindow *window)
{
mWindowStack.prepend(window);
- if (!mBackingStores.isEmpty()) {
+ if (!mPendingBackingStores.isEmpty()) {
//check if we have a backing store for this window
- for (int i = 0; i < mBackingStores.size(); ++i) {
- QFbBackingStore *bs = mBackingStores.at(i);
+ for (int i = 0; i < mPendingBackingStores.size(); ++i) {
+ QFbBackingStore *bs = mPendingBackingStores.at(i);
// this gets called during QWindow::create() at a point where the
// invariant (window->handle()->window() == window) is broken
if (bs->window() == window->window()) {
window->setBackingStore(bs);
- mBackingStores.removeAt(i);
+ mPendingBackingStores.removeAt(i);
break;
}
}
@@ -295,5 +295,14 @@ QRegion QFbScreen::doRedraw()
return touchedRegion;
}
+QFbWindow *QFbScreen::windowForId(WId wid) const
+{
+ for (int i = 0; i < mWindowStack.count(); ++i)
+ if (mWindowStack[i]->winId() == wid)
+ return mWindowStack[i];
+
+ return 0;
+}
+
QT_END_NAMESPACE