Fix BWindow::_FindView when the window is hidden
_FindView finds a view that contains a specific BPoint (usually used to dispatch a mouse event to it). It should ignore hidden views, but not if they are hidden because of their parent. In particular, if the whole window is hidden (for example, it is used to draw onto a BBitmap), this should not be taken into account here. Signed-off-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
403baf656d
commit
d566b4d9dd
@@ -4016,7 +4016,7 @@ BView*
|
||||
BWindow::_FindView(BView* view, BPoint point) const
|
||||
{
|
||||
// point is assumed to be already in view's coordinates
|
||||
if (!view->IsHidden() && view->Bounds().Contains(point)) {
|
||||
if (!view->IsHidden(view) && view->Bounds().Contains(point)) {
|
||||
if (view->fFirstChild == NULL)
|
||||
return view;
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user