WantFocus issue resolved #792

git-svn-id: svn://ultimatepp.org/upp/trunk@7460 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-06-22 07:57:43 +00:00
parent 5b1bc1831e
commit 36e8df6949
4 changed files with 10 additions and 10 deletions

View file

@ -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;%- &]

View file

@ -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)

View file

@ -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<EditField> self = this;
MenuBar::Execute(WhenBar);
if(self) { // protect from destruction when in menu modal loop
SetWantFocus();
SetFocus();
keep_selection = false;
}
}

View file

@ -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);