-
-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix render order of LayoutHints and MultiColumns #186
Merged
pjones
merged 1 commit into
xmonad:master
from
ankaan:multicolumns-layouthints-windoworderfix
May 24, 2017
Merged
Fix render order of LayoutHints and MultiColumns #186
pjones
merged 1 commit into
xmonad:master
from
ankaan:multicolumns-layouthints-windoworderfix
May 24, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before this fix, when using layoutHintsToCenter together with MultiColumns, in certain situations XMonad would render the border of the focused window below a border of unfocused windows. This looks odd and is here fixed by changing MultiColumns to always place the focused window in front (even though they should not really overlap) and making LayoutHints preserve the order returned from the underlying layout, except for the focused window that is placed on top. This is a good idea since layoutHintsToCenter requires the focused window to be on top for good rendering, even if that is not really required when the underlying layout is used on its own. This way layoutHintsToCenter requires less of the layout that is modified and MultiColumns is more compatible with future layout modifiers that are not so considerate.
Thanks! |
ankaan
added a commit
to ankaan/xmonad-contrib
that referenced
this pull request
Jun 10, 2017
This is an improvement on the pull request "Fix render order of LayoutHints and MultiColumns" (xmonad#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 was a special case in the code for this that was not handled properly. This change removes this special case and only shrinks at most in one direction on each axis. This is desirable since it gives us a better probability that the space will actually be used by another window, but is basically unnoticable by the user. It also reduced the complexity slightly while adding code to actually handle the case would have increased the complexity. 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.
ankaan
added a commit
to ankaan/xmonad-contrib
that referenced
this pull request
Jun 10, 2017
This is an improvement on the pull request "Fix render order of LayoutHints and MultiColumns" (xmonad#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 was a special case in the code for this that was not handled properly. This change removes this special case and only shrinks at most in one direction on each axis. This is desirable since it gives us a better probability that the space will actually be used by another window, but is basically unnoticeable by the user. It also reduced the complexity slightly while adding code to actually handle the case would have increased the complexity. 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.
3 tasks
ankaan
added a commit
to ankaan/xmonad-contrib
that referenced
this pull request
Jun 11, 2017
This is an improvement on the pull request "Fix render order of LayoutHints and MultiColumns" (xmonad#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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Before this fix, when using layoutHintsToCenter together with
MultiColumns, in certain situations XMonad would render the border of
the focused window below a border of unfocused windows. This looks odd
and is here fixed by changing MultiColumns to always place the focused
window in front (even though they should not really overlap) and making
LayoutHints preserve the order returned from the underlying layout,
except for the focused window that is placed on top.
This is a good idea since layoutHintsToCenter requires the focused
window to be on top for good rendering, even if that is not really
required when the underlying layout is used on its own. This way
layoutHintsToCenter requires less of the layout that is modified and
MultiColumns is more compatible with future layout modifiers that are
not so considerate.
Checklist
I've read CONTRIBUTING.md
I tested my changes with xmonad-testing
I updated the
CHANGES.md
file