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

Universal window rules #1297

Merged
merged 19 commits into from
Aug 3, 2024
Merged

Universal window rules #1297

merged 19 commits into from
Aug 3, 2024

Conversation

yshui
Copy link
Owner

@yshui yshui commented Jul 30, 2024

See #1284

@yshui yshui force-pushed the universal-rules branch 3 times, most recently from 84065fc to f3bd17e Compare July 30, 2024 19:51
Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 60.21898% with 218 lines in your changes missing coverage. Please review.

Please upload report for BASE (next@797e60f). Learn more about missing BASE report.

Files Patch % Lines
src/config_libconfig.c 56.41% 51 Missing ⚠️
src/wm/win.c 77.40% 40 Missing ⚠️
src/dbus.c 0.00% 33 Missing ⚠️
src/render.c 0.00% 27 Missing ⚠️
src/options.c 17.85% 23 Missing ⚠️
src/wm/wm.c 66.66% 17 Missing ⚠️
src/c2.c 55.17% 13 Missing ⚠️
src/event.c 28.57% 5 Missing ⚠️
src/config.h 50.00% 2 Missing ⚠️
src/picom.c 92.85% 2 Missing ⚠️
... and 4 more
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             next    #1297   +/-   ##
=======================================
  Coverage        ?   52.43%           
=======================================
  Files           ?       64           
  Lines           ?    14005           
  Branches        ?        0           
=======================================
  Hits            ?     7344           
  Misses          ?     6661           
  Partials        ?        0           
Files Coverage Δ
src/c2.h 100.00% <ø> (ø)
src/common.h 44.82% <ø> (ø)
src/config.c 50.16% <ø> (ø)
src/renderer/layout.c 98.61% <100.00%> (ø)
src/renderer/renderer.c 60.06% <100.00%> (ø)
src/wm/tree.c 90.43% <100.00%> (ø)
src/wm/wm.h 100.00% <ø> (ø)
src/wm/wm_internal.h 100.00% <ø> (ø)
src/x.c 54.95% <100.00%> (ø)
src/x.h 77.77% <ø> (ø)
... and 14 more

@yshui yshui force-pushed the universal-rules branch 16 times, most recently from 053913f to 3d62eba Compare August 2, 2024 16:32
man/picom.1.adoc Outdated Show resolved Hide resolved
man/picom.1.adoc Outdated Show resolved Hide resolved
man/picom.1.adoc Show resolved Hide resolved
man/picom.1.adoc Outdated Show resolved Hide resolved
@absolutelynothelix
Copy link
Collaborator

maybe it's a good idea to rewrite the sample config to use the rules option instead of all the old options

@yshui yshui force-pushed the universal-rules branch 3 times, most recently from 736db11 to fe72b79 Compare August 2, 2024 19:39
It's easier to just store them together, since the same group of
information is needed for parsed window rules, and for window rendering.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Opacity was calculated once per mapped window per frame in
`win_process_animation_and_state_change`. This is fine because
calucating it is cheap. However with upcoming changes it might become
more expensive.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
It's only used as an intermediate value for calculating other window
options, and is not used outside `win_on_factor_changed`, so there is no
reason to save it.

This also removes the "focused_force" option from the dbus interface,
which I believe nobody is using anyways.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Instead of just a yes or no. Allow for more flexibility when universal
rules are implemented.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
From the user's perspective they are just random, meaningless numbers.
Doesn't really make sense to write rule against them.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
yshui and others added 14 commits August 3, 2024 04:35
Instead of recalculate every window's leader each time one of the
window's leader changed, aggregate all the changes and update all
the leaders in one go.

And now all the calculations are in one place too (wm/wm.c).

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This matches when the focused window is in the same window group as the
window being matched.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Design is described in #1284.

Added a trivial test of universal rules

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
To replace wintypes::redir_ignore as well as
unredir-if-possible-exclude.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This includes updating the changelog.

Closes #1284

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Co-authored-by: Maxim Solovyov <msolovyov@protonmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
When implementing animation, which also replaced the old fading code,
the per-window fading option was accidentally broken.

This commit brings it back.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Removed old options that are no long relevant (though not deprecated).

Converted all old rules to the new `rules` option.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
@yshui yshui merged commit d072336 into next Aug 3, 2024
20 checks passed
@yshui yshui deleted the universal-rules branch August 3, 2024 23:10
@0neGal 0neGal mentioned this pull request Aug 24, 2024
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.

2 participants