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
Restack refactoring #2961
Merged
Merged
Restack refactoring #2961
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
Aim is to clean up restacking logic and remove some duplicated code
Restacking algorithms now only need to provide the sibling window and stacking mode.
For now this is the same as the generic one
Positions the bar window above the _NET_SUPPORTING_WM_CHECK window The generic restacking strategy now first tries the ewmh strategy, the the bottom strategy.
Codecov Report
@@ Coverage Diff @@
## master #2961 +/- ##
==========================================
- Coverage 12.88% 12.71% -0.18%
==========================================
Files 162 160 -2
Lines 12049 12512 +463
==========================================
+ Hits 1553 1591 +38
- Misses 10496 10921 +425
Flags with carried forward coverage won't be shown. Click here to find out more.
|
5 tasks
andro404-MC
reviewed
Jul 14, 2023
src/components/bar.cpp
Outdated
const unsigned int value_mask = XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE; | ||
const unsigned int value_list[2]{*children.begin(), XCB_STACK_MODE_BELOW}; | ||
m_connection.configure_window_checked(m_opts.x_data.window, value_mask, value_list); | ||
restack_util::restack_relative(m_connection, m_opts.x_data.window, *children.begin(), XCB_STACK_MODE_BELOW); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably the cause of #2972
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.
What type of PR is this? (check all applicable)
Description
Refactors the restacking algorithms and adds new ones.
The restacking algorithms now only have to provide the sibling window and stacking mode.
New strategies
ewmh
: Tries to put the bar window above the _NET_SUPPORTING_WM_CHECK windowbottom
: Puts the bar window at the bottom of the window stack (same as the old generic strategy)The generic strategy is now a best effort strategy which simply tries out other strategy until it finds a suitable one. Currently it first tries ewmh, then bottom.
Additionally, the
bspwm
strategy also first tries ewmh before falling back to searching for the dedicated root windows for each monitor.Related Issues & Documents
Fixes #2873
May also work for #2543
Documentation (check all applicable)
Add the new strategies as well as the changes to the strategy to the wiki.
Also mention that generic is best-effort, it may change in the future, and all its component strategies are available on their own.