}
break;
- case WM_CBLOSTTEXTFOCUS: /* undocumented message - deselects the text when focus is lost */
+ case WM_CBLOSTTEXTFOCUS: /* undocumented message - deselects the text when focus is lost */
+ if (lphc->hWndEdit != NULL)
{
- if (lphc->hWndEdit != NULL)
- {
- SendMessage(lphc->self, WM_LBUTTONUP, 0, 0xFFFFFFFF);
- SendMessage(lphc->hWndEdit, EM_SETSEL, 0, 0);
- lphc->wState &= ~CBF_FOCUSED;
- CB_NOTIFY(lphc, CBN_KILLFOCUS);
- }
- }
+ SendMessage(lphc->self, WM_LBUTTONUP, 0, 0xFFFFFFFF);
+ SendMessage(lphc->hWndEdit, EM_SETSEL, 0, 0);
+ lphc->wState &= ~(CBF_FOCUSED | CBF_BEENFOCUSED);
+ CB_NOTIFY(lphc, CBN_KILLFOCUS);
+ }
return TRUE;
#endif
*/
static LRESULT EDIT_WM_KillFocus(EDITSTATE *es)
{
-#if 0 // See CORE-10266.
HWND hCombo;
LONG lStyles;
if ((lStyles & CBS_DROPDOWN) || (lStyles & CBS_SIMPLE))
SendMessage(hCombo, WM_CBLOSTTEXTFOCUS, 0, 0);
}
-#else
- es->flags &= ~EF_FOCUSED;
- DestroyCaret();
- if(!(es->style & ES_NOHIDESEL))
- EDIT_InvalidateText(es, es->selection_start, es->selection_end);
- EDIT_NOTIFY_PARENT(es, EN_KILLFOCUS);
- /* throw away left over scroll when we lose focus */
- es->wheelDeltaRemainder = 0;
-#endif
+
return 0;
}