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)

Bitmap_FindView.cpp (404 bytes ) - added by jalopeura 7 years ago.
Simple program to reproduce the bug
Window_FindView.diff (519 bytes ) - added by jalopeura 7 years ago.
Window_FindView.2.diff (507 bytes ) - added by jalopeura 7 years ago.
patch

Download all attachments as: .zip

Change History (7)

by jalopeura, 7 years ago

Attachment: Bitmap_FindView.cpp added

Simple program to reproduce the bug

by jalopeura, 7 years ago

Attachment: Window_FindView.diff added

comment:1 by jalopeura, 7 years ago

patch: 01

comment:2 by pulkomandy, 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.

by jalopeura, 7 years ago

Attachment: Window_FindView.2.diff added

patch

comment:3 by jalopeura, 7 years ago

New patch incorporating suggestion.

comment:4 by pulkomandy, 7 years ago

Resolution: fixed
Status: newclosed

Applied in hrev51476.

Note: See TracTickets for help on using tickets.