• 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: Context menu for minimised window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Context menu for minimised window


  • Subject: Re: Context menu for minimised window
  • From: Rainer Brockerhoff <email@hidden>
  • Date: Wed, 31 Oct 2001 17:36:34 -0200

At 17:58 -0800 30/10/2001, Ali Ozer wrote:
Well, I tried setMiniwindowImage and it apparently does nothing - and the documentation says it works for "collapsed miniwindows", whatever those are :-), but not for dock tiles.

You need to set a default, which you can do in the context of your app by registering it at startup. From the AppKit release notes:

There is a user default, AppleDockIconEnabled, to enable setting the image in a minimized window tile with -[NSWindow setMiniwindowImage:]. The image will be scaled as necessary to fit the tile. This behavior is off by default, so you must set AppleDockIconEnabled to YES if you want to enable this behavior.

Ali, thanks and my apologies... I found your previous response (last month) to this same question only today.

However.

Drawing the window's image into a bitmap and then calling -[NSWindow setMiniwindowImage:] seems such a roundabout way to do this. After all, I just want to update my window's dock icon every couple of seconds when (for instance) a progress bar changes - not some arbitrary image, just the real window's contents!

OK, so I set AppleDockIconEnabled to YES. Then... someone suggested calling UpdateCollapsedWindowDockTile. So I went ahead and, into my NSWindow subclass, put:
if ([self isMiniaturized]) {
[self display];
UpdateCollapsedWindowDockTile([self windowRef]);
}
and... no effect at all. [self update] and [self flushWindow] also don't work.

It seems that Cocoa disables updating minimized windows somehow...

--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"Originality is the art of concealing your sources."
http://www.brockerhoff.net/ (updated Oct. 2001)


References: 
 >Re: Context menu for minimised window (From: Ali Ozer <email@hidden>)

  • Prev by Date: Re: Blocking the net
  • Next by Date: Re: Blocking the net
  • Previous by thread: Re: Context menu for minimised window
  • Next by thread: How do I ...
  • Index(es):
    • Date
    • Thread