Re: [xmonad] Reset layout to default on last window close

On Tue, Feb 28, 2012 at 18:45, Nathaniel Filardo
On Tue, Feb 28, 2012 at 3:18 PM, Brandon Allbery
wrote: [snip]
handleEventHook DestroyWindowEvent {} = n <- (length . index) `fmap` withWindowSet guard (n == 1) $ sendMessage $ JumpToLayout "name of initial layout here" return (All True)
Unless I am terribly mistaken, won't that send a message to the focused workspace if it has one window on it, rather than the (I assume intended) workspace where the closing window was located?
True. You'd have to do a bit more work to find the correct workspace if that's not the case. But there's a nasty stinger in that tail: if you send a message to a workspace that is not current, the message won'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's not the current workspace, you lose anyway. There's no way to make it work. And no, you can't approach it from the other direction, either; a different version of the same problem gets in the way. :/ (I recently filed a bug about the design issue that causes this. It won't be easily fixed.) -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
participants (1)
-
Brandon Allbery