mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
opt: optimize code struct
This commit is contained in:
parent
53c6442ca3
commit
c835a29559
1 changed files with 9 additions and 8 deletions
|
|
@ -498,18 +498,11 @@ void client_apply_clip(Client *c, float factor) {
|
|||
bool should_render_client_surface = false;
|
||||
struct ivec2 offset;
|
||||
animationScale scale_data;
|
||||
float opacity, percent;
|
||||
|
||||
enum corner_location current_corner_location =
|
||||
set_client_corner_location(c);
|
||||
|
||||
float percent =
|
||||
c->animation.action == OPEN && animation_fade_in && !c->nofadein
|
||||
? (double)c->animation.passed_frames / c->animation.total_frames
|
||||
: 1.0;
|
||||
float opacity = c->isfullscreen ? 1
|
||||
: c == selmon->sel ? c->focused_opacity
|
||||
: c->unfocused_opacity;
|
||||
|
||||
int bw = (int)c->bw;
|
||||
|
||||
if (!animations) {
|
||||
|
|
@ -540,6 +533,14 @@ void client_apply_clip(Client *c, float factor) {
|
|||
return;
|
||||
}
|
||||
|
||||
percent =
|
||||
c->animation.action == OPEN && animation_fade_in && !c->nofadein
|
||||
? (double)c->animation.passed_frames / c->animation.total_frames
|
||||
: 1.0;
|
||||
opacity = c->isfullscreen ? 1
|
||||
: c == selmon->sel ? c->focused_opacity
|
||||
: c->unfocused_opacity;
|
||||
|
||||
// 获取窗口动画实时位置矩形
|
||||
unsigned int width, height;
|
||||
client_actual_size(c, &width, &height);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue