Prevent X errors being generated when setting 0 as width or height.
Change-Id: I38b12471f2c327952c4b5f6acb01c1f1ef53da28 Reviewed-on: http://codereview.qt.nokia.com/2823 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
This commit is contained in:
parent
cea41dc093
commit
9db6c348df
@ -154,6 +154,9 @@ void QXcbWindow::create()
|
|||||||
QRect rect = window()->geometry();
|
QRect rect = window()->geometry();
|
||||||
QPlatformWindow::setGeometry(rect);
|
QPlatformWindow::setGeometry(rect);
|
||||||
|
|
||||||
|
rect.setWidth(qBound(1, rect.width(), XCOORD_MAX));
|
||||||
|
rect.setHeight(qBound(1, rect.height(), XCOORD_MAX));
|
||||||
|
|
||||||
xcb_window_t xcb_parent_id = m_screen->root();
|
xcb_window_t xcb_parent_id = m_screen->root();
|
||||||
if (parent())
|
if (parent())
|
||||||
xcb_parent_id = static_cast<QXcbWindow *>(parent())->xcb_window();
|
xcb_parent_id = static_cast<QXcbWindow *>(parent())->xcb_window();
|
||||||
|
Loading…
Reference in New Issue
Block a user