diff options
-rw-r--r-- | src/gui/kernel/qwidget_win.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp index 1881a4a..3fdc00c 100644 --- a/src/gui/kernel/qwidget_win.cpp +++ b/src/gui/kernel/qwidget_win.cpp @@ -427,8 +427,8 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO } } if (!wasMoved) { - x = sw/2 - w/2; - y = sh/2 - h/2; + x = qMax(sw/2 - w/2, 0); + y = qMax(sh/2 - h/2, 0); } } |