ui.backend.cocoa.views: Don't throw an error on weird mouse buttons. Fixes #1453.

db4
Doug Coleman 2015-08-18 23:22:55 -07:00
parent ac5da311f7
commit 3649dd2764
1 changed files with 2 additions and 0 deletions

View File

@ -14,12 +14,14 @@ IN: ui.backend.cocoa.views
[ mouse-location ] [ drop window ] 2bi
[ move-hand fire-motion yield ] [ drop ] if* ;
! Issue #1453
: button ( event -- n )
#! Cocoa -> Factor UI button mapping
-> buttonNumber {
{ 0 [ 1 ] }
{ 1 [ 3 ] }
{ 2 [ 2 ] }
[ ]
} case ;
CONSTANT: modifiers