• 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: Chaning Desktop picture with cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Chaning Desktop picture with cocoa


  • Subject: Re: Chaning Desktop picture with cocoa
  • From: Finlay Dobbie <email@hidden>
  • Date: Thu, 8 Jul 2004 13:26:51 +0100

On 8 Jul 2004, at 01:19, Nick Zitzmann wrote:

On Jul 7, 2004, at 1:35 PM, Kodex wrote:

I know it has been done before but i cant seem to find
any infomation on it anywhere. I am trying to change
the desktop picture from within an application without
restarting the finder.

The Finder doesn't control the desktop picture; the Dock does.

Bzzt. The window is actually owned the by the WindowServer (according to Quartz Debug in Mac OS X 10.3.4). However, this is an implementation detail you shouldn't care about - and I'm pretty sure this is a change since earlier versions, when the Finder put up its own desktop picture window (pre-10.2 I believe the desktop icons were composited into the Finder's desktop window atop the desktop picture, meaning you couldn't insert your own window between the desktop picture and the desktop icons -- however this has been resolved).

At no time has the Dock ever owned this window, AFAIK.

Anyway, this can be done using NSDistributedNotificationCenter; download Notification Watcher at <http://www.tildesoft.com/Programs.html> and watch what happens in Notification Watcher when you change the desktop picture from System Preferences.

The distributed notification is an implementation detail and has never been documented anywhere. Don't rely on it. The correct method is to send an AppleEvent to the Finder. See <http://developer.apple.com/samplecode/DeskPictAppDockMenu/ listing3.html> for code demonstrating this.

-- Finlay
_______________________________________________
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: Chaning Desktop picture with cocoa
      • From: Nick Zitzmann <email@hidden>
References: 
 >Chaning Desktop picture with cocoa (From: Kodex <email@hidden>)
 >Re: Chaning Desktop picture with cocoa (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Vector graphics
  • Next by Date: Re: Chaning Desktop picture with cocoa
  • Previous by thread: Re: Chaning Desktop picture with cocoa
  • Next by thread: Re: Chaning Desktop picture with cocoa
  • Index(es):
    • Date
    • Thread