Opened 5 years ago

Closed 2 years ago

#15169 closed enhancement (fixed)

Setting cursors with custom size

Reported by: pulkomandy Owned by: nobody
Priority: normal Milestone: R1/beta4
Component: Kits/Application Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

https://github.com/haikuports/haikuports/issues/3994

We need cursors larger than 16x16 px.

I suggest adding a new constructor to BCursor, taking a BBitmap as a parameter.

Note that when hardware cursor is used, on some devices we could be restricted to 1bpp and no alpha or transparency, so we have to handle this special case:

  • Either restrict to a single pixel format (B_GRAY1)
  • Or attempt ourselves to convert the cursor to something the hardware can handle
  • Or add an InitCheck and let the app figure out an acceptable format
  • Or automatically switch to software cursor when the driver tells us it can't handle what we need

Change History (4)

comment:2 by korli, 4 years ago

Implemented in hrev54622. I'm not sure an invalid bitmap format would come as an error ATM. Should this be closed anyway?

comment:3 by pulkomandy, 4 years ago

Yes, I think converting the cursor to a suitable format for old video cards where hardware cursor isn't 32bit RGB is a separate issue, to solve in the affected drivers?

I think it would be not so nice to let applications handle this with some kind of error code, you can expect that developers will test only on their own hardware and not see the problem, so it's better if the video driver takes care of this where needed.

comment:4 by pulkomandy, 2 years ago

Milestone: UnscheduledR1/beta4
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.