<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-371408380585915800.post8671638332633095230..comments</id><updated>2011-10-17T14:40:29.237-07:00</updated><category term='C++'/><category term='self promotion'/><category term='code management'/><category term='Lion'/><category term='UIKit'/><category term='CoreAudio'/><category term='Cocoa Touch'/><category term='Xcode'/><category term='fun hacks'/><category term='CoreGraphics'/><category term='Objective-C'/><category term='Standard C'/><category term='graphics'/><category term='performance tests'/><category term='Core Data'/><category term='Foundation'/><category term='object-oriented design'/><category term='testing'/><category term='numerical methods'/><category term='WebKit'/><category term='CoreAnimation'/><category term='Snow Leopard'/><category term='AppKit'/><title type='text'>Comments on Cocoa with Love: Drawing a custom window on Mac OS X</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cocoawithlove.com/feeds/8671638332633095230/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/371408380585915800/8671638332633095230/comments/default'/><link rel='alternate' type='text/html' href='http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html'/><author><name>Matt Gallagher</name><uri>http://www.blogger.com/profile/12617910364694969282</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-371408380585915800.post-421159540534264409</id><published>2011-10-17T14:40:29.238-07:00</published><updated>2011-10-17T14:40:29.238-07:00</updated><title type='text'>Is it possible to make the content match the frame...</title><content type='html'>Is it possible to make the content match the frame shape?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/371408380585915800/8671638332633095230/comments/default/421159540534264409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/371408380585915800/8671638332633095230/comments/default/421159540534264409'/><link rel='alternate' type='text/html' href='http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html?showComment=1318887629238#c421159540534264409' title=''/><author><name>Matt Gallagher</name><uri>http://www.blogger.com/profile/12617910364694969282</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html' ref='tag:blogger.com,1999:blog-371408380585915800.post-8671638332633095230' source='http://www.blogger.com/feeds/371408380585915800/posts/default/8671638332633095230' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-475684210'/></entry><entry><id>tag:blogger.com,1999:blog-371408380585915800.post-3713264564632307343</id><published>2011-08-24T23:36:22.962-07:00</published><updated>2011-08-24T23:36:22.962-07:00</updated><title type='text'>i&amp;#39;m also trying to figure that out..the soluti...</title><content type='html'>i&amp;#39;m also trying to figure that out..the solution with the highlighted doesn&amp;#39;t seem to solve the case where the window is not active.&lt;br /&gt;It would be great to get the solution.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/371408380585915800/8671638332633095230/comments/default/3713264564632307343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/371408380585915800/8671638332633095230/comments/default/3713264564632307343'/><link rel='alternate' type='text/html' href='http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html?showComment=1314254182962#c3713264564632307343' title=''/><author><name>Matt Gallagher</name><uri>http://www.blogger.com/profile/12617910364694969282</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html' ref='tag:blogger.com,1999:blog-371408380585915800.post-8671638332633095230' source='http://www.blogger.com/feeds/371408380585915800/posts/default/8671638332633095230' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-475684210'/></entry><entry><id>tag:blogger.com,1999:blog-371408380585915800.post-2669205230101417505</id><published>2010-07-26T17:12:07.000-07:00</published><updated>2010-07-26T17:12:07.000-07:00</updated><title type='text'>By default, the RoundWindow class won&amp;#39;t handle...</title><content type='html'>By default, the RoundWindow class won&amp;#39;t handle Cmd-W to close the window. Putting a close button in the frame is not enough to convince the default implementation that it can handle the menu item.&lt;br /&gt;&lt;br /&gt;To work around this, add these two methods:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- (BOOL)validateMenuItem:(NSMenuItem *)menuItem&lt;br /&gt;{&lt;br /&gt; BOOL result;&lt;br /&gt; &lt;br /&gt; // NOTE: NSWindow&amp;#39;s implementation will return NO even when there&amp;#39;s an implementation of -performClose: -- probably&lt;br /&gt; // because it&amp;#39;s checking for a close button (and there isn&amp;#39;t one for a borderless window.) We know better.&lt;br /&gt; &lt;br /&gt; if ([menuItem action] == @selector(performClose:)) {&lt;br /&gt;  result = [self respondsToSelector:@selector(performClose:)];&lt;br /&gt; }&lt;br /&gt; else {&lt;br /&gt;  result = [super validateMenuItem:menuItem];&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; return result;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;- (void)performClose:(id)sender&lt;br /&gt;{&lt;br /&gt; DebugLog(@&amp;quot;%s called&amp;quot;, __PRETTY_FUNCTION__);&lt;br /&gt; &lt;br /&gt; // NOTE: according to the documentation for NSWindow&amp;#39;s -performClose: this should be the default implementation, but&lt;br /&gt; // without this code, the borderless window cannot be closed with Cmd-W. Oddly, clicking on the close button calls&lt;br /&gt; // the -windowShouldClose: delegate method (via the private -_close method) and the window closes correctly.&lt;br /&gt; &lt;br /&gt; BOOL performClose = YES;&lt;br /&gt; if ([self.delegate respondsToSelector:@selector(windowShouldClose:)]) {&lt;br /&gt;  performClose = [self.delegate windowShouldClose:sender];&lt;br /&gt; }&lt;br /&gt; if (performClose) {&lt;br /&gt;  [self close];&lt;br /&gt; }&lt;br /&gt;}</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/371408380585915800/8671638332633095230/comments/default/2669205230101417505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/371408380585915800/8671638332633095230/comments/default/2669205230101417505'/><link rel='alternate' type='text/html' href='http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html?showComment=1280189527000#c2669205230101417505' title=''/><author><name>Matt Gallagher</name><uri>http://www.blogger.com/profile/12617910364694969282</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html' ref='tag:blogger.com,1999:blog-371408380585915800.post-8671638332633095230' source='http://www.blogger.com/feeds/371408380585915800/posts/default/8671638332633095230' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-475684210'/></entry><entry><id>tag:blogger.com,1999:blog-371408380585915800.post-5553610017461579903</id><published>2010-06-23T13:00:16.000-07:00</published><updated>2010-06-23T13:00:16.000-07:00</updated><title type='text'>Is there any way to customize the window backgroun...</title><content type='html'>Is there any way to customize the window background shadow? It seems to me that the shadow on normal windows is much bigger than the one drawn by your code...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/371408380585915800/8671638332633095230/comments/default/5553610017461579903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/371408380585915800/8671638332633095230/comments/default/5553610017461579903'/><link rel='alternate' type='text/html' href='http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html?showComment=1277323216000#c5553610017461579903' title=''/><author><name>Matt Gallagher</name><uri>http://www.blogger.com/profile/12617910364694969282</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html' ref='tag:blogger.com,1999:blog-371408380585915800.post-8671638332633095230' source='http://www.blogger.com/feeds/371408380585915800/posts/default/8671638332633095230' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-475684210'/></entry></feed>
