opt: change unsigned int to uint32_t
This commit is contained in:
@@ -19,7 +19,7 @@ void set_size_per(Monitor *m, Client *c) {
|
||||
}
|
||||
|
||||
void resize_tile_master_horizontal(Client *grabc, bool isdrag, int offsetx,
|
||||
int offsety, unsigned int time, int type) {
|
||||
int offsety, uint32_t time, int type) {
|
||||
Client *tc = NULL;
|
||||
float delta_x, delta_y;
|
||||
Client *next = NULL;
|
||||
@@ -213,7 +213,7 @@ void resize_tile_master_horizontal(Client *grabc, bool isdrag, int offsetx,
|
||||
}
|
||||
|
||||
void resize_tile_master_vertical(Client *grabc, bool isdrag, int offsetx,
|
||||
int offsety, unsigned int time, int type) {
|
||||
int offsety, uint32_t time, int type) {
|
||||
Client *tc = NULL;
|
||||
float delta_x, delta_y;
|
||||
Client *next = NULL;
|
||||
@@ -370,7 +370,7 @@ void resize_tile_master_vertical(Client *grabc, bool isdrag, int offsetx,
|
||||
}
|
||||
|
||||
void resize_tile_scroller(Client *grabc, bool isdrag, int offsetx, int offsety,
|
||||
unsigned int time, bool isvertical) {
|
||||
uint32_t time, bool isvertical) {
|
||||
float delta_x, delta_y;
|
||||
float new_scroller_proportion;
|
||||
|
||||
@@ -474,7 +474,7 @@ void resize_tile_scroller(Client *grabc, bool isdrag, int offsetx, int offsety,
|
||||
}
|
||||
|
||||
void resize_tile_client(Client *grabc, bool isdrag, int offsetx, int offsety,
|
||||
unsigned int time) {
|
||||
uint32_t time) {
|
||||
|
||||
if (!grabc || grabc->isfullscreen || grabc->ismaximizescreen)
|
||||
return;
|
||||
@@ -509,8 +509,8 @@ void reset_size_per_mon(Monitor *m, int tile_cilent_num,
|
||||
int stack_num) {
|
||||
Client *c = NULL;
|
||||
int i = 0;
|
||||
unsigned int stack_index = 0;
|
||||
unsigned int nmasters = m->pertag->nmasters[m->pertag->curtag];
|
||||
uint32_t stack_index = 0;
|
||||
uint32_t nmasters = m->pertag->nmasters[m->pertag->curtag];
|
||||
|
||||
if (m->pertag->ltidxs[m->pertag->curtag]->id != CENTER_TILE) {
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// 网格布局窗口大小和位置计算
|
||||
void grid(Monitor *m) {
|
||||
unsigned int i, n;
|
||||
unsigned int cx, cy, cw, ch;
|
||||
unsigned int dx;
|
||||
unsigned int cols, rows, overcols;
|
||||
uint32_t i, n;
|
||||
uint32_t cx, cy, cw, ch;
|
||||
uint32_t dx;
|
||||
uint32_t cols, rows, overcols;
|
||||
Client *c = NULL;
|
||||
n = 0;
|
||||
int target_gappo = enablegaps ? m->isoverview ? overviewgappo : gappoh : 0;
|
||||
@@ -121,15 +121,15 @@ void grid(Monitor *m) {
|
||||
}
|
||||
|
||||
void deck(Monitor *m) {
|
||||
unsigned int mw, my;
|
||||
uint32_t mw, my;
|
||||
int i, n = 0;
|
||||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
float mfact;
|
||||
|
||||
unsigned int cur_gappih = enablegaps ? m->gappih : 0;
|
||||
unsigned int cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
unsigned int cur_gappov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
|
||||
cur_gappih = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappih;
|
||||
cur_gappoh = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappoh;
|
||||
@@ -192,9 +192,9 @@ void deck(Monitor *m) {
|
||||
void horizontal_scroll_adjust_fullandmax(Client *c,
|
||||
struct wlr_box *target_geom) {
|
||||
Monitor *m = c->mon;
|
||||
unsigned int cur_gappih = enablegaps ? m->gappih : 0;
|
||||
unsigned int cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
unsigned int cur_gappov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
|
||||
cur_gappih =
|
||||
smartgaps && m->visible_scroll_tiling_clients == 1 ? 0 : cur_gappih;
|
||||
@@ -223,7 +223,7 @@ void horizontal_scroll_adjust_fullandmax(Client *c,
|
||||
|
||||
// 滚动布局
|
||||
void scroller(Monitor *m) {
|
||||
unsigned int i, n, j;
|
||||
uint32_t i, n, j;
|
||||
float single_proportion = 1.0;
|
||||
|
||||
Client *c = NULL, *root_client = NULL;
|
||||
@@ -231,9 +231,9 @@ void scroller(Monitor *m) {
|
||||
struct wlr_box target_geom;
|
||||
int focus_client_index = 0;
|
||||
bool need_scroller = false;
|
||||
unsigned int cur_gappih = enablegaps ? m->gappih : 0;
|
||||
unsigned int cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
unsigned int cur_gappov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
|
||||
cur_gappih =
|
||||
smartgaps && m->visible_scroll_tiling_clients == 1 ? 0 : cur_gappih;
|
||||
@@ -242,8 +242,7 @@ void scroller(Monitor *m) {
|
||||
cur_gappov =
|
||||
smartgaps && m->visible_scroll_tiling_clients == 1 ? 0 : cur_gappov;
|
||||
|
||||
unsigned int max_client_width =
|
||||
m->w.width - 2 * scroller_structs - cur_gappih;
|
||||
uint32_t max_client_width = m->w.width - 2 * scroller_structs - cur_gappih;
|
||||
|
||||
n = m->visible_scroll_tiling_clients;
|
||||
|
||||
@@ -378,7 +377,7 @@ void scroller(Monitor *m) {
|
||||
}
|
||||
|
||||
void center_tile(Monitor *m) {
|
||||
unsigned int i, n = 0, h, r, ie = enablegaps, mw, mx, my, oty, ety, tw;
|
||||
uint32_t i, n = 0, h, r, ie = enablegaps, mw, mx, my, oty, ety, tw;
|
||||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
double mfact = 0;
|
||||
@@ -399,10 +398,10 @@ void center_tile(Monitor *m) {
|
||||
}
|
||||
|
||||
// 间隙参数处理
|
||||
unsigned int cur_gappiv = enablegaps ? m->gappiv : 0; // 内部垂直间隙
|
||||
unsigned int cur_gappih = enablegaps ? m->gappih : 0; // 内部水平间隙
|
||||
unsigned int cur_gappov = enablegaps ? m->gappov : 0; // 外部垂直间隙
|
||||
unsigned int cur_gappoh = enablegaps ? m->gappoh : 0; // 外部水平间隙
|
||||
uint32_t cur_gappiv = enablegaps ? m->gappiv : 0; // 内部垂直间隙
|
||||
uint32_t cur_gappih = enablegaps ? m->gappih : 0; // 内部水平间隙
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0; // 外部垂直间隙
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0; // 外部水平间隙
|
||||
|
||||
// 智能间隙处理
|
||||
cur_gappiv = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappiv;
|
||||
@@ -410,7 +409,7 @@ void center_tile(Monitor *m) {
|
||||
cur_gappov = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappov;
|
||||
cur_gappoh = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappoh;
|
||||
|
||||
unsigned int nmasters = m->pertag->nmasters[m->pertag->curtag];
|
||||
uint32_t nmasters = m->pertag->nmasters[m->pertag->curtag];
|
||||
mfact = fc->master_mfact_per > 0.0f ? fc->master_mfact_per
|
||||
: m->pertag->mfacts[m->pertag->curtag];
|
||||
|
||||
@@ -489,7 +488,7 @@ void center_tile(Monitor *m) {
|
||||
my += c->geom.height + cur_gappiv * ie;
|
||||
} else {
|
||||
// 堆叠区域窗口
|
||||
unsigned int stack_index = i - nmasters;
|
||||
uint32_t stack_index = i - nmasters;
|
||||
|
||||
if (n - nmasters == 1) {
|
||||
// 单个堆叠窗口
|
||||
@@ -587,7 +586,7 @@ void center_tile(Monitor *m) {
|
||||
}
|
||||
|
||||
void tile(Monitor *m) {
|
||||
unsigned int i, n = 0, h, r, ie = enablegaps, mw, my, ty;
|
||||
uint32_t i, n = 0, h, r, ie = enablegaps, mw, my, ty;
|
||||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
double mfact = 0;
|
||||
@@ -601,10 +600,10 @@ void tile(Monitor *m) {
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
unsigned int cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
unsigned int cur_gappih = enablegaps ? m->gappih : 0;
|
||||
unsigned int cur_gappov = enablegaps ? m->gappov : 0;
|
||||
unsigned int cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
uint32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
|
||||
cur_gappiv = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappiv;
|
||||
cur_gappih = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappih;
|
||||
@@ -684,7 +683,7 @@ void tile(Monitor *m) {
|
||||
}
|
||||
|
||||
void right_tile(Monitor *m) {
|
||||
unsigned int i, n = 0, h, r, ie = enablegaps, mw, my, ty;
|
||||
uint32_t i, n = 0, h, r, ie = enablegaps, mw, my, ty;
|
||||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
double mfact = 0;
|
||||
@@ -698,10 +697,10 @@ void right_tile(Monitor *m) {
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
unsigned int cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
unsigned int cur_gappih = enablegaps ? m->gappih : 0;
|
||||
unsigned int cur_gappov = enablegaps ? m->gappov : 0;
|
||||
unsigned int cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
uint32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
|
||||
cur_gappiv = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappiv;
|
||||
cur_gappih = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappih;
|
||||
@@ -786,8 +785,8 @@ monocle(Monitor *m) {
|
||||
Client *c = NULL;
|
||||
struct wlr_box geom;
|
||||
|
||||
unsigned int cur_gappov = enablegaps ? m->gappov : 0;
|
||||
unsigned int cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
|
||||
cur_gappoh = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappoh;
|
||||
cur_gappov = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappov;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
void vertical_tile(Monitor *m) {
|
||||
unsigned int i, n = 0, w, r, ie = enablegaps, mh, mx, tx;
|
||||
uint32_t i, n = 0, w, r, ie = enablegaps, mh, mx, tx;
|
||||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
double mfact = 0;
|
||||
@@ -13,10 +13,10 @@ void vertical_tile(Monitor *m) {
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
unsigned int cur_gapih = enablegaps ? m->gappih : 0;
|
||||
unsigned int cur_gapiv = enablegaps ? m->gappiv : 0;
|
||||
unsigned int cur_gapoh = enablegaps ? m->gappoh : 0;
|
||||
unsigned int cur_gapov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gapih = enablegaps ? m->gappih : 0;
|
||||
uint32_t cur_gapiv = enablegaps ? m->gappiv : 0;
|
||||
uint32_t cur_gapoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gapov = enablegaps ? m->gappov : 0;
|
||||
|
||||
cur_gapih = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gapih;
|
||||
cur_gapiv = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gapiv;
|
||||
@@ -92,15 +92,15 @@ void vertical_tile(Monitor *m) {
|
||||
}
|
||||
|
||||
void vertical_deck(Monitor *m) {
|
||||
unsigned int mh, mx;
|
||||
uint32_t mh, mx;
|
||||
int i, n = 0;
|
||||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
float mfact;
|
||||
|
||||
unsigned int cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
unsigned int cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
unsigned int cur_gappov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
|
||||
cur_gappiv = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappiv;
|
||||
cur_gappoh = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappoh;
|
||||
@@ -157,9 +157,9 @@ void vertical_deck(Monitor *m) {
|
||||
|
||||
void vertical_scroll_adjust_fullandmax(Client *c, struct wlr_box *target_geom) {
|
||||
Monitor *m = c->mon;
|
||||
unsigned int cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
unsigned int cur_gappov = enablegaps ? m->gappov : 0;
|
||||
unsigned int cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
|
||||
cur_gappiv =
|
||||
smartgaps && m->visible_scroll_tiling_clients == 1 ? 0 : cur_gappiv;
|
||||
@@ -188,7 +188,7 @@ void vertical_scroll_adjust_fullandmax(Client *c, struct wlr_box *target_geom) {
|
||||
|
||||
// 竖屏滚动布局
|
||||
void vertical_scroller(Monitor *m) {
|
||||
unsigned int i, n, j;
|
||||
uint32_t i, n, j;
|
||||
float single_proportion = 1.0;
|
||||
|
||||
Client *c = NULL, *root_client = NULL;
|
||||
@@ -196,9 +196,9 @@ void vertical_scroller(Monitor *m) {
|
||||
struct wlr_box target_geom;
|
||||
int focus_client_index = 0;
|
||||
bool need_scroller = false;
|
||||
unsigned int cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
unsigned int cur_gappov = enablegaps ? m->gappov : 0;
|
||||
unsigned int cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
|
||||
cur_gappiv =
|
||||
smartgaps && m->visible_scroll_tiling_clients == 1 ? 0 : cur_gappiv;
|
||||
@@ -207,7 +207,7 @@ void vertical_scroller(Monitor *m) {
|
||||
cur_gappoh =
|
||||
smartgaps && m->visible_scroll_tiling_clients == 1 ? 0 : cur_gappoh;
|
||||
|
||||
unsigned int max_client_height =
|
||||
uint32_t max_client_height =
|
||||
m->w.height - 2 * scroller_structs - cur_gappiv;
|
||||
|
||||
n = m->visible_scroll_tiling_clients;
|
||||
@@ -341,10 +341,10 @@ void vertical_scroller(Monitor *m) {
|
||||
}
|
||||
|
||||
void vertical_grid(Monitor *m) {
|
||||
unsigned int i, n;
|
||||
unsigned int cx, cy, cw, ch;
|
||||
unsigned int dy;
|
||||
unsigned int rows, cols, overrows;
|
||||
uint32_t i, n;
|
||||
uint32_t cx, cy, cw, ch;
|
||||
uint32_t dy;
|
||||
uint32_t rows, cols, overrows;
|
||||
Client *c = NULL;
|
||||
int target_gappo = enablegaps ? m->isoverview ? overviewgappo : gappov : 0;
|
||||
int target_gappi = enablegaps ? m->isoverview ? overviewgappi : gappiv : 0;
|
||||
|
||||
Reference in New Issue
Block a user