• 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
how to tell if my app is visible.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to tell if my app is visible.


  • Subject: how to tell if my app is visible.
  • From: Memo Akten <email@hidden>
  • Date: Mon, 22 Sep 2008 12:07:43 +0100


Hi All, i have an app which is running on the desktop :

windowRect = [[NSScreen mainScreen] visibleFrame];
window = [[NSWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
[window setFrame:windowRect display:NO];
[window setOpaque:NO];
[window setBackgroundColor:[NSColor clearColor]];
[window setMovableByWindowBackground:NO];
[window setLevel:kCGDesktopIconWindowLevel];
[window setAcceptsMouseMovedEvents:YES];


The app is running a quartz composition, which has custom QCPlugin in it.

My first problem was, that even where there are other app windows (e.g. finder) on top of my app, the app (the quartz composition) responds to mouse events whilst its in the background (e.g. I want animations to trigger if the mouse is over something, but not if its obscured by finder or safari etc.). So I did a check to see if my app was active or not ([[NSApplication sharedApplication] isActive]) before responding to mouse position and events.

That works to some degree, but if I have a window to the side and my app is fully visible, it doesn't respond to mouse position and events - because its not active. But is there a solution to this?









_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: how to tell if my app is visible.
      • From: "Michael Ash" <email@hidden>
    • Re: how to tell if my app is visible.
      • From: John Clayton <email@hidden>
  • Prev by Date: Re: fullscreen quicktime across multiple monitors
  • Next by Date: Re: How do I get CAScrollLayer to draw its sublayers
  • Previous by thread: Re: NSArchiver and NSKeyedArchiver
  • Next by thread: Re: how to tell if my app is visible.
  • Index(es):
    • Date
    • Thread