Skip to content
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

NO WINDOW LEFT BEHIND #1273

Merged
merged 5 commits into from
Jun 21, 2024
Merged

NO WINDOW LEFT BEHIND #1273

merged 5 commits into from
Jun 21, 2024

Conversation

yshui
Copy link
Owner

@yshui yshui commented Jun 6, 2024

Track the entire window tree. Fix window rules for WMs like i3, KDE.

@yshui yshui force-pushed the wm-tree branch 3 times, most recently from cafa424 to 13ba96f Compare June 6, 2024 13:01
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 70.32058% with 287 lines in your changes missing coverage. Please review.

Project coverage is 51.68%. Comparing base (88c8ba8) to head (d0ee47f).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1273      +/-   ##
==========================================
+ Coverage   51.55%   51.68%   +0.12%     
==========================================
  Files          62       64       +2     
  Lines       13347    13567     +220     
==========================================
+ Hits         6881     7012     +131     
- Misses       6466     6555      +89     
Files Coverage Δ
src/c2.h 100.00% <ø> (ø)
src/opengl.h 55.55% <ø> (ø)
src/renderer/command_builder.c 79.16% <ø> (ø)
src/renderer/damage.c 90.17% <ø> (+0.40%) ⬆️
src/renderer/layout.c 97.87% <100.00%> (-0.03%) ⬇️
src/renderer/renderer.c 60.41% <100.00%> (ø)
src/utils/dynarr.h 100.00% <ø> (ø)
src/utils/misc.h 45.65% <ø> (ø)
src/wm/win.h 100.00% <100.00%> (+2.38%) ⬆️
src/wm/wm.h 100.00% <100.00%> (+100.00%) ⬆️
... and 11 more

... and 2 files with indirect coverage changes

@yshui yshui force-pushed the wm-tree branch 6 times, most recently from fb1bef7 to e870fda Compare June 13, 2024 07:25
@yshui
Copy link
Owner Author

yshui commented Jun 13, 2024

Update: kind of redesigned how windows are imported into the tree. The inherent racy-ness of X11 protocol really fucked this over. (don't know if you can tell, but I am not happy with this code).

This comment goes into a bit more detail about what's going on.

@yshui yshui force-pushed the wm-tree branch 6 times, most recently from 6b39b1c to afb7b8d Compare June 20, 2024 06:26
@yshui yshui force-pushed the wm-tree branch 2 times, most recently from 5e44044 to bd9bb8e Compare June 21, 2024 07:41
To let it process some events to validate that it is working. The output
of wm_tree is not yet used besides debugging logs.

Note because we don't quite setup event subscription the way wm_tree
expects, there will be some errors logged, which is normal.

Signed-off-by: Yuxuan Shui <[email protected]>
Because wm_tree tracks the entire window tree, it's able to replace
several old data structures we used to track windows: the window hash
table, the window stack, and the subwin table. So we got rid of those,
and fully switched to wm_tree.

Fixes window rules for window managers that don't put client window
directly under toplevel windows. This includes, according to people's
reports, at least i3 and KDE.

Fixed a couple small bugs:

* dbus was returning window ID as a boolean.
* window frame extents not cleared after its client window disappears.

Signed-off-by: Yuxuan Shui <[email protected]>
@yshui
Copy link
Owner Author

yshui commented Jun 21, 2024

Fixed a use after free, when an incomplete import is deleted before we can completely import it.

@yshui yshui merged commit 6fc23c3 into next Jun 21, 2024
18 checks passed
@yshui yshui deleted the wm-tree branch June 21, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant