[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Edge Wrapping



I implimented the setting default_edge_wrapping and seperated '-i'|'-e' from '-w'|'-b'. Since '-w' stands for "wrapping," I chose '-b' to stand for "bound." Let me know if there are better flag letters.

I am now parsing shift and focus with a single function, which parses args into a struct, HSMovement. This contains the direction, flags, and calling name. This is done in a for loop which assumes direction is specified last. Let me know if this argument order thing is inconsistent with how things were done/will be done.

The patch is attached.

Tylo

On Mon, Dec 10, 2012 at 4:59 PM, Tyler Thomas Hart <tylerthomashart _at_ gmail _dot_ com> wrote:
Hi!

I implimented [optional] edge wrapping (cyclical shifting and focusing). This means, when no neighbor is found, movement goes all the way to the direction opposite the DIRECTION argument.

This is currently used by specifying '-w' as the argument to shift and focus, assuming '-i' regardless of the setting. Hopefully, I intend to change the way shift and focus parse flags, and add a setting for always_wrap that way '-i'|'-e' & '-w'|'-nw??' can be used together. 

In order to do this, I added command focus_edge which behaves just like shift_edge. 

I also divided up frame_focus_command into two functions, frame_focus and frame_focus_command. Frame_focus_command simply parses input flags and checks settings, while frame_focus performs the action. Note, I did this also so that focus_edge NEVER recursively calls frame_focus with wrapping, so that infinite loops are ALWAYS avoided, regardless of flags or settings.

I did the same modifications to frame_focus_window_command, frame_focus_window and focus_edge.

Let me know if I missed anything. I'll impliment always_wrap setting and better flag parsing ASAP.

Thanks!
Tylo

Attachment: 0001-Add-support-for-edge-wrapping.-Add-command-focus_edg.patch
Description: Binary data