• 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
Problems when putting a window between desktop and desktop icons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems when putting a window between desktop and desktop icons


  • Subject: Problems when putting a window between desktop and desktop icons
  • From: "Markus Amalthea Magnuson" <email@hidden>
  • Date: Tue, 21 Oct 2008 20:43:00 +0200

Hello,

I am trying to put a window above the desktop but below the desktop
icons. I have achieved this by using the following code (in my own
subclass of NSWindow):

[self setLevel:kCGDesktopIconWindowLevel - 1];

I can see that it at least visually works by using:

[self setBackgroundColor:[NSColor redColor]];
[self setAlphaValue:0.5];

This half transparent red color covers the desktop, but not the
desktop icons. So far, so good. The problem however, is that my window
intercepts all mouse clicks, even if I click on an icon. I've set up a
simple test by handling |mouseUp:| in the following way:

NSLog(@"Received %d clicks", [theEvent clickCount]);

I get this log message for all clicks, even when clicking desktop
icons. I've also tried to subtract 1 from the window level for each
click, to try each subsequent window level but the problem persists
att all available window levels, all the way to the lowest one (which
seems to be -2147483647, after which I get a "PSsetwindowlevel, error
setting window level (1001)" error).

Is there any way at all to put a window at the desired level, between
desktop and desktop icons, but still not have it intercept clicks from
icon areas?

regards
--
Markus Amalthea Magnuson

http://konstochvanligasaker.se
http://nattlek.se

"Life... is like a grapefruit. It's orange and squishy, and has a few
pips in it, and some folks have half a one for breakfast."
 – Douglas Adams
_______________________________________________

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: Problems when putting a window between desktop and desktop icons
      • From: Charles Steinman <email@hidden>
  • Prev by Date: Re: Starting a drag in mouseDragged
  • Next by Date: Data structure suggestions
  • Previous by thread: Automatically generated predicate row templates for to-many key?
  • Next by thread: Re: Problems when putting a window between desktop and desktop icons
  • Index(es):
    • Date
    • Thread