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

Update to Original Picom #3

Merged
merged 741 commits into from
May 18, 2024
Merged

Update to Original Picom #3

merged 741 commits into from
May 18, 2024

Conversation

pijulius
Copy link
Owner

No description provided.

yshui added 30 commits February 16, 2024 15:50
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>
This is just the beginning, c2_match still needs session_t, everything
is just so tangled...

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Instead of printing directly to stdout, put the result into a string.
It's more flexible this way.

Also fixed special characters not being properly escaped.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Some lines got put at wrong location because of a merge conflict.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
It's confusing to me what I should put as format, and the rule might or
might not work if I used the wrong format. In theory this can be used to
write condition that's only true when the specified property has a given
format, in reality I don't think anyone is doing that.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Make sure a property is not used both as a number and as a string. This
only apply to actual strings, atoms can be used as either a number or a
string.

Right now only a warning is printed, offending rules might or might not
work properly. But in the future these rules WILL be disabled and do
nothing.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
A property might be matched against both on the frame and on the client
window, so they must have separate entries in window state.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Add fix some simple bugs discovered by the fuzzer. Two cases of missing
input validation (we have assertions, but assertion failures are not
user friendly). And one case of jump over variable initialization with
goto.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
The window flags are used for delaying updates until we have grabbed the
X server. This is to make sure our internal states are in sync with the
server's state, to avoid race conditions.

Since shadow state is purely internal to picom, there is no need for
delaying its update, and thus these flags can be removed.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Also we, by which I mean me, might have been using HASH_ADD_STR wrong...

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
I thought `cvalloc` wraps `calloc`, but it's `malloc`...

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Same as assert(), but is enabled in release build.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Same logic as the format specifiers, we just use what the X server
reports, asking the user for the type is just going to be confusing.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
It should abort if the expr is true, but is doing the other way around

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Split string and integer cases into 2 separate functions.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Store properties used in c2 conditions in the window state, so we don't
need to re-query them every time we evaluate the rules. First step to
remove the dependency on X connection from c2_match.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
And removing the session_t parameter from c2_match.

As a side-effect, rules with mismatched types will stop working from this
commit onward. As was warned about in a previous commit.

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>
yshui added 29 commits May 4, 2024 20:57
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>
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>
Deprecated in v2, and we added a better alternative to it.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
These are removed long before our time, I don't even know what they are.
We have been rejecting them with an error message for a while too, it's
time to just remove them.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
config: remove some really old options
The main objective is to remove the need to worry about option value
assignment. Because of the way getopt works, we need to assign a number
to each option, and later match the return value of getopt in a big
switch. We have to make sure to not assign the same number to two
options, and we have to carefully make sure the same number is used in
two different places (once in the options table, once in the switch).
And that is just annoying.

With this commit everything is in one place, and the compiler will yell
at us if we assigned duplicated numbers.

Maybe this can also be a stepping stone for unifying command line
options parsing and config file parsing.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
options: refactor option parsing
It has been irking me greatly for a while that we have two structs that
are basically the same thing. Let's unify them into a vec2 type.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
The new renderer has access to layer opacity, so it doesn't need
win_calc_mode to take that into consideration.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Prepare for making shadow opacity animatable. Also fix the fact that
shadows aren't been rendered with the correct opacity currently.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
sr.ht CI broke.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
When trying to add source image transformation (e.g. scaling), I
realized it's ambiguous whether the mask should be applied before or
after the transformation. And after further thought, I decided it would
be better to have two separate masks, one for the source, which would be
in the source's coordinate system (i.e. before any transformation); and
one for the target.

And due to how we currently use the mask, I made the source mask an image,
and the target mask a region. Nothing is stopping us from making both a
combination of an image and a region, but we won't be using that
capability anyway.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
backend: decompose mask into source and target mask
Fixes: 43de276
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Add some const qualifiers to backend arguments that shouldn't be
modified.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Fixes #625

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
@pijulius pijulius merged commit ba8d120 into pijulius:next May 18, 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.

4 participants