* Improved filter input vs. mouse use behaviour.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29864 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8f400a127a
commit
c7c20fc184
@ -72,12 +72,14 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 ResetMoved()
|
bool HasMoved() const
|
||||||
{
|
{
|
||||||
int32 old = fMouseMoved;
|
return fMouseMoved != 0;
|
||||||
fMouseMoved = 0;
|
}
|
||||||
|
|
||||||
return old;
|
void ResetMoved()
|
||||||
|
{
|
||||||
|
fMouseMoved = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual filter_result Filter(BMessage* message, BHandler** /*_target*/)
|
virtual filter_result Filter(BMessage* message, BHandler** /*_target*/)
|
||||||
@ -273,7 +275,7 @@ CharacterWindow::MessageReceived(BMessage* message)
|
|||||||
fCharacterView->ScrollTo(item->BlockIndex());
|
fCharacterView->ScrollTo(item->BlockIndex());
|
||||||
|
|
||||||
// Give the filter control focus if we got here by mouse action
|
// Give the filter control focus if we got here by mouse action
|
||||||
if (fMouseMovedFilter->ResetMoved())
|
if (fMouseMovedFilter->HasMoved())
|
||||||
fFilterControl->MakeFocus();
|
fFilterControl->MakeFocus();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -364,12 +366,14 @@ CharacterWindow::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
case kMsgFilterChanged:
|
case kMsgFilterChanged:
|
||||||
fUnicodeBlockView->SetFilter(fFilterControl->Text());
|
fUnicodeBlockView->SetFilter(fFilterControl->Text());
|
||||||
|
fMouseMovedFilter->ResetMoved();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kMsgFilterEntered:
|
case kMsgFilterEntered:
|
||||||
fUnicodeBlockView->MakeFocus();
|
if (!fMouseMovedFilter->HasMoved()) {
|
||||||
fUnicodeBlockView->Select(0);
|
fUnicodeBlockView->MakeFocus();
|
||||||
fMouseMovedFilter->ResetMoved();
|
fUnicodeBlockView->Select(0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kMsgClearFilter:
|
case kMsgClearFilter:
|
||||||
|
Loading…
Reference in New Issue
Block a user