• 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: Update and another question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Update and another question


  • Subject: Re: Update and another question
  • From: Brian Webster <email@hidden>
  • Date: Mon, 11 Mar 2002 15:41:01 -0600

On Monday, March 11, 2002, at 03:27 PM, cocoa-dev-
email@hidden wrote:

Now, for my question. I've read every relevant part of the docs as far
as I can tell (and checked the list archives), so forgive me if this is
obvious. When the user initiates a drag in my app when the window is in
the background, the window forces itself to the front as soon as he
clicks (I overrode setAcceptsFirstMouse: so the user can begin the drag
immediately though). Obviously, this can be rather annoying if one
intends to drag things from my app into the foreground app, so I want
the window to stay in the background if the user initiates a drag.

I know this is possible (Mail an Omniweb do it, among others) but for
the life of me I can't figure out how. So my question is... "How?" :-)

Take a look at -[NSApplication preventWindowOrdering]. If you override your mouseDown: method and call this and then call [super mouseDown:], this should prevent your window from coming to the front for that event.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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:
    • preventWindowOrdering
      • From: Andreas Schwarz <email@hidden>
  • Prev by Date: Re: NSTextField refreshes are wacky.
  • Next by Date: Re: Mutiple colors in one NSBezierPath?
  • Previous by thread: Update and another question
  • Next by thread: preventWindowOrdering
  • Index(es):
    • Date
    • Thread