Closed Bug 334537 Opened 19 years ago Closed 19 years ago

nsMenuBarX.mm installs an event handler poorly

Categories

(Core :: Widget: Cocoa, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mark, Assigned: mark)

Details

Attachments

(1 file)

I didn't think this was worth its own bug, but I can't find Josh right now. In nsMenuBarX.mm, nsMenuBarX::InstallCommandEventHandler(): const EventTypeSpec commandEventList[] = {{kEventClassCommand, kEventComma ndProcess}}; err = ::InstallWindowEventHandler(myWindowRef, sCommandEventHandler, 2, co mmandEventList, this, NULL); There's only one event type in the list, so the third argument to InstallWindowEventHandler should be 1. Better yet, it should be GetEventTypeCount. Also included in the patch: elimination of an unnecessary switch.
Attached patch FixSplinter Review
Attachment #218884 - Flags: review?(joshmoz)
Attachment #218884 - Flags: review?(joshmoz) → review+
Landed on the trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: