I tried searching and did not see anyone else having this problem. I tried 
turning on sandboxing in my LSUIElement application that normally does not 
activate, and found that, for some strange reason, the app receives mouse down 
events, but never receives mouse up events while tracking the mouse if the 
window was not active when it was clicked. Because the app never receives the 
event, and the app uses NSTableView (which does its own event tracking instead 
of using -mouseUp:), then NSTableView gets stuck waiting for something that's 
never going to happen.

With event tracing turned on, if I turn off sandboxing, or if I make the window 
active first, then it works correctly:

2011-12-30 12:30:05.974 MyApp[54520:b03] Received event: LMouseDown at: 
1818.0,158.0 time: 241491984611000 flags: 0x180 win: 16938 ctxt: 2c113 data: 
8176,1
2011-12-30 12:30:05.974 MyApp[54520:b03]     In Application: NSEvent: 
type=LMouseDown loc=(78,937) time=241492.0 flags=0x180 win=0x0 winNum=16938 
ctxt=0x0 evNum=8176 click=1 buttonNumber=0 pressure=1
2011-12-30 12:30:05.974 MyApp[54520:b03]     In Window: NSEvent: 
type=LMouseDown loc=(78,937) time=241492.0 flags=0x180 win=0x10143f3d0 
winNum=16938 ctxt=0x0 evNum=8176 click=1 buttonNumber=0 pressure=1
2011-12-30 12:30:05.976 MyApp[54520:b03] timeout = 62766937794.023842 seconds, 
mask = 1005c, dequeue = 1, mode = NSEventTrackingRunLoopMode
2011-12-30 12:30:05.980 MyApp[54520:b03] Received event: LMouseUp at: 
1818.0,158.0 time: 241491990904000 flags: 0x180 win: 16938 ctxt: 2c113 data: 
8176,1
2011-12-30 12:30:05.998 MyApp[54520:b03] timeout = 62766937794.001602 seconds, 
mask = ffffffffffffffff, dequeue = 1, mode = kCFRunLoopDefaultMode

But once I turn on sandboxing, this is all I get before the application freezes:

2011-12-30 12:20:25.816 MyApp[54446:b03] Received event: LMouseDown at: 
1826.0,463.0 time: 240911808500000 flags: 0x180 win: 16929 ctxt: 1e9df data: 
8155,1
2011-12-30 12:20:25.816 MyApp[54446:b03]     In Application: NSEvent: 
type=LMouseDown loc=(86,331) time=240911.8 flags=0x180 win=0x0 winNum=16929 
ctxt=0x0 evNum=8155 click=1 buttonNumber=0 pressure=1
2011-12-30 12:20:25.816 MyApp[54446:b03]     In Window: NSEvent: 
type=LMouseDown loc=(86,331) time=240911.8 flags=0x180 win=0x102959ae0 
winNum=16929 ctxt=0x0 evNum=8155 click=1 buttonNumber=0 pressure=1
2011-12-30 12:20:25.818 MyApp[54446:b03] timeout = 62766938374.181313 seconds, 
mask = 1005c, dequeue = 1, mode = NSEventTrackingRunLoopMode

The really strange thing is, this works as expected when sandboxing is turned 
off. It also works as expected if the window was active. But I can't ship the 
application with sandboxing on unless I can figure out how to fix or work 
around this. Has anyone seen this before, and if so, then how do I make this 
work?

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to