]> git.saurik.com Git - wxWidgets.git/commit
Correct test for parent being on screen in wxTLW::DoCentre().
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 18 Jan 2010 00:28:53 +0000 (00:28 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 18 Jan 2010 00:28:53 +0000 (00:28 +0000)
commitca67f0d85925332847b79a8215514fd2d4034f3c
tree4583fb134e3f12fb41a3d512c727074a706b8c55
parentf19259fce02ed19263b3bad7269c11546ce95e07
Correct test for parent being on screen in wxTLW::DoCentre().

The old test was needlessly complicated, didn't take all cases into account
and had a typo in it which prevented it from working in half of the cases
which it did [try to] take into account.

Correct this by simply checking if the parent rectangle intersects the visible
display area at all.

Also simplify the code a little by checking for the window being maximized
from the beginning as centering a maximized window on either screen or parent
is a no-op.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/toplvcmn.cpp