• 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: Converting mouse location between windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting mouse location between windows


  • Subject: Re: Converting mouse location between windows
  • From: Marco Binder <email@hidden>
  • Date: Wed, 11 Dec 2002 13:29:44 +0100

Look into the doc of NSWindow. Surprisingly (isnt it?) you will find a method called convertBaseToScreen: there (and vice versa even).

If however you just want to monitor the currentMousePosition (not the locationInWindow of a specific NSEvent), you can use NSEvents + mouseLocation which will return a NSPoint in screen coordinates.

marco

How can I convert the mouse location [NSEvent locationInWindow] from one window to another?

[NSView convertPoint:fromView:] requires both views to be from the same NSWindow. In my case, I have a modal window which should responds when the mouse moves over (inside) the view of another window.

Thanks for any help!
_______________________________________________
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.
_______________________________________________
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.

  • Prev by Date: Re: A window behind everything & how disable events on it...
  • Next by Date: Re: mouseMoved and first responder madness
  • Previous by thread: Cocoa Messages
  • Next by thread: TaskWrapper commands with "*.txt" for example
  • Index(es):
    • Date
    • Thread