diff --git a/uppsrc/CtrlCore/src.tpp/Ctrl$en-us.tpp b/uppsrc/CtrlCore/src.tpp/Ctrl$en-us.tpp index aa4d60434..3be83eb7f 100644 --- a/uppsrc/CtrlCore/src.tpp/Ctrl$en-us.tpp +++ b/uppsrc/CtrlCore/src.tpp/Ctrl$en-us.tpp @@ -1863,8 +1863,8 @@ has focus or is equal to GetOwnerCtrl of any active popup.&] [s5;:Ctrl`:`:WantFocus`(bool`):%- [_^`:`:Ctrl^ Ctrl][@(0.0.255) `&]_[* WantFocus]([@(0.0.255) b ool]_[*@3 ft]_`=_[@(0.0.255) true])&] [s2;b17;a17; Indicates whether Ctrl wants focus to be passed to it -by U`+`+, e.g. when navigating through the dialog using Tab (or -Shift`+Tab) key.&] +by U`+`+, when navigating through the dialog using Tab (or Shift`+Tab) +key.&] [s7;i1120;a17; [%-*C@3 ft]-|true to indicate that Ctrl wants focus.&] [s7;i1120;a17; [*/ Return value]-|Same Ctrl for method chaining.&] [s3;%- &] diff --git a/uppsrc/CtrlLib/DocEdit.cpp b/uppsrc/CtrlLib/DocEdit.cpp index 5304f7959..1c592ed1b 100644 --- a/uppsrc/CtrlLib/DocEdit.cpp +++ b/uppsrc/CtrlLib/DocEdit.cpp @@ -262,7 +262,7 @@ int DocEdit::GetMousePos(Point p) } void DocEdit::LeftDown(Point p, dword flags) { - SetWantFocus(); + SetFocus(); int c = GetMousePos(p); int l, h; if(GetSelection(l, h) && c >= l && c < h) { @@ -278,7 +278,7 @@ void DocEdit::LeftUp(Point p, dword flags) if(!HasCapture() && selclick) { int c = GetMousePos(p); PlaceCaret(c, flags & K_SHIFT); - SetWantFocus(); + SetFocus(); } selclick = false; } @@ -481,7 +481,7 @@ void DocEdit::RefreshStyle() void DocEdit::RightDown(Point p, dword w) { - SetWantFocus(); + SetFocus(); int c = GetMousePos(p); int l, h; if(!GetSelection(l, h) || c < l || c >= h) diff --git a/uppsrc/CtrlLib/EditField.cpp b/uppsrc/CtrlLib/EditField.cpp index 145a696fa..f5653d81e 100644 --- a/uppsrc/CtrlLib/EditField.cpp +++ b/uppsrc/CtrlLib/EditField.cpp @@ -483,7 +483,7 @@ void EditField::LeftDown(Point p, dword flags) { int c = GetCursor(p.x + sc); if(!HasFocus()) { - SetWantFocus(); + SetFocus(); if(clickselect) { SetSelection(); Finish(); @@ -864,7 +864,7 @@ void EditField::RightDown(Point p, dword keyflags) Ptr self = this; MenuBar::Execute(WhenBar); if(self) { // protect from destruction when in menu modal loop - SetWantFocus(); + SetFocus(); keep_selection = false; } } diff --git a/uppsrc/CtrlLib/LineEdit.cpp b/uppsrc/CtrlLib/LineEdit.cpp index 04fdb0100..42d5030e3 100644 --- a/uppsrc/CtrlLib/LineEdit.cpp +++ b/uppsrc/CtrlLib/LineEdit.cpp @@ -449,7 +449,7 @@ void LineEdit::LeftDown(Point p, dword flags) { return; } PlaceCaret(mpos, flags & K_SHIFT); - SetWantFocus(); + SetFocus(); SetCapture(); } @@ -458,7 +458,7 @@ void LineEdit::LeftUp(Point p, dword flags) if(!HasCapture() && selclick) { mpos = GetMousePos(p); PlaceCaret(mpos, flags & K_SHIFT); - SetWantFocus(); + SetFocus(); } selclick = false; } @@ -466,7 +466,7 @@ void LineEdit::LeftUp(Point p, dword flags) void LineEdit::RightDown(Point p, dword flags) { mpos = GetMousePos(p); - SetWantFocus(); + SetFocus(); int l, h; if(!GetSelection(l, h) || mpos < l || mpos >= h) PlaceCaret(mpos, false);