Opened 7 years ago
Closed 7 years ago
#13729 closed bug (fixed)
BBitmap::FindView(BPoint) doesn't work
Reported by: | jalopeura | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
The BPoint version of BBitmap::FindView does not work, die to the fact that the underlying method in BWindow always returns NULL when the BWindow is not visible, and the offscreen windows used for bitmaps are never visible.
Attachments (3)
Change History (7)
by , 7 years ago
Attachment: | Bitmap_FindView.cpp added |
---|
by , 7 years ago
Attachment: | Window_FindView.diff added |
---|
comment:1 by , 7 years ago
patch: | 0 → 1 |
---|
comment:2 by , 7 years ago
That patch is too special-casing.
There is a reason for ignoring hidden views here, which is that there may be multiple views above each other and you want the current one to be selected. This happens for example with BTabView, which stacks up the tabs and shows/hide them as needed.
You can use IsHidden(BView* looking_from) to detect if a view is hidden because of itself, or because of a parent. In this case, looking from the "view" initially given as parameter to _FindView should give the expected result.
Simple program to reproduce the bug