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
More gravity-related changes #2363
Conversation
Before this commit, the code in here first handled clients changing its x/y position and afterwards it handled resizes. This meant that the special case of "client resizes without moving itself so we need to apply gravity" had to have special checks on whether the client moved itself or not. Change the code so that resizes are handled first and moves later. This naturally handles the problem: If the client resizes and moves itself, the move done for the resize is later overwritten when the move is handled. No functional changes are intended. Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
The function window_set_border_width() causes its own gravity handling. Thus, to make sure that this gravity handling does not interfere with what the code in here does later, we just apply changes to the border width first, and then do everything else. Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
c->size_hints.win_gravity only contains something valid if the XCB_ICCCM_SIZE_HINT_P_WIN_GRAVITY bit is set in the flags. Most likely this wasn't noticed before, because most code just happens to zero-initialize this field and gravity 0 is NorthWest, which does not do anything. Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
Codecov Report
@@ Coverage Diff @@
## master #2363 +/- ##
==========================================
+ Coverage 84.03% 84.11% +0.08%
==========================================
Files 477 478 +1
Lines 32671 34448 +1777
==========================================
+ Hits 27454 28976 +1522
- Misses 5217 5472 +255
|
@psychon Is this ready to merge now or do you plan to do the "other half" of the gravity issues you mentioned in the first comment along with merging this? |
I tried fixing those bugs a couple of times already and never got anywhere... :-( |
Still none of the bugs reported by @sigprof are fixed, but here are some more gravity-related changes that hopefully simplify the code (and an unrelated bugfix is in here as well).