> On 26 Jun 2015, at 09:47, Martin Wierschin <mar...@nisus.com> wrote:
> 
> Hello everyone,
> 
> The quick overview: sometimes after working in my OSX app, scroll wheel 
> events are no longer being dispatched to the key window's first responder. In 
> fact, after overriding -[NSApplication sendEvent:] I can see that after the 
> misbehavior is triggered, scroll events do not even arrive for my NSApp to 
> process.
> 
> I can't reproduce the problem myself, but through debug builds and logging 
> I've verified that the first responder is correct: a custom NSView subclass 
> contained in an NSScrollView. During normal operation my NSApp receives 
> scroll events and the correct view responds, eg:
> 
>> NSApplication sending event: NSEvent: type=BeginGesture 
>> loc=(477.961,402.031) time=835761.9 ...
> 
>> NSApplication sending event: NSEvent: type=ScrollWheel loc=(477,403) 
>> time=835761.9 ...
>> -[MyView scrollWheel:] was called
>> NSApplication sending event: NSEvent: type=ScrollWheel loc=(477,403) 
>> time=835761.9 ...
>> -[MyView scrollWheel:] was called
>> NSApplication sending event: NSEvent: type=EndGesture loc=(477.961,402.031) 
>> time=835762.0 ...
> 
> But after the user works with the app for a while and somehow triggers the 
> misbehavior, my NSApp never sees another scroll event, just begin/end 
> gestures:
> 
>> NSApplication sending event: NSEvent: type=BeginGesture 
>> loc=(463.438,410.973) time=835863.2 ...
>> NSApplication sending event: NSEvent: type=EndGesture loc=(463.438,411.973) 
>> time=835863.3 ...
> 
> 
> Is there any reason this could happen? 

Transparent windows or windows with transparent sections? What app receives 
scroll events is determined by the mouse position (not first responder), and 
more precisely by whoever "owns" the opaque pixel at the mouse location, IIRC. 
So if you happen to have a one-pixel transparent hole in your window (e.g. 
because you're drawing a graphic that has one into your window using copy mode 
instead of Atop mode) and that's where your mouse is, your app would lose 
pixels. Some Adium themes used to have a bug like that.
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to