[patch] Added focusMaster to BoringWindows

Hey! This is a little patch to add 'focusMaster' to BoringWindows. If used instead of the normal StackSet.focusMaster it will focus the master window unless it's 'boring' in which case the next non-boring window will be focused. While working on the patch, I noticed that the core provides focusUp' and focusDown' that work on a Stack rather than an entire StackSet, but there is no focusMaster' which would do the same thing. As I needed something like that for the modification, I added it to the core. The patch for this is also attached. But I can also do it without touching the core, if something speaks against that. Regards! Jan

On Sat, Oct 03, 2009 at 06:21:39PM +0200, Jan Vornberger wrote:
While working on the patch, I noticed that the core provides focusUp' and focusDown' that work on a Stack rather than an entire StackSet, but there is no focusMaster' which would do the same thing. As I needed something like that for the modification, I added it to the core. The patch for this is also attached. But I can also do it without touching the core, if something speaks against that.
So would it be preferred if I didn't touch the core for this and instead just include a definition of focusMaster' directly where I need it? Cheers! Jan

* On Wednesday, October 14 2009, Jan Vornberger wrote:
On Sat, Oct 03, 2009 at 06:21:39PM +0200, Jan Vornberger wrote:
While working on the patch, I noticed that the core provides focusUp' and focusDown' that work on a Stack rather than an entire StackSet, but there is no focusMaster' which would do the same thing. As I needed something like that for the modification, I added it to the core. The patch for this is also attached. But I can also do it without touching the core, if something speaks against that.
So would it be preferred if I didn't touch the core for this and instead just include a definition of focusMaster' directly where I need it?
Cheers!
Jan
In the meantime we could collect some of those missing extras from XMonad.StackSet in some other contrib module: that way we are still reducing code duplication, and there will be a stronger case for moving those functions into core once more of contrib uses those functions. -- Adam

On Tue, Oct 13, 2009 at 10:24:46PM -0400, Adam Vogt wrote:
In the meantime we could collect some of those missing extras from XMonad.StackSet in some other contrib module: that way we are still reducing code duplication, and there will be a stronger case for moving those functions into core once more of contrib uses those functions.
Ok, sounds like a good idea. Then for now I have prepared a version of the patch that requires no change to the core (see attachment). It can then later be refactored along with other contrib modules once the functions are in the core. Regards, Jan

* On Friday, October 16 2009, Jan Vornberger wrote:
On Tue, Oct 13, 2009 at 10:24:46PM -0400, Adam Vogt wrote:
In the meantime we could collect some of those missing extras from XMonad.StackSet in some other contrib module: that way we are still reducing code duplication, and there will be a stronger case for moving those functions into core once more of contrib uses those functions.
Ok, sounds like a good idea. Then for now I have prepared a version of the patch that requires no change to the core (see attachment). It can then later be refactored along with other contrib modules once the functions are in the core.
Regards,
Jan
Applied, thanks.
participants (2)
-
Adam Vogt
-
Jan Vornberger