Re: Tunneling mouse events through windows?
Re: Tunneling mouse events through windows?
- Subject: Re: Tunneling mouse events through windows?
- From: Dinu Gherman <email@hidden>
- Date: Thu, 20 Nov 2003 15:31:49 +0100
I wrote:
I have a window A flowing on top of the screen which I want to not
only completely ignore certain mouse events, but to pass them on
to whatever other window B is below that window A, where B is most
likely controlled by another application. Is that possible at all?
To illustrate a possible application I'll simplify the problem, in
the first place. ;-) If the (yes, transparent) window A really can
ignore all mouse events, it can do so using NSWindow's method named
setIgnoresMouseEvents:. To make it fly as high as possible I've
chosen setWindowLevel: NSScreenSaverWindowLevel (=1000).
Here is a little toylet app illustrating this:
http://python.net/~gherman/tmp/SpotLight.tar.gz
This is simple enough, but there are all sort of funny effects when
other applications come into play. Mouse events to any Finder object
always go to Nirvana. Windows of other apps devide into caring or
ignoring mouse events at will. And mouse scrollwheel events often
go to the wrong textview in some window, say in Mail.app. Best of
all: SpotLight's app menu "overlays" any other app's menu, but sta-
tusbar and dock entries are fine. Only on Panther the other app's
menu is visible when clicking into it.
Really funny - even w/t trying to filter certain mouse events! ;-)
BTW, this sample suggests there should be a better way to "change
a mouse cursor", but I think it's too naive to hope for being able
to set it to an arbitrary NSView, isn't it? At least you'd probably
have similar difficulties with other applications setting it to
something else, again... etc.
Dinu
--
Dinu C. Gherman -
http://python.net/~gherman
......................................................................
"The first principle is that you must not fool yourself - and you are
the easiest person to fool." (Richard Feynman)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.