xmonad-contrib icon indicating copy to clipboard operation
xmonad-contrib copied to clipboard

X.L.LayoutHints stop windows from overlapping

Open ankaan opened this issue 8 years ago • 3 comments

Description

This is an improvement on the pull request "Fix render order of LayoutHints and MultiColumns" (#186) and addresses the actual underlying problem.

It turned out that windows can sometimes overlap also. This happens when a window is exactly in the center along an axis. There is a special case in the code for this, but it was not handled properly.

I removed the code that places the focused window on top since it is no longer required, but I still preserve the window order of the underlying layout. This interferes even less with the underlying layout.

I also removed some code paths that were no longer necessary due to this change and generalized some types so that I could debug the code more easily.

Checklist

ankaan avatar Jun 10 '17 21:06 ankaan

@ankaan, thanks for your PR! By analyzing the history of the files in this pull request, we identified @pjones, @aavogt and @liskin to be potential reviewers.

mention-bot avatar Jun 10 '17 21:06 mention-bot

I realized that the special case that I initially removed actually made things more visually pleasing, so I added it back but made it work properly.

I also removed a comment that was wrong (and contradicted what is written right before it.)

ankaan avatar Jun 11 '17 09:06 ankaan

I do use LayoutHints but I don't use LayoutHintsToCenter so I'm probably unaffected, and it's been almost 10 years since I last touched this module, so I'm as qualified to review it as anyone else. Might be nice to add unit test for the problem being fixed, or something like that which will help potential reviewers to understand it.

liskin avatar Jan 29 '21 11:01 liskin