mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-31 07:11:28 -04:00
opt: fix spelling mistake
This commit is contained in:
parent
afe44ff457
commit
656637909d
3 changed files with 40 additions and 40 deletions
|
|
@ -75,7 +75,7 @@ https://github.com/user-attachments/assets/014c893f-115c-4ae9-8342-f9ae3e9a0df0
|
||||||
- libxcb
|
- libxcb
|
||||||
|
|
||||||
## Arch Linux
|
## Arch Linux
|
||||||
The package is in the Arch User Repository and is availble for manual download [here](https://aur.archlinux.org/packages/mangowc-git) or through a AUR helper like yay:
|
The package is in the Arch User Repository and is available for manual download [here](https://aur.archlinux.org/packages/mangowc-git) or through a AUR helper like yay:
|
||||||
```bash
|
```bash
|
||||||
yay -S mangowc-git
|
yay -S mangowc-git
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ bool is_horizontal_right_stack_layout(Monitor *m) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t is_special_animaiton_rule(Client *c) {
|
int32_t is_special_animation_rule(Client *c) {
|
||||||
|
|
||||||
if (is_scroller_layout(c->mon) && !c->isfloating) {
|
if (is_scroller_layout(c->mon) && !c->isfloating) {
|
||||||
return DOWN;
|
return DOWN;
|
||||||
|
|
@ -56,7 +56,7 @@ int32_t is_special_animaiton_rule(Client *c) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_client_open_animaiton(Client *c, struct wlr_box geo) {
|
void set_client_open_animation(Client *c, struct wlr_box geo) {
|
||||||
int32_t slide_direction;
|
int32_t slide_direction;
|
||||||
int32_t horizontal, horizontal_value;
|
int32_t horizontal, horizontal_value;
|
||||||
int32_t vertical, vertical_value;
|
int32_t vertical, vertical_value;
|
||||||
|
|
@ -82,7 +82,7 @@ void set_client_open_animaiton(Client *c, struct wlr_box geo) {
|
||||||
geo.y + (geo.height - c->animainit_geom.height) / 2;
|
geo.y + (geo.height - c->animainit_geom.height) / 2;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
special_direction = is_special_animaiton_rule(c);
|
special_direction = is_special_animation_rule(c);
|
||||||
center_x = c->geom.x + c->geom.width / 2;
|
center_x = c->geom.x + c->geom.width / 2;
|
||||||
center_y = c->geom.y + c->geom.height / 2;
|
center_y = c->geom.y + c->geom.height / 2;
|
||||||
if (special_direction == UNDIR) {
|
if (special_direction == UNDIR) {
|
||||||
|
|
@ -645,71 +645,71 @@ void init_fadeout_client(Client *c) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Client *fadeout_cient = ecalloc(1, sizeof(*fadeout_cient));
|
Client *fadeout_client = ecalloc(1, sizeof(*fadeout_client));
|
||||||
|
|
||||||
wlr_scene_node_set_enabled(&c->scene->node, true);
|
wlr_scene_node_set_enabled(&c->scene->node, true);
|
||||||
client_set_border_color(c, bordercolor);
|
client_set_border_color(c, bordercolor);
|
||||||
fadeout_cient->scene =
|
fadeout_client->scene =
|
||||||
wlr_scene_tree_snapshot(&c->scene->node, layers[LyrFadeOut]);
|
wlr_scene_tree_snapshot(&c->scene->node, layers[LyrFadeOut]);
|
||||||
wlr_scene_node_set_enabled(&c->scene->node, false);
|
wlr_scene_node_set_enabled(&c->scene->node, false);
|
||||||
|
|
||||||
if (!fadeout_cient->scene) {
|
if (!fadeout_client->scene) {
|
||||||
free(fadeout_cient);
|
free(fadeout_client);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fadeout_cient->animation.duration = animation_duration_close;
|
fadeout_client->animation.duration = animation_duration_close;
|
||||||
fadeout_cient->geom = fadeout_cient->current =
|
fadeout_client->geom = fadeout_client->current =
|
||||||
fadeout_cient->animainit_geom = fadeout_cient->animation.initial =
|
fadeout_client->animainit_geom = fadeout_client->animation.initial =
|
||||||
c->animation.current;
|
c->animation.current;
|
||||||
fadeout_cient->mon = c->mon;
|
fadeout_client->mon = c->mon;
|
||||||
fadeout_cient->animation_type_close = c->animation_type_close;
|
fadeout_client->animation_type_close = c->animation_type_close;
|
||||||
fadeout_cient->animation.action = CLOSE;
|
fadeout_client->animation.action = CLOSE;
|
||||||
fadeout_cient->bw = c->bw;
|
fadeout_client->bw = c->bw;
|
||||||
fadeout_cient->nofadeout = c->nofadeout;
|
fadeout_client->nofadeout = c->nofadeout;
|
||||||
|
|
||||||
// 这里snap节点的坐标设置是使用的相对坐标,所以不能加上原来坐标
|
// 这里snap节点的坐标设置是使用的相对坐标,所以不能加上原来坐标
|
||||||
// 这跟普通node有区别
|
// 这跟普通node有区别
|
||||||
|
|
||||||
fadeout_cient->animation.initial.x = 0;
|
fadeout_client->animation.initial.x = 0;
|
||||||
fadeout_cient->animation.initial.y = 0;
|
fadeout_client->animation.initial.y = 0;
|
||||||
|
|
||||||
if ((!c->animation_type_close &&
|
if ((!c->animation_type_close &&
|
||||||
strcmp(animation_type_close, "fade") == 0) ||
|
strcmp(animation_type_close, "fade") == 0) ||
|
||||||
(c->animation_type_close &&
|
(c->animation_type_close &&
|
||||||
strcmp(c->animation_type_close, "fade") == 0)) {
|
strcmp(c->animation_type_close, "fade") == 0)) {
|
||||||
fadeout_cient->current.x = 0;
|
fadeout_client->current.x = 0;
|
||||||
fadeout_cient->current.y = 0;
|
fadeout_client->current.y = 0;
|
||||||
fadeout_cient->current.width = 0;
|
fadeout_client->current.width = 0;
|
||||||
fadeout_cient->current.height = 0;
|
fadeout_client->current.height = 0;
|
||||||
} else if ((c->animation_type_close &&
|
} else if ((c->animation_type_close &&
|
||||||
strcmp(c->animation_type_close, "slide") == 0) ||
|
strcmp(c->animation_type_close, "slide") == 0) ||
|
||||||
(!c->animation_type_close &&
|
(!c->animation_type_close &&
|
||||||
strcmp(animation_type_close, "slide") == 0)) {
|
strcmp(animation_type_close, "slide") == 0)) {
|
||||||
fadeout_cient->current.y =
|
fadeout_client->current.y =
|
||||||
c->geom.y + c->geom.height / 2 > c->mon->m.y + c->mon->m.height / 2
|
c->geom.y + c->geom.height / 2 > c->mon->m.y + c->mon->m.height / 2
|
||||||
? c->mon->m.height -
|
? c->mon->m.height -
|
||||||
(c->animation.current.y - c->mon->m.y) // down out
|
(c->animation.current.y - c->mon->m.y) // down out
|
||||||
: c->mon->m.y - c->geom.height; // up out
|
: c->mon->m.y - c->geom.height; // up out
|
||||||
fadeout_cient->current.x = 0; // x无偏差,垂直划出
|
fadeout_client->current.x = 0; // x无偏差,垂直划出
|
||||||
} else {
|
} else {
|
||||||
fadeout_cient->current.y =
|
fadeout_client->current.y =
|
||||||
(fadeout_cient->geom.height -
|
(fadeout_client->geom.height -
|
||||||
fadeout_cient->geom.height * zoom_end_ratio) /
|
fadeout_client->geom.height * zoom_end_ratio) /
|
||||||
2;
|
2;
|
||||||
fadeout_cient->current.x =
|
fadeout_client->current.x =
|
||||||
(fadeout_cient->geom.width -
|
(fadeout_client->geom.width -
|
||||||
fadeout_cient->geom.width * zoom_end_ratio) /
|
fadeout_client->geom.width * zoom_end_ratio) /
|
||||||
2;
|
2;
|
||||||
fadeout_cient->current.width =
|
fadeout_client->current.width =
|
||||||
fadeout_cient->geom.width * zoom_end_ratio;
|
fadeout_client->geom.width * zoom_end_ratio;
|
||||||
fadeout_cient->current.height =
|
fadeout_client->current.height =
|
||||||
fadeout_cient->geom.height * zoom_end_ratio;
|
fadeout_client->geom.height * zoom_end_ratio;
|
||||||
}
|
}
|
||||||
|
|
||||||
fadeout_cient->animation.time_started = get_now_in_ms();
|
fadeout_client->animation.time_started = get_now_in_ms();
|
||||||
wlr_scene_node_set_enabled(&fadeout_cient->scene->node, true);
|
wlr_scene_node_set_enabled(&fadeout_client->scene->node, true);
|
||||||
wl_list_insert(&fadeout_clients, &fadeout_cient->fadeout_link);
|
wl_list_insert(&fadeout_clients, &fadeout_client->fadeout_link);
|
||||||
|
|
||||||
// 请求刷新屏幕
|
// 请求刷新屏幕
|
||||||
request_fresh_all_monitors();
|
request_fresh_all_monitors();
|
||||||
|
|
@ -844,7 +844,7 @@ void resize(Client *c, struct wlr_box geo, int32_t interact) {
|
||||||
c->animainit_geom.height = c->animation.current.height;
|
c->animainit_geom.height = c->animation.current.height;
|
||||||
c->animainit_geom.width = c->animation.current.width;
|
c->animainit_geom.width = c->animation.current.width;
|
||||||
} else if (c->is_pending_open_animation) {
|
} else if (c->is_pending_open_animation) {
|
||||||
set_client_open_animaiton(c, c->geom);
|
set_client_open_animation(c, c->geom);
|
||||||
} else {
|
} else {
|
||||||
c->animainit_geom = c->animation.current;
|
c->animainit_geom = c->animation.current;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,7 @@ static inline int32_t client_is_stopped(Client *c) {
|
||||||
wl_client_get_credentials(c->surface.xdg->client->client, &pid, NULL, NULL);
|
wl_client_get_credentials(c->surface.xdg->client->client, &pid, NULL, NULL);
|
||||||
if (waitid(P_PID, pid, &in, WNOHANG | WCONTINUED | WSTOPPED | WNOWAIT) <
|
if (waitid(P_PID, pid, &in, WNOHANG | WCONTINUED | WSTOPPED | WNOWAIT) <
|
||||||
0) {
|
0) {
|
||||||
/* This process is not our child process, while is very unluckely that
|
/* This process is not our child process, while is very unlikely that
|
||||||
* it is stopped, in order to do not skip frames assume that it is. */
|
* it is stopped, in order to do not skip frames assume that it is. */
|
||||||
if (errno == ECHILD)
|
if (errno == ECHILD)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -549,4 +549,4 @@ static inline void client_set_size_bound(Client *c) {
|
||||||
state.max_height > 0) {
|
state.max_height > 0) {
|
||||||
c->geom.height = state.max_height + 2 * c->bw;
|
c->geom.height = state.max_height + 2 * c->bw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue