need scroll wheel support for Mac OSX

RESOLVED FIXED in mozilla0.9.3

Status

()

Core
XUL
--
enhancement
RESOLVED FIXED
17 years ago
17 years ago

People

(Reporter: Dave Alverson, Assigned: Mike Pinkerton (not reading bugmail))

Tracking

Trunk
mozilla0.9.3
PowerPC
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: OSX+)

Attachments

(2 attachments)

(Reporter)

Description

17 years ago
Mac OSX has builtin support for mice with a scroll wheel.  But a carbon app has 
to set up an event handler.  You install the handler with a reference to the 
window and a pointer to some chunk of data.  Then when the handler is called it 
gives you that pointer.  The necessary API stuff is in CarbonEvents.h.  I am 
attaching an exerpt from Apple's SimpleText sample that shows how they use it.
(Reporter)

Comment 1

17 years ago
Created attachment 26904 [details]
scroll wheel support from SimpleText example

Comment 2

17 years ago
->pinkerton
Assignee: trudelle → pinkerton
(Assignee)

Updated

17 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → mozilla0.9.1
(Reporter)

Comment 3

17 years ago
I noticed a change with the wheel API with the OSX seed I just received.  When 
you check the axis parameter in the event handler, you should check for it being 
kEventMouseWheelAxisY, not kEventMouseWheelAxisX.  
(Assignee)

Comment 4

17 years ago
moving my osx bugs to 0.9.2
Target Milestone: mozilla0.9.1 → mozilla0.9.2

Updated

17 years ago
Whiteboard: OSX+

Comment 5

17 years ago
->0.9.3
Target Milestone: mozilla0.9.2 → mozilla0.9.3
(Assignee)

Comment 6

17 years ago
Created attachment 40408 [details] [diff] [review]
[patch] unifies the two models
(Assignee)

Comment 7

17 years ago
new patch looks heinous, but is pretty straightforward. making scrollbar hack 
only non-carbon and hooking up carbonEvents for scrollwheel. had to refactor a 
bit of the event handler to unify the two models, but nothing tricky.

needs r/sr/a for branch.
Keywords: nsBranch
(Assignee)

Comment 8

17 years ago
r=beard.

i changed nsMacWindow::ScrollEventHandler to add err checking for the calls to 
::GetEventParam so we won't scroll with garbage values if any of them fail.

Comment 9

17 years ago
+  nsMacWindow* self = NS_REINTERPRET_CAST(nsMacWindow*, userData);
+  self->mMacEventHandler->Scroll ( axis, delta, mouseLoc );

maybe a paranoid check for null here? Otherwise sr=sfraser
(Assignee)

Comment 10

17 years ago
now on both trunk and branch.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
(Reporter)

Comment 11

17 years ago
Fizzilla 2001070216 from contrib/fizzillacfm. You might want it to scroll more
on each scroll event.  It looks like each tick on the wheel gets about one line
of text.  omniweb seems to scroll 4 lines per tick.  On my Logitech wheelmouse,
fizz took 47 wheel turns to scroll thru macsurfer.com, where omniweb took 14. 
One idea: you could use some primitive acceleration logic, like scroll 1 or 2
lines on the first scroll event, but on subsequent events (within a short
period) it would scroll 4 or more lines.
You need to log in before you can comment on or make changes to this bug.