diff options
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 1 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_x11.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 22f7e19..c287d81 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -602,6 +602,7 @@ public: // static gravity! XSizeHints sh; + memset(&sh, 0, sizeof(sh)); long unused; XGetWMNormalHints(X11->display, internalWinId(), &sh, &unused); sh.flags |= USPosition | PPosition | USSize | PSize | PWinGravity; diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index aec4ade..fa910aa 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -780,6 +780,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO // note: WM_TRANSIENT_FOR is set in QWidgetPrivate::show_sys() XSizeHints size_hints; + memset(&size_hints, 0, sizeof(size_hints)); size_hints.flags = USSize | PSize | PWinGravity; size_hints.x = data.crect.left(); size_hints.y = data.crect.top(); @@ -2298,7 +2299,7 @@ static void do_size_hints(QWidget* widget, QWExtra *x) { Q_ASSERT(widget->testAttribute(Qt::WA_WState_Created)); XSizeHints s; - s.flags = 0; + memset(&s, 0, sizeof(s)); if (x) { QRect g = widget->geometry(); s.x = g.x(); |