summaryrefslogtreecommitdiff
path: root/sysdata_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-04-03 18:33:37 -0400
committerPietro Gagliardi <[email protected]>2014-04-03 18:33:37 -0400
commit01d9e1b02b58143064cb2b5e0a8a6cf150402725 (patch)
tree0b9fb92df883d2bc9b19d12a462e1c37bf00b255 /sysdata_darwin.go
parent773668c35b6aa1c0e9cd449fffcffeeea3d542a6 (diff)
Enabled mouse move events on Mac OS X. Mosue events now just got stranger and buggier there...
Diffstat (limited to 'sysdata_darwin.go')
-rw-r--r--sysdata_darwin.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdata_darwin.go b/sysdata_darwin.go
index 8d56c06..3cb0ada 100644
--- a/sysdata_darwin.go
+++ b/sysdata_darwin.go
@@ -46,6 +46,7 @@ var (
_initWithContentRect = sel_getUid("initWithContentRect:styleMask:backing:defer:")
_initWithFrame = sel_getUid("initWithFrame:")
+ _setAcceptsMouseMovedEvents = sel_getUid("setAcceptsMouseMovedEvents:")
_makeKeyAndOrderFront = sel_getUid("makeKeyAndOrderFront:")
_orderOut = sel_getUid("orderOut:")
_setHidden = sel_getUid("setHidden:")
@@ -116,6 +117,8 @@ var classTypes = [nctypes]*classData{
2, // NSBackingStoreBuffered - the only backing store method that Apple says we should use (the others are legacy)
C.BOOL(C.YES)) // defer creation of device until we show the window
objc_setDelegate(win, appDelegate)
+ // this is needed for Areas in the window to receive mouse move events
+ C.objc_msgSend_bool(win, _setAcceptsMouseMovedEvents, C.BOOL(C.YES))
return win
},
show: func(what C.id) {