<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: How to tell if patcher window is active/inactive (front-most window or not)</title>
		<atom:link href="http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/feed</link>
		<description></description>
		<pubDate>Wed, 19 Jun 2013 13:29:40 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-63744</guid>
					<title><![CDATA[How to tell if patcher window is active/inactive (front-most window or not)]]></title>
					<link>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-63744</link>
					<pubDate>Thu, 26 Jul 2012 18:19:38 +0000</pubDate>
					<dc:creator>Luigi Castelli</dc:creator>

					<description>
						<![CDATA[
						<p>Hi folks,</p>
<p>I just finished coding an UI-object. The object in question has been instantiated in a patcher. Using Max callback methods or API functions, is there a way to tell when the patcher window becomes active (i.e. it is the front-most window and its title bar is highlighted), and when the patcher window becomes inactive? It would be useful as some of the graphics in my object might need to change in order to follow the patcher window state.</p>
<p>Thanks.</p>
<p>- Luigi</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229908</guid>
					<title><![CDATA[Re: How to tell if patcher window is active/inactive (front-most window or not)]]></title>
					<link>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229908</link>
					<pubDate>Thu, 26 Jul 2012 23:51:33 +0000</pubDate>
					<dc:creator>terenceformer</dc:creator>

					<description>
						<![CDATA[
						<p>there is an object that does just that: [active]</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229909</guid>
					<title><![CDATA[Re: How to tell if patcher window is active/inactive (front-most window or not)]]></title>
					<link>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229909</link>
					<pubDate>Fri, 27 Jul 2012 07:37:16 +0000</pubDate>
					<dc:creator>Luigi Castelli</dc:creator>

					<description>
						<![CDATA[
						<p>Yes, I know about [active].<br />
In my object I would like to use the same functions that [active] probably uses under the hood.<br />
Is it possible for 3rd party developers ?</p>
<p>- Luigi</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229910</guid>
					<title><![CDATA[Re: How to tell if patcher window is active/inactive (front-most window or not)]]></title>
					<link>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229910</link>
					<pubDate>Fri, 27 Jul 2012 11:25:20 +0000</pubDate>
					<dc:creator>terenceformer</dc:creator>

					<description>
						<![CDATA[
						<p>Ah, I am sorry, didn&#8217;t read your first two sentences carefully :S<br />
I mistakenly thought you were talking about creating a patch. But since you are developing your own object I&#8217;m afraid I&#8217;m of no help :(<br />
I must say, having seen your posts on the forum before, I was wondering how you could have not known about [active] already hehe.<br />
I hope a solution is posted, I am quite curious about this myself. Cheers!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229911</guid>
					<title><![CDATA[Re: How to tell if patcher window is active/inactive (front-most window or not)]]></title>
					<link>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229911</link>
					<pubDate>Fri, 27 Jul 2012 18:53:23 +0000</pubDate>
					<dc:creator>andrea agostini</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Luigi.</p>
<p>You&#8217;ve probably tried this already &#8211; but doesn&#8217;t the patcher send any notification when its state changes?</p>
<p>aa</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229912</guid>
					<title><![CDATA[Re: How to tell if patcher window is active/inactive (front-most window or not)]]></title>
					<link>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229912</link>
					<pubDate>Fri, 27 Jul 2012 20:00:56 +0000</pubDate>
					<dc:creator>Luigi Castelli</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Andrea,</p>
<p>nope, neither the patcher nor the patcherview send any notifications when the window&#8217;s focus is brought from background to foreground or viceversa. Thanks for the suggestion anyway&#8230;</p>
<p>- Luigi</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229913</guid>
					<title><![CDATA[Re: How to tell if patcher window is active/inactive (front-most window or not)]]></title>
					<link>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229913</link>
					<pubDate>Thu, 09 Aug 2012 17:48:17 +0000</pubDate>
					<dc:creator>Timothy Place</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Luigi,</p>
<p>You can attach to the Max object for notifications:</p>
<pre>err = object_attach_byptr((t_object *)x, _sym_max->s_thing);</pre><p>Then in your &#8216;notify&#8217; method you can do something like this:</p>
<pre>if (sender == _sym_max->s_thing &#038;&#038; name == _sym_activewindow) {
	t_object *w = object_attr_getobj(sender, _sym_activewindow);
	// w is the active window just like if you called
	// object_attr_getobj(_sym_max->s_thing, _sym_activewindow);
}</pre><p>Of course you need to remember to detach when your object is freed:</p>
<pre>object_detach_byptr(x, _sym_max->s_thing);</pre><p>HTH,<br />
  Tim</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229914</guid>
					<title><![CDATA[Re: How to tell if patcher window is active/inactive (front-most window or not)]]></title>
					<link>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229914</link>
					<pubDate>Thu, 09 Aug 2012 23:01:10 +0000</pubDate>
					<dc:creator>Luigi Castelli</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Tim,</p>
<p>ok, that notifies me and gives me a pointer to the active window, which is always good to know&#8230;<br />
However, how do I know that the window where my object is instantiated is the active/inactive one ?</p>
<p>- Luigi</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229915</guid>
					<title><![CDATA[Re: How to tell if patcher window is active/inactive (front-most window or not)]]></title>
					<link>http://cycling74.com/forums/topic/how-to-tell-if-patcher-window-is-activeinactive-front-most-window-or-not/#post-229915</link>
					<pubDate>Thu, 09 Aug 2012 23:54:12 +0000</pubDate>
					<dc:creator>Timothy Place</dc:creator>

					<description>
						<![CDATA[
						<p>Good question.  If you have a pointer to your patcherview then you should be able to do something like this:</p>
<pre>// 1. assume you have a t_patcherview *pv
t_object *w = NULL;
object_method(pv, gensym("getwind"), &#038;w);</pre><p>best,<br />
  Tim</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

