Used the new RebuildAndForceRedraw() method. Just that. Sorry, cannot concentrate this late. :-(
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8227 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
357cfe11c2
commit
1e367fecba
@ -20,7 +20,7 @@
|
|||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
// File Name: Desktop.cpp
|
// File Name: Desktop.cpp
|
||||||
// Author: Adi Oanca <adioanca@myrealbox.com>
|
// Author: Adi Oanca <adioanca@mymail.ro>
|
||||||
// Description: Class used to encapsulate desktop management
|
// Description: Class used to encapsulate desktop management
|
||||||
//
|
//
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@ -417,18 +417,10 @@ void Desktop::MouseEventHandler(PortMessage *msg)
|
|||||||
target->MouseDown(msg, true);
|
target->MouseDown(msg, true);
|
||||||
|
|
||||||
// may be or may be empty.
|
// may be or may be empty.
|
||||||
|
// TODO: what if modal of floating windows are in front of us?
|
||||||
invalidRegion.Include(&(activeFocus->fFull));
|
invalidRegion.Include(&(activeFocus->fFull));
|
||||||
invalidRegion.Include(&(activeFocus->fTopLayer->fFull));
|
invalidRegion.Include(&(activeFocus->fTopLayer->fFull));
|
||||||
activeFocus->fParent->FullInvalidate(invalidRegion);
|
activeFocus->fParent->RebuildAndForceRedraw(invalidRegion, activeFocus);
|
||||||
// TODO: this is a hack! Should be something like this:
|
|
||||||
// void Layer::RebuildAndForceRedraw(invalidReg, target){
|
|
||||||
// BPoint pt(0,0);
|
|
||||||
// StartRebuildRegions(invalidRegion, NULL, B_LAYER_NONE, pt);
|
|
||||||
// if (target) gRedrawReg.Include(target->fFullVisible);
|
|
||||||
// Redraw(gRedrawReg);
|
|
||||||
// }
|
|
||||||
// called like: target->fParent->RebuildAndForceRedraw(reg, target);
|
|
||||||
activeFocus->fParent->Invalidate(invalidRegion);
|
|
||||||
|
|
||||||
if (previousFocus != activeFocus && previousFocus)
|
if (previousFocus != activeFocus && previousFocus)
|
||||||
{
|
{
|
||||||
@ -446,9 +438,13 @@ void Desktop::MouseEventHandler(PortMessage *msg)
|
|||||||
}
|
}
|
||||||
else // target == fMouseTarget
|
else // target == fMouseTarget
|
||||||
{
|
{
|
||||||
target->Window()->Lock();
|
// only if target has the focus!
|
||||||
target->MouseDown(msg, true);
|
if (target == ws->FocusLayer())
|
||||||
target->Window()->Unlock();
|
{
|
||||||
|
target->Window()->Lock();
|
||||||
|
target->MouseDown(msg, true);
|
||||||
|
target->Window()->Unlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rl->fMainLock.Unlock();
|
rl->fMainLock.Unlock();
|
||||||
@ -473,7 +469,7 @@ void Desktop::MouseEventHandler(PortMessage *msg)
|
|||||||
fMouseTarget->MouseUp(msg);
|
fMouseTarget->MouseUp(msg);
|
||||||
fMouseTarget->Window()->Unlock();
|
fMouseTarget->Window()->Unlock();
|
||||||
|
|
||||||
// fMouseTarget = NULL;
|
fMouseTarget = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user