* avoid key highlighting unless the preflet window is active, at least
I've found it pretty silly that the Keymap preflet would document all my keypresses although I'm doing something elsewhere git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30745 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -108,6 +108,13 @@ KeyboardLayoutView::FrameResized(float width, float height)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
KeyboardLayoutView::WindowActivated(bool active)
|
||||
{
|
||||
if (active)
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
BSize
|
||||
KeyboardLayoutView::MinSize()
|
||||
{
|
||||
@@ -482,7 +489,8 @@ KeyboardLayoutView::MessageReceived(BMessage* message)
|
||||
&& fModifiers != newModifiers) {
|
||||
fModifiers = newModifiers;
|
||||
_EvaluateDropTarget(fDropPoint);
|
||||
Invalidate();
|
||||
if (Window()->IsActive())
|
||||
Invalidate();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -947,7 +955,7 @@ KeyboardLayoutView::_KeyChanged(const BMessage* message)
|
||||
uint8 diff = fKeyState[i] ^ state[i];
|
||||
fKeyState[i] = state[i];
|
||||
|
||||
if (!checkSingle)
|
||||
if (!checkSingle || !Window()->IsActive())
|
||||
continue;
|
||||
|
||||
for (int32 j = 7; diff != 0; j--, diff >>= 1) {
|
||||
|
||||
@@ -43,7 +43,7 @@ protected:
|
||||
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
virtual void WindowActivated(bool active);
|
||||
private:
|
||||
enum key_kind {
|
||||
kNormalKey,
|
||||
|
||||
Reference in New Issue
Block a user