#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:
Has a Patch: yes 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 19 months ago.
Simple program to reproduce the bug
Window_FindView.diff (519 bytes) - added by jalopeura 19 months ago.
Window_FindView.2.diff (507 bytes) - added by jalopeura 19 months ago.
patch

Download all attachments as: .zip

Change History (7)

Changed 19 months ago by jalopeura

Attachment: Bitmap_FindView.cpp added

Simple program to reproduce the bug

Changed 19 months ago by jalopeura

Attachment: Window_FindView.diff added

comment:1 Changed 19 months ago by jalopeura

Has a Patch: set

comment:2 Changed 19 months ago by pulkomandy

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.

Changed 19 months ago by jalopeura

Attachment: Window_FindView.2.diff added

patch

comment:3 Changed 19 months ago by jalopeura

New patch incorporating suggestion.

comment:4 Changed 18 months ago by pulkomandy

Resolution: fixed
Status: newclosed

Applied in hrev51476.

Note: See TracTickets for help on using tickets.