dccsillag / picom

A lightweight compositor for X11
Other
164 stars 20 forks source link

animation: add animation exclude #35

Open yaocccc opened 2 years ago

yaocccc commented 2 years ago

I hope some window not use animation, for example fcitx. so I make this pr

yaocccc commented 2 years ago

animation: add animation_opacity_min, for reduce flicker

yaocccc commented 2 years ago

Thank you for your contributions!

The blacklist code looks great.

The code for the minimum opacity looks good too, but I question its inclusion. ~Why do you think it is necessary/desirable? It seems to me that it is a workaround for #19, which isn't necessarily bad, but if that's the case, it does not tackle the root cause at all -- and that's bad.~ Sorry, I didn't properly read your last message. What do you mean by "flicker"? (The point about the root cause probably still stands, though.)

About flicker, I can show you gif. show

// Only animate opacity here if we are resizing
// a transparent window
process_window_for_painting(ps, w, w->win_image,
    w->opacity >= 1 ? 1.0 : w->animation_progress,
    &reg_bound, &reg_visible,
    &reg_paint, &reg_paint_in_bound);

// Only do this if size changes as otherwise moving 
// transparent windows will flicker and if you just
// move so slightly they will keep flickering
if (resizing) {
         process_window_for_painting(ps, w, w->old_win_image,
     1.0 - w->animation_progress,
     &reg_bound, &reg_visible,
    &reg_paint, &reg_paint_in_bound);
}

When window be moving slightly, animation_progress always loop between 0 to 1. (xserver continuously send moving requests)

RaafatTurki commented 2 years ago

Update? This is a really important piece as some programs are pretty much unusable with animations.

yaocccc commented 2 years ago

Update? This is a really important piece as some programs are pretty much unusable with animations.

yep, I had use my fork version 1month. It nice working. Maybe you can use my fork verison

dccsillag commented 1 year ago

Why did you close this? I didn't reject your work, I just hadn't gotten around to looking at it again.

yaocccc commented 1 year ago

Why did you close this? I didn't reject your work, I just hadn't gotten around to looking at it again.

oooo,I want to fork another version picom FT-Labs/picom

but github allow only one repo to fork this.

so I delete my fork repo. and fork new one.

Maybe tonight I create a new pr to you

XXiaoA commented 1 year ago

Cool, I need this feature! Could I ask when will we merge this PR? @dccsillag

LAST7 commented 1 year ago

Looking forward to this feature, I don't want my fcitx to zoom again and again when typing

yaocccc commented 1 year ago

Looking forward to this feature, I don't want my fcitx to zoom again and again when typing

用我仓库那版本得了。这边估计是不会合的了