Reverted/commented out unsuccessful defer fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2005-04-28 18:21:03 +00:00
parent 83c8bcfde6
commit 283587a491
5 changed files with 14 additions and 3 deletions

View File

@ -13,8 +13,6 @@ wxMSW:
- Fixed erroneous selection of content in wxComboBox when within a wxStaticBox
(checking for selection caused by WM_STYLECHANGED).
- Worked around an apparent bug in Windows whereby some deferred positioning
failed: specifically when changing a position from x, to y, to x again.
- Added deferred positioning to wxRadioBox, wxSlider and wxSpinCtrl and thereby
eliminated some refresh glitches when resizing.
- Eliminated further refresh glitches caused by wxRadioBox (to nearby controls)

View File

@ -719,7 +719,7 @@ wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
// in a dynamic layout. Refreshing causes flicker, but it's better than
// leaving droppings. Note that for some reason, wxStaticBox doesn't need
// this (perhaps because it has no real children?)
else if (nMsg == WM_MOVE && IsKindOf(CLASSINFO(wxRadioBox)))
else if (nMsg == WM_MOVE)
{
WXLRESULT res = wxControl::MSWWindowProc(nMsg, wParam, lParam);
wxRect rect = GetRect();

View File

@ -43,6 +43,7 @@
#endif
#define USE_DEFERRED_SIZING 1
#define USE_DEFER_BUG_WORKAROUND 0
// ----------------------------------------------------------------------------
// constants

View File

@ -46,6 +46,7 @@
#include <limits.h> // for INT_MIN
#define USE_DEFERRED_SIZING 1
#define USE_DEFER_BUG_WORKAROUND 0
// ----------------------------------------------------------------------------
// macros
@ -610,6 +611,7 @@ void wxSpinCtrl::DoMoveWindow(int x, int y, int width, int height)
// get total size of the control
void wxSpinCtrl::DoGetSize(int *x, int *y) const
{
#if USE_DEFER_BUG_WORKAROUND
wxExtraWindowData* extraData = (wxExtraWindowData*) m_windowReserved;
if (extraData && extraData->m_deferring && GetParent() && GetParent()->m_hDWP)
{
@ -617,6 +619,7 @@ void wxSpinCtrl::DoGetSize(int *x, int *y) const
*y = extraData->m_size.y;
return;
}
#endif
RECT spinrect, textrect, ctrlrect;
GetWindowRect(GetHwnd(), &spinrect);
@ -631,6 +634,7 @@ void wxSpinCtrl::DoGetSize(int *x, int *y) const
void wxSpinCtrl::DoGetPosition(int *x, int *y) const
{
#if USE_DEFER_BUG_WORKAROUND
wxExtraWindowData* extraData = (wxExtraWindowData*) m_windowReserved;
if (extraData && extraData->m_deferring && GetParent() && GetParent()->m_hDWP)
{
@ -638,6 +642,7 @@ void wxSpinCtrl::DoGetPosition(int *x, int *y) const
*y = extraData->m_pos.y;
return;
}
#endif
// hack: pretend that our HWND is the text control just for a moment
WXHWND hWnd = GetHWND();

View File

@ -120,6 +120,7 @@
#endif // everything needed for TrackMouseEvent()
#define USE_DEFERRED_SIZING 1
#define USE_DEFER_BUG_WORKAROUND 0
// ---------------------------------------------------------------------------
// global variables
@ -1451,6 +1452,7 @@ void wxWindowMSW::DoSetToolTip(wxToolTip *tooltip)
// Get total size
void wxWindowMSW::DoGetSize(int *x, int *y) const
{
#if USE_DEFER_BUG_WORKAROUND
wxExtraWindowData* extraData = (wxExtraWindowData*) m_windowReserved;
if (extraData && extraData->m_deferring && GetParent() && GetParent()->m_hDWP)
{
@ -1458,6 +1460,7 @@ void wxWindowMSW::DoGetSize(int *x, int *y) const
*y = extraData->m_size.y;
return;
}
#endif
RECT rect = wxGetWindowRect(GetHwnd());
@ -1480,6 +1483,7 @@ void wxWindowMSW::DoGetClientSize(int *x, int *y) const
void wxWindowMSW::DoGetPosition(int *x, int *y) const
{
#if USE_DEFER_BUG_WORKAROUND
wxExtraWindowData* extraData = (wxExtraWindowData*) m_windowReserved;
if (extraData && extraData->m_deferring && GetParent() && GetParent()->m_hDWP)
{
@ -1487,6 +1491,7 @@ void wxWindowMSW::DoGetPosition(int *x, int *y) const
*y = extraData->m_pos.y;
return;
}
#endif
RECT rect = wxGetWindowRect(GetHwnd());
@ -4241,6 +4246,7 @@ bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam)
wxLogLastError(_T("EndDeferWindowPos"));
}
#if USE_DEFER_BUG_WORKAROUND
// Seems to be a bug in DeferWindowPos such that going from (a) to (b) to (a)
// doesn't work (omits last position/size). So check if there's a disparity,
// and correct.
@ -4260,6 +4266,7 @@ bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam)
extraData->m_deferring = false;
}
}
#endif
}
#endif