<div dir="ltr">On Tue, Feb 28, 2012 at 18:45, Nathaniel Filardo <span dir="ltr">&lt;<a href="mailto:nwfilardo@gmail.com">nwfilardo@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Tue, Feb 28, 2012 at 3:18 PM, Brandon Allbery &lt;<a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a>&gt; wrote:<br>
&gt;[snip]<br>
<div class="im">&gt;&gt; handleEventHook DestroyWindowEvent {} =<br>
&gt;&gt;   n &lt;- (length . index) `fmap` withWindowSet<br>
&gt;&gt;   guard (n == 1) $ sendMessage $ JumpToLayout &quot;name of initial layout here&quot;<br>
&gt;&gt;   return (All True)<br>
<br>
</div>Unless I am terribly mistaken, won&#39;t that send a message to the focused<br>
workspace if it has one window on it, rather than the (I assume intended)<br>
workspace where the closing window was located?<br></blockquote><div><br>True.  You&#39;d have to do a bit more work to find the correct workspace if that&#39;s not the case.  But there&#39;s a nasty stinger in that tail:  if you send a message to a workspace that is not current, the message won&#39;t actually be sent because workspace operations require access to the display, which can only be granted if the workspace is current.  So if it&#39;s not the current workspace, you lose anyway.  There&#39;s no way to make it work.<br>
<br>And no, you can&#39;t approach it from the other direction, either; a different version of the same problem gets in the way.  :/<br><br>(I recently filed a bug about the design issue that causes this.  It won&#39;t be easily fixed.) <br>
</div></div><br>-- <br>brandon s allbery                                      <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>wandering unix systems administrator (available)     (412) 475-9364 vm/sms<br>
<br>
</div>