<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Mouse Placeholders for when Programs Lose Focus</title>
	<atom:link href="http://www.hostilefork.com/2007/11/25/lost-focus-placeholder/feed/" rel="self" type="application/rss+xml" />
	<link>http://hostilefork.com/2007/11/25/lost-focus-placeholder/</link>
	<description>a disgruntled developer taking a stand in the information multiverse</description>
	<pubDate>Sat, 04 Feb 2012 09:17:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Hostile Fork</title>
		<link>http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-640</link>
		<dc:creator>Hostile Fork</dc:creator>
		<pubDate>Sun, 24 Aug 2008 16:41:26 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-640</guid>
		<description>Hi Wayne, yes... you'd &lt;i&gt;think&lt;/i&gt; so.  :)  However, the evolution of browser apps is such that everyone keeps reinventing more-or-less the windows API on any system where it isn't explicitly disallowed.  You've probably seen the various "HTML desktops", and they're doing everything from "start" buttons to Z-ordered windows:

http://hostilefork.com/2007/11/06/workaround-firefox-scrollbar-bug-on-mac/

It's nearly inevitable that this kind of app will keep getting popular.  So it is good to realize that GUI programs need formal answers for all the various event orderings that come in (and not crash or misbehave).  This is just one example of such a situation, but I think my solution illustrates the kind of thinking that would really help avoid bugs or errant program states...</description>
		<content:encoded><![CDATA[<p>Hi Wayne, yes&#8230; you&#8217;d <i>think</i> so.  <img src='http://hostilefork.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  However, the evolution of browser apps is such that everyone keeps reinventing more-or-less the windows API on any system where it isn&#8217;t explicitly disallowed.  You&#8217;ve probably seen the various &#8220;HTML desktops&#8221;, and they&#8217;re doing everything from &#8220;start&#8221; buttons to Z-ordered windows:</p>
<p><a href="http://hostilefork.com/2007/11/06/workaround-firefox-scrollbar-bug-on-mac/" rel="nofollow" class="liinternal">http://hostilefork.com/2007/11/06/workaround-firefox-scrollbar-bug-on-mac/</a></p>
<p>It&#8217;s nearly inevitable that this kind of app will keep getting popular.  So it is good to realize that GUI programs need formal answers for all the various event orderings that come in (and not crash or misbehave).  This is just one example of such a situation, but I think my solution illustrates the kind of thinking that would really help avoid bugs or errant program states&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wayne</title>
		<link>http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-634</link>
		<dc:creator>Wayne</dc:creator>
		<pubDate>Sun, 24 Aug 2008 06:16:52 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-634</guid>
		<description>Fortunately, for web development, we don't have to worry about such nuances.  From the browser's point of view you don't need to be aware of the position and layering of other windows, unlike windows programming.

Programming Language Share and Review:
&lt;a href='http://www.codesplunk.com' rel="nofollow"&gt;http://www.codesplunk.com&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Fortunately, for web development, we don&#8217;t have to worry about such nuances.  From the browser&#8217;s point of view you don&#8217;t need to be aware of the position and layering of other windows, unlike windows programming.</p>
<p>Programming Language Share and Review:<br />
<a href="http://www.codesplunk.com" rel="nofollow" target="_blank" class="liexternal">http://www.codesplunk.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nekta</title>
		<link>http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-51</link>
		<dc:creator>nekta</dc:creator>
		<pubDate>Sun, 16 Dec 2007 09:16:02 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-51</guid>
		<description>great ideas!</description>
		<content:encoded><![CDATA[<p>great ideas!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: imadoofus123</title>
		<link>http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-35</link>
		<dc:creator>imadoofus123</dc:creator>
		<pubDate>Sun, 09 Dec 2007 18:55:52 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-35</guid>
		<description>good idea for things like drawing programs but not so good for everything else. otherwise this could be added in by the window manager and programs wouldn't have to do anything.

(Note: This comment auto-syndicated from &lt;a href="http://www.stumbleupon.com/url/hostilefork.com/2007/11/25/lost-focus-placeholder/" rel="nofollow"&gt;StumbleUpon&lt;/a&gt;)</description>
		<content:encoded><![CDATA[<p>good idea for things like drawing programs but not so good for everything else. otherwise this could be added in by the window manager and programs wouldn&#8217;t have to do anything.</p>
<p>(Note: This comment auto-syndicated from <a href="http://www.stumbleupon.com/url/hostilefork.com/2007/11/25/lost-focus-placeholder/" rel="nofollow" target="_blank" class="liexternal">StumbleUpon</a>)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jim</title>
		<link>http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-34</link>
		<dc:creator>jim</dc:creator>
		<pubDate>Sun, 09 Dec 2007 14:04:46 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-34</guid>
		<description>excellent article and excellent replies.</description>
		<content:encoded><![CDATA[<p>excellent article and excellent replies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hostilefork</title>
		<link>http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-33</link>
		<dc:creator>hostilefork</dc:creator>
		<pubDate>Sat, 08 Dec 2007 20:15:20 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-33</guid>
		<description>pete-- you are quite right to say that the worse case and where this really becomes important are when other apps steal the focus without user initiation.  Unfortunately that is hard to choreograph when producing a video like this one, it was just easier to hit alt-tab.  Whether you think suspending your own operation is an interesting example or not, a behavior has to be &lt;i&gt;defined&lt;/i&gt; for that case...and as I point out I don't think committing or throwing away are good answers.  So it's not an *entirely* frivolous case, even if it's not the most important one.  Same code either way.

The real truth of the matter with this feature (and how I came up with the idea) is that it sort of "fell out" of a design which I had created for other good reasons.  If you check out my post on undo/redo tied to a single operation you'll get an idea of what those "synergistic" motivations are.  I already had to create an object that holds state for a mouse operation in progress until the button is released, and the moment of release is when the object is finally given the necessary privileges to edit the document and add items to the undo/redo queue.  That mouse object is really what makes this an easy feature to implement:

&lt;a href="http://hostilefork.com/2007/11/25/undo-single-user-event/" rel="nofollow"&gt;http://hostilefork.com/2007/11/25/undo-single-user-event/&lt;/a&gt;

In terms of OS support for stopping focus stealing: Windows did add an interesting feature, which was to "flash" the task bar icon rather than allow the focus to be stolen, but it seems to only work in a few situations.  Some of the remaining offenders are message boxes coming from OLE DLLs or other random pieces of the OS or its extensions. :(  I agree that it would be ideal if there was no API giving apps the power to jump to the front of the screen without user initiation, but it's kind of a fact of life, until we can edit the code for the shell.</description>
		<content:encoded><![CDATA[<p>pete&#8211; you are quite right to say that the worse case and where this really becomes important are when other apps steal the focus without user initiation.  Unfortunately that is hard to choreograph when producing a video like this one, it was just easier to hit alt-tab.  Whether you think suspending your own operation is an interesting example or not, a behavior has to be <i>defined</i> for that case&#8230;and as I point out I don&#8217;t think committing or throwing away are good answers.  So it&#8217;s not an *entirely* frivolous case, even if it&#8217;s not the most important one.  Same code either way.</p>
<p>The real truth of the matter with this feature (and how I came up with the idea) is that it sort of &#8220;fell out&#8221; of a design which I had created for other good reasons.  If you check out my post on undo/redo tied to a single operation you&#8217;ll get an idea of what those &#8220;synergistic&#8221; motivations are.  I already had to create an object that holds state for a mouse operation in progress until the button is released, and the moment of release is when the object is finally given the necessary privileges to edit the document and add items to the undo/redo queue.  That mouse object is really what makes this an easy feature to implement:</p>
<p><a href="http://hostilefork.com/2007/11/25/undo-single-user-event/" rel="nofollow" class="liinternal">http://hostilefork.com/2007/11/25/undo-single-user-event/</a></p>
<p>In terms of OS support for stopping focus stealing: Windows did add an interesting feature, which was to &#8220;flash&#8221; the task bar icon rather than allow the focus to be stolen, but it seems to only work in a few situations.  Some of the remaining offenders are message boxes coming from OLE DLLs or other random pieces of the OS or its extensions. <img src='http://hostilefork.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  I agree that it would be ideal if there was no API giving apps the power to jump to the front of the screen without user initiation, but it&#8217;s kind of a fact of life, until we can edit the code for the shell.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pete</title>
		<link>http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-32</link>
		<dc:creator>pete</dc:creator>
		<pubDate>Sat, 08 Dec 2007 19:55:19 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-32</guid>
		<description>I can see how this technique allows recovery after focus is lost, and you explain the solution very well, but I think your example is not very good. If I hit alt-tab, and I know what that will do, then I know it will cause me to lose focus, so I don't do it until I don't need focus. Alt-tab is actually an activity I focus on, so it's not part of the problem. The real problem is egotistical background applications which jerk themselves to the front and STEAL my focus. In these cases, the truly annoying data and time loss occurs IN MY HEAD, and there's nothing software can do about that. Rather than complicate mousing code, I would savagely punish programmers who steal focus. On prime-time major network television. With a large studio audience. Every night. And I get to throw the switch. (I might share it with you occasionally if you ask nicely.)</description>
		<content:encoded><![CDATA[<p>I can see how this technique allows recovery after focus is lost, and you explain the solution very well, but I think your example is not very good. If I hit alt-tab, and I know what that will do, then I know it will cause me to lose focus, so I don&#8217;t do it until I don&#8217;t need focus. Alt-tab is actually an activity I focus on, so it&#8217;s not part of the problem. The real problem is egotistical background applications which jerk themselves to the front and STEAL my focus. In these cases, the truly annoying data and time loss occurs IN MY HEAD, and there&#8217;s nothing software can do about that. Rather than complicate mousing code, I would savagely punish programmers who steal focus. On prime-time major network television. With a large studio audience. Every night. And I get to throw the switch. (I might share it with you occasionally if you ask nicely.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ted Young</title>
		<link>http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-31</link>
		<dc:creator>Ted Young</dc:creator>
		<pubDate>Sat, 08 Dec 2007 18:10:10 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-31</guid>
		<description>This is a unique idea, I like the thought that went into it. I'm going to see if I can implement it in Java+Swing and see how it "feels". I'm hoping that it's helpful and not annoying like the "move cursor to default button on dialog" options that Windows, et al, have.</description>
		<content:encoded><![CDATA[<p>This is a unique idea, I like the thought that went into it. I&#8217;m going to see if I can implement it in Java+Swing and see how it &#8220;feels&#8221;. I&#8217;m hoping that it&#8217;s helpful and not annoying like the &#8220;move cursor to default button on dialog&#8221; options that Windows, et al, have.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trill42</title>
		<link>http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-30</link>
		<dc:creator>Trill42</dc:creator>
		<pubDate>Fri, 07 Dec 2007 20:00:22 +0000</pubDate>
		<guid isPermaLink="false">http://hostilefork.com/2007/11/25/lost-focus-placeholder/#comment-30</guid>
		<description>That is very cool, and very well explained, both in the video and in the post. I've never seen this before, and it's such a useful feature.</description>
		<content:encoded><![CDATA[<p>That is very cool, and very well explained, both in the video and in the post. I&#8217;ve never seen this before, and it&#8217;s such a useful feature.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

