From d566b4d9dd7d1caae720bff821282dc2b2de9136 Mon Sep 17 00:00:00 2001 From: Sean Healy Date: Wed, 18 Oct 2017 22:36:16 +0200 Subject: [PATCH] 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 --- src/kits/interface/Window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 4d10cbc225..ddc072cd09 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -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 {