opt: change unsigned int to uint32_t
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
void client_actual_size(Client *c, unsigned int *width, unsigned int *height) {
|
||||
void client_actual_size(Client *c, uint32_t *width, uint32_t *height) {
|
||||
*width = c->animation.current.width - c->bw;
|
||||
|
||||
*height = c->animation.current.height - c->bw;
|
||||
@@ -183,8 +183,8 @@ void scene_buffer_apply_effect(struct wlr_scene_buffer *buffer, int sx, int sy,
|
||||
|
||||
if (buffer_data->should_scale) {
|
||||
|
||||
unsigned int surface_width = surface->current.width;
|
||||
unsigned int surface_height = surface->current.height;
|
||||
uint32_t surface_width = surface->current.width;
|
||||
uint32_t surface_height = surface->current.height;
|
||||
|
||||
surface_width = buffer_data->width_scale < 1
|
||||
? surface_width
|
||||
@@ -270,7 +270,7 @@ void client_draw_shadow(Client *c) {
|
||||
? CORNER_LOCATION_NONE
|
||||
: CORNER_LOCATION_ALL;
|
||||
|
||||
unsigned int bwoffset = c->bw != 0 && hit_no_border ? c->bw : 0;
|
||||
uint32_t bwoffset = c->bw != 0 && hit_no_border ? c->bw : 0;
|
||||
|
||||
uint32_t width, height;
|
||||
client_actual_size(c, &width, &height);
|
||||
@@ -546,7 +546,7 @@ void client_apply_clip(Client *c, float factor) {
|
||||
}
|
||||
|
||||
// 获取窗口动画实时位置矩形
|
||||
unsigned int width, height;
|
||||
uint32_t width, height;
|
||||
client_actual_size(c, &width, &height);
|
||||
|
||||
// 计算出除了边框的窗口实际剪切大小
|
||||
@@ -630,17 +630,16 @@ void fadeout_client_animation_next_tick(Client *c) {
|
||||
|
||||
int type = c->animation.action = c->animation.action;
|
||||
double factor = find_animation_curve_at(animation_passed, type);
|
||||
unsigned int width =
|
||||
c->animation.initial.width +
|
||||
(c->current.width - c->animation.initial.width) * factor;
|
||||
unsigned int height =
|
||||
uint32_t width = c->animation.initial.width +
|
||||
(c->current.width - c->animation.initial.width) * factor;
|
||||
uint32_t height =
|
||||
c->animation.initial.height +
|
||||
(c->current.height - c->animation.initial.height) * factor;
|
||||
|
||||
unsigned int x = c->animation.initial.x +
|
||||
(c->current.x - c->animation.initial.x) * factor;
|
||||
unsigned int y = c->animation.initial.y +
|
||||
(c->current.y - c->animation.initial.y) * factor;
|
||||
uint32_t x = c->animation.initial.x +
|
||||
(c->current.x - c->animation.initial.x) * factor;
|
||||
uint32_t y = c->animation.initial.y +
|
||||
(c->current.y - c->animation.initial.y) * factor;
|
||||
|
||||
wlr_scene_node_set_position(&c->scene->node, x, y);
|
||||
|
||||
@@ -696,17 +695,16 @@ void client_animation_next_tick(Client *c) {
|
||||
double sx = 0, sy = 0;
|
||||
struct wlr_surface *surface = NULL;
|
||||
|
||||
unsigned int width =
|
||||
c->animation.initial.width +
|
||||
(c->current.width - c->animation.initial.width) * factor;
|
||||
unsigned int height =
|
||||
uint32_t width = c->animation.initial.width +
|
||||
(c->current.width - c->animation.initial.width) * factor;
|
||||
uint32_t height =
|
||||
c->animation.initial.height +
|
||||
(c->current.height - c->animation.initial.height) * factor;
|
||||
|
||||
unsigned int x = c->animation.initial.x +
|
||||
(c->current.x - c->animation.initial.x) * factor;
|
||||
unsigned int y = c->animation.initial.y +
|
||||
(c->current.y - c->animation.initial.y) * factor;
|
||||
uint32_t x = c->animation.initial.x +
|
||||
(c->current.x - c->animation.initial.x) * factor;
|
||||
uint32_t y = c->animation.initial.y +
|
||||
(c->current.y - c->animation.initial.y) * factor;
|
||||
|
||||
wlr_scene_node_set_position(&c->scene->node, x, y);
|
||||
c->animation.current = (struct wlr_box){
|
||||
|
||||
Reference in New Issue
Block a user