QNX: Cleanup some issues in QPA
* Avoided crash, if root window is reparented * Corrected video window name * Made parent window member private again Change-Id: Icef9fad5495413e0de87c4366f25dad6c4fd5775 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
This commit is contained in:
parent
6ab6ab73fe
commit
b709d07c34
@ -166,7 +166,7 @@ void QQnxRasterWindow::adjustBufferSize()
|
|||||||
{
|
{
|
||||||
// When having a raster window we don't need any buffers, since
|
// When having a raster window we don't need any buffers, since
|
||||||
// Qt will draw to the parent TLW backing store.
|
// Qt will draw to the parent TLW backing store.
|
||||||
const QSize windowSize = m_parentWindow ? QSize(1,1) : window()->size();
|
const QSize windowSize = window()->parent() ? QSize(1,1) : window()->size();
|
||||||
if (windowSize != bufferSize())
|
if (windowSize != bufferSize())
|
||||||
setBufferSize(windowSize);
|
setBufferSize(windowSize);
|
||||||
}
|
}
|
||||||
|
@ -670,7 +670,7 @@ void QQnxScreen::newWindowCreated(void *window)
|
|||||||
// Otherwise, assume that if a foreign window already has a Z-Order both negative and
|
// Otherwise, assume that if a foreign window already has a Z-Order both negative and
|
||||||
// less than the default Z-Order installed by mmrender on windows it creates,
|
// less than the default Z-Order installed by mmrender on windows it creates,
|
||||||
// the windows should be treated as an underlay. Otherwise, we treat it as an overlay.
|
// the windows should be treated as an underlay. Otherwise, we treat it as an overlay.
|
||||||
if (!windowName.isEmpty() && windowName.startsWith("BbVideoWindowControl")) {
|
if (!windowName.isEmpty() && windowName.startsWith("MmRendererVideoWindowControl")) {
|
||||||
addMultimediaWindow(windowName, windowHandle);
|
addMultimediaWindow(windowName, windowHandle);
|
||||||
} else if (!findWindow(windowHandle)) {
|
} else if (!findWindow(windowHandle)) {
|
||||||
if (zorder <= MAX_UNDERLAY_ZORDER)
|
if (zorder <= MAX_UNDERLAY_ZORDER)
|
||||||
|
@ -75,9 +75,9 @@ QT_BEGIN_NAMESPACE
|
|||||||
QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootWindow)
|
QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootWindow)
|
||||||
: QPlatformWindow(window),
|
: QPlatformWindow(window),
|
||||||
m_screenContext(context),
|
m_screenContext(context),
|
||||||
m_parentWindow(0),
|
|
||||||
m_window(0),
|
m_window(0),
|
||||||
m_screen(0),
|
m_screen(0),
|
||||||
|
m_parentWindow(0),
|
||||||
m_visible(false),
|
m_visible(false),
|
||||||
m_exposed(true),
|
m_exposed(true),
|
||||||
m_windowState(Qt::WindowNoState),
|
m_windowState(Qt::WindowNoState),
|
||||||
@ -380,6 +380,11 @@ void QQnxWindow::setParent(const QPlatformWindow *window)
|
|||||||
if (newParent == m_parentWindow)
|
if (newParent == m_parentWindow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (screen()->rootWindow() == this) {
|
||||||
|
qWarning() << "Application window cannot be reparented";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
removeFromParent();
|
removeFromParent();
|
||||||
m_parentWindow = newParent;
|
m_parentWindow = newParent;
|
||||||
|
|
||||||
|
@ -122,8 +122,6 @@ protected:
|
|||||||
screen_context_t m_screenContext;
|
screen_context_t m_screenContext;
|
||||||
QScopedPointer<QQnxAbstractCover> m_cover;
|
QScopedPointer<QQnxAbstractCover> m_cover;
|
||||||
|
|
||||||
QQnxWindow *m_parentWindow;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createWindowGroup();
|
void createWindowGroup();
|
||||||
void setGeometryHelper(const QRect &rect);
|
void setGeometryHelper(const QRect &rect);
|
||||||
@ -137,6 +135,7 @@ private:
|
|||||||
QSize m_bufferSize;
|
QSize m_bufferSize;
|
||||||
|
|
||||||
QQnxScreen *m_screen;
|
QQnxScreen *m_screen;
|
||||||
|
QQnxWindow *m_parentWindow;
|
||||||
QList<QQnxWindow*> m_childWindows;
|
QList<QQnxWindow*> m_childWindows;
|
||||||
bool m_visible;
|
bool m_visible;
|
||||||
bool m_exposed;
|
bool m_exposed;
|
||||||
|
Loading…
Reference in New Issue
Block a user