• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Tunneling mouse events through windows?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Tunneling mouse events through windows?
      • From: Andreas Mayer <email@hidden>
References: 
 >Tunneling mouse events through windows? (From: Dinu Gherman <email@hidden>)

  • Prev by Date: Re: changing default class naming
  • Next by Date: RE: Mailing list: General options
  • Previous by thread: Re: Tunneling mouse events through windows?
  • Next by thread: Re: Tunneling mouse events through windows?
  • Index(es):
    • Date
    • Thread