Window tab is highlighted/grayed when changing between windows
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11665 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -890,6 +890,7 @@ void RootLayer::MouseEventHandler(int32 code, BPortLink& msg)
|
|||||||
click_type action;
|
click_type action;
|
||||||
bool invalidate;
|
bool invalidate;
|
||||||
bool sendMessage = true;
|
bool sendMessage = true;
|
||||||
|
WinBorder *exFocus = FocusWinBorder();
|
||||||
|
|
||||||
action = target->TellWhat(evt);
|
action = target->TellWhat(evt);
|
||||||
|
|
||||||
@@ -900,9 +901,23 @@ void RootLayer::MouseEventHandler(int32 code, BPortLink& msg)
|
|||||||
|
|
||||||
if (invalidate)
|
if (invalidate)
|
||||||
{
|
{
|
||||||
|
WinBorder *focus = FocusWinBorder();
|
||||||
|
if (exFocus && exFocus != focus && exFocus->fDecorator)
|
||||||
|
exFocus->fDecorator->SetFocus(false);
|
||||||
|
if (focus && exFocus != focus && focus->fDecorator)
|
||||||
|
focus->fDecorator->SetFocus(true);
|
||||||
|
|
||||||
BRegion reg(target->fFull);
|
BRegion reg(target->fFull);
|
||||||
reg.Include(&target->fTopLayer->fFull);
|
reg.Include(&target->fTopLayer->fFull);
|
||||||
invalidate_layer(this, reg);
|
invalidate_layer(this, reg);
|
||||||
|
if (exFocus && FocusWinBorder() != exFocus)
|
||||||
|
{
|
||||||
|
reg.MakeEmpty();
|
||||||
|
reg.Include(&exFocus->fVisible);
|
||||||
|
// TODO: this line is a hack, decorator is drawn twice.
|
||||||
|
reg.Include(&focus->fVisible);
|
||||||
|
redraw_layer(this, reg);
|
||||||
|
}
|
||||||
|
|
||||||
if (!(target->Window()->Flags() & B_WILL_ACCEPT_FIRST_CLICK))
|
if (!(target->Window()->Flags() & B_WILL_ACCEPT_FIRST_CLICK))
|
||||||
sendMessage = false;
|
sendMessage = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user