Don't discard all current input processing flags in response to WM_GETDLGCODE
Some current input processing flags, like DLGC_HASSETSEL, should be retained because they are in use (in wxWindowMSW::SetFocusFromKbd() for instance). Closes #17945.
This commit is contained in:
@@ -201,6 +201,7 @@ wxMSW:
|
|||||||
- Fix caching of wxFONTSTYLE_SLANT fonts in wxTheFontList.
|
- Fix caching of wxFONTSTYLE_SLANT fonts in wxTheFontList.
|
||||||
- Fix wxTextCtrl::XYToPosition() and PositionToXY().
|
- Fix wxTextCtrl::XYToPosition() and PositionToXY().
|
||||||
- Fix updating radio groups when non-radio item is inserted to wxMenu.
|
- Fix updating radio groups when non-radio item is inserted to wxMenu.
|
||||||
|
- Fix autoselecting the contents of wxTextCtrl with wxWANTS_CHARS style.
|
||||||
|
|
||||||
wxOSX:
|
wxOSX:
|
||||||
|
|
||||||
|
@@ -2969,8 +2969,10 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
|
|||||||
case WM_GETDLGCODE:
|
case WM_GETDLGCODE:
|
||||||
if ( !IsOfStandardClass() || HasFlag(wxWANTS_CHARS) )
|
if ( !IsOfStandardClass() || HasFlag(wxWANTS_CHARS) )
|
||||||
{
|
{
|
||||||
|
// Get current input processing flags to retain flags like DLGC_HASSETSEL, etc.
|
||||||
|
rc.result = MSWDefWindowProc(WM_GETDLGCODE, 0, 0);
|
||||||
// we always want to get the char events
|
// we always want to get the char events
|
||||||
rc.result = DLGC_WANTCHARS;
|
rc.result |= DLGC_WANTCHARS;
|
||||||
|
|
||||||
if ( HasFlag(wxWANTS_CHARS) )
|
if ( HasFlag(wxWANTS_CHARS) )
|
||||||
{
|
{
|
||||||
@@ -2980,6 +2982,7 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
|
|||||||
DLGC_WANTALLKEYS;
|
DLGC_WANTALLKEYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Message is marked as processed so MSWDefWindowProc() will not be called once more.
|
||||||
processed = true;
|
processed = true;
|
||||||
}
|
}
|
||||||
//else: get the dlg code from the DefWindowProc()
|
//else: get the dlg code from the DefWindowProc()
|
||||||
|
Reference in New Issue
Block a user