resolve upstream merge conflicts
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
void set_size_per(Monitor *m, Client *c) {
|
||||
Client *fc = NULL;
|
||||
bool found = false;
|
||||
|
||||
if (!m || !c)
|
||||
return;
|
||||
|
||||
wl_list_for_each(fc, &clients, link) {
|
||||
if (VISIBLEON(fc, m) && ISTILED(fc) && fc != c) {
|
||||
c->master_mfact_per = fc->master_mfact_per;
|
||||
@@ -18,8 +22,9 @@ void set_size_per(Monitor *m, Client *c) {
|
||||
}
|
||||
}
|
||||
|
||||
void resize_tile_master_horizontal(Client *grabc, bool isdrag, int offsetx,
|
||||
int offsety, uint32_t time, int type) {
|
||||
void resize_tile_master_horizontal(Client *grabc, bool isdrag, int32_t offsetx,
|
||||
int32_t offsety, uint32_t time,
|
||||
int32_t type) {
|
||||
Client *tc = NULL;
|
||||
float delta_x, delta_y;
|
||||
Client *next = NULL;
|
||||
@@ -200,20 +205,20 @@ void resize_tile_master_horizontal(Client *grabc, bool isdrag, int offsetx,
|
||||
grabc->stack_inner_per = new_stack_inner_per;
|
||||
|
||||
if (!isdrag) {
|
||||
arrange(grabc->mon, false);
|
||||
arrange(grabc->mon, false, false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (last_apply_drap_time == 0 ||
|
||||
time - last_apply_drap_time > drag_refresh_interval) {
|
||||
arrange(grabc->mon, false);
|
||||
arrange(grabc->mon, false, false);
|
||||
last_apply_drap_time = time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void resize_tile_master_vertical(Client *grabc, bool isdrag, int offsetx,
|
||||
int offsety, uint32_t time, int type) {
|
||||
void resize_tile_master_vertical(Client *grabc, bool isdrag, int32_t offsetx,
|
||||
int32_t offsety, uint32_t time, int32_t type) {
|
||||
Client *tc = NULL;
|
||||
float delta_x, delta_y;
|
||||
Client *next = NULL;
|
||||
@@ -357,20 +362,20 @@ void resize_tile_master_vertical(Client *grabc, bool isdrag, int offsetx,
|
||||
grabc->stack_inner_per = new_stack_inner_per;
|
||||
|
||||
if (!isdrag) {
|
||||
arrange(grabc->mon, false);
|
||||
arrange(grabc->mon, false, false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (last_apply_drap_time == 0 ||
|
||||
time - last_apply_drap_time > drag_refresh_interval) {
|
||||
arrange(grabc->mon, false);
|
||||
arrange(grabc->mon, false, false);
|
||||
last_apply_drap_time = time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void resize_tile_scroller(Client *grabc, bool isdrag, int offsetx, int offsety,
|
||||
uint32_t time, bool isvertical) {
|
||||
void resize_tile_scroller(Client *grabc, bool isdrag, int32_t offsetx,
|
||||
int32_t offsety, uint32_t time, bool isvertical) {
|
||||
float delta_x, delta_y;
|
||||
float new_scroller_proportion;
|
||||
|
||||
@@ -461,20 +466,20 @@ void resize_tile_scroller(Client *grabc, bool isdrag, int offsetx, int offsety,
|
||||
grabc->scroller_proportion = new_scroller_proportion;
|
||||
|
||||
if (!isdrag) {
|
||||
arrange(grabc->mon, false);
|
||||
arrange(grabc->mon, false, false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (last_apply_drap_time == 0 ||
|
||||
time - last_apply_drap_time > drag_refresh_interval) {
|
||||
arrange(grabc->mon, false);
|
||||
arrange(grabc->mon, false, false);
|
||||
last_apply_drap_time = time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void resize_tile_client(Client *grabc, bool isdrag, int offsetx, int offsety,
|
||||
uint32_t time) {
|
||||
void resize_tile_client(Client *grabc, bool isdrag, int32_t offsetx,
|
||||
int32_t offsety, uint32_t time) {
|
||||
|
||||
if (!grabc || grabc->isfullscreen || grabc->ismaximizescreen)
|
||||
return;
|
||||
@@ -504,14 +509,14 @@ void resize_tile_client(Client *grabc, bool isdrag, int offsetx, int offsety,
|
||||
}
|
||||
}
|
||||
|
||||
void reset_size_per_mon(Monitor *m, int tile_cilent_num,
|
||||
void reset_size_per_mon(Monitor *m, int32_t tile_cilent_num,
|
||||
double total_left_stack_hight_percent,
|
||||
double total_right_stack_hight_percent,
|
||||
double total_stack_hight_percent,
|
||||
double total_master_inner_percent, int master_num,
|
||||
int stack_num) {
|
||||
double total_master_inner_percent, int32_t master_num,
|
||||
int32_t stack_num) {
|
||||
Client *c = NULL;
|
||||
int i = 0;
|
||||
int32_t i = 0;
|
||||
uint32_t stack_index = 0;
|
||||
uint32_t nmasters = m->pertag->nmasters[m->pertag->curtag];
|
||||
|
||||
@@ -579,17 +584,17 @@ void reset_size_per_mon(Monitor *m, int tile_cilent_num,
|
||||
}
|
||||
|
||||
void // 17
|
||||
arrange(Monitor *m, bool want_animation) {
|
||||
arrange(Monitor *m, bool want_animation, bool from_view) {
|
||||
Client *c = NULL;
|
||||
double total_stack_inner_percent = 0;
|
||||
double total_master_inner_percent = 0;
|
||||
double total_right_stack_hight_percent = 0;
|
||||
double total_left_stack_hight_percent = 0;
|
||||
int i = 0;
|
||||
int nmasters = 0;
|
||||
int stack_index = 0;
|
||||
int master_num = 0;
|
||||
int stack_num = 0;
|
||||
int32_t i = 0;
|
||||
int32_t nmasters = 0;
|
||||
int32_t stack_index = 0;
|
||||
int32_t master_num = 0;
|
||||
int32_t stack_num = 0;
|
||||
|
||||
if (!m)
|
||||
return;
|
||||
@@ -602,6 +607,10 @@ arrange(Monitor *m, bool want_animation) {
|
||||
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
|
||||
if (from_view && (c->isglobal || c->isunglobal)) {
|
||||
set_size_per(m, c);
|
||||
}
|
||||
|
||||
if (c->mon == m && (c->isglobal || c->isunglobal)) {
|
||||
c->tags = m->tagset[m->seltags];
|
||||
if (c->mon->sel == NULL)
|
||||
@@ -609,6 +618,10 @@ arrange(Monitor *m, bool want_animation) {
|
||||
}
|
||||
|
||||
if (VISIBLEON(c, m)) {
|
||||
if (from_view && !client_only_in_one_tag(c)) {
|
||||
set_size_per(m, c);
|
||||
}
|
||||
|
||||
if (!c->isunglobal)
|
||||
m->visible_clients++;
|
||||
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
// 网格布局窗口大小和位置计算
|
||||
void grid(Monitor *m) {
|
||||
uint32_t i, n;
|
||||
uint32_t cx, cy, cw, ch;
|
||||
uint32_t dx;
|
||||
uint32_t cols, rows, overcols;
|
||||
int32_t i, n;
|
||||
int32_t cx, cy, cw, ch;
|
||||
int32_t dx;
|
||||
int32_t cols, rows, overcols;
|
||||
Client *c = NULL;
|
||||
n = 0;
|
||||
int target_gappo = enablegaps ? m->isoverview ? overviewgappo : gappoh : 0;
|
||||
int target_gappi = enablegaps ? m->isoverview ? overviewgappi : gappih : 0;
|
||||
int32_t target_gappo =
|
||||
enablegaps ? m->isoverview ? overviewgappo : gappoh : 0;
|
||||
int32_t target_gappi =
|
||||
enablegaps ? m->isoverview ? overviewgappi : gappih : 0;
|
||||
float single_width_ratio = m->isoverview ? 0.7 : 0.9;
|
||||
float single_height_ratio = m->isoverview ? 0.8 : 0.9;
|
||||
|
||||
@@ -110,15 +112,15 @@ void grid(Monitor *m) {
|
||||
}
|
||||
|
||||
void deck(Monitor *m) {
|
||||
uint32_t mw, my;
|
||||
int i, n = 0;
|
||||
int32_t mw, my;
|
||||
int32_t i, n = 0;
|
||||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
float mfact;
|
||||
|
||||
uint32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
int32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
int32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
int32_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;
|
||||
@@ -181,9 +183,9 @@ void deck(Monitor *m) {
|
||||
void horizontal_scroll_adjust_fullandmax(Client *c,
|
||||
struct wlr_box *target_geom) {
|
||||
Monitor *m = c->mon;
|
||||
uint32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
int32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
int32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
int32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
|
||||
cur_gappih =
|
||||
smartgaps && m->visible_scroll_tiling_clients == 1 ? 0 : cur_gappih;
|
||||
@@ -212,17 +214,17 @@ void horizontal_scroll_adjust_fullandmax(Client *c,
|
||||
|
||||
// 滚动布局
|
||||
void scroller(Monitor *m) {
|
||||
uint32_t i, n, j;
|
||||
int32_t i, n, j;
|
||||
float single_proportion = 1.0;
|
||||
|
||||
Client *c = NULL, *root_client = NULL;
|
||||
Client **tempClients = NULL; // 初始化为 NULL
|
||||
struct wlr_box target_geom;
|
||||
int focus_client_index = 0;
|
||||
int32_t focus_client_index = 0;
|
||||
bool need_scroller = false;
|
||||
uint32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
int32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
int32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
int32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
|
||||
cur_gappih =
|
||||
smartgaps && m->visible_scroll_tiling_clients == 1 ? 0 : cur_gappih;
|
||||
@@ -231,7 +233,7 @@ void scroller(Monitor *m) {
|
||||
cur_gappov =
|
||||
smartgaps && m->visible_scroll_tiling_clients == 1 ? 0 : cur_gappov;
|
||||
|
||||
uint32_t max_client_width = m->w.width - 2 * scroller_structs - cur_gappih;
|
||||
int32_t max_client_width = m->w.width - 2 * scroller_structs - cur_gappih;
|
||||
|
||||
n = m->visible_scroll_tiling_clients;
|
||||
|
||||
@@ -572,12 +574,12 @@ void dual_scroller(Monitor *m) {
|
||||
}
|
||||
|
||||
void center_tile(Monitor *m) {
|
||||
uint32_t i, n = 0, h, r, ie = enablegaps, mw, mx, my, oty, ety, tw;
|
||||
int32_t i, n = 0, h, r, ie = enablegaps, mw, mx, my, oty, ety, tw;
|
||||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
double mfact = 0;
|
||||
int master_num = 0;
|
||||
int stack_num = 0;
|
||||
int32_t master_num = 0;
|
||||
int32_t stack_num = 0;
|
||||
|
||||
n = m->visible_tiling_clients;
|
||||
master_num = m->pertag->nmasters[m->pertag->curtag];
|
||||
@@ -595,10 +597,10 @@ void center_tile(Monitor *m) {
|
||||
}
|
||||
|
||||
// 间隙参数处理
|
||||
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; // 外部水平间隙
|
||||
int32_t cur_gappiv = enablegaps ? m->gappiv : 0; // 内部垂直间隙
|
||||
int32_t cur_gappih = enablegaps ? m->gappih : 0; // 内部水平间隙
|
||||
int32_t cur_gappov = enablegaps ? m->gappov : 0; // 外部垂直间隙
|
||||
int32_t cur_gappoh = enablegaps ? m->gappoh : 0; // 外部水平间隙
|
||||
|
||||
// 智能间隙处理
|
||||
cur_gappiv = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappiv;
|
||||
@@ -606,7 +608,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;
|
||||
|
||||
uint32_t nmasters = m->pertag->nmasters[m->pertag->curtag];
|
||||
int32_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];
|
||||
|
||||
@@ -617,17 +619,17 @@ void center_tile(Monitor *m) {
|
||||
tw = mw;
|
||||
|
||||
// 判断是否需要主区域铺满
|
||||
int should_overspread = center_master_overspread && (n <= nmasters);
|
||||
int32_t should_overspread = center_master_overspread && (n <= nmasters);
|
||||
|
||||
uint32_t master_surplus_height =
|
||||
int32_t master_surplus_height =
|
||||
(m->w.height - 2 * cur_gappov - cur_gappiv * ie * (master_num - 1));
|
||||
float master_surplus_ratio = 1.0;
|
||||
|
||||
uint32_t slave_left_surplus_height =
|
||||
int32_t slave_left_surplus_height =
|
||||
(m->w.height - 2 * cur_gappov - cur_gappiv * ie * (stack_num / 2 - 1));
|
||||
float slave_left_surplus_ratio = 1.0;
|
||||
|
||||
uint32_t slave_right_surplus_height =
|
||||
int32_t slave_right_surplus_height =
|
||||
(m->w.height - 2 * cur_gappov -
|
||||
cur_gappiv * ie * ((stack_num + 1) / 2 - 1));
|
||||
float slave_right_surplus_ratio = 1.0;
|
||||
@@ -700,7 +702,7 @@ void center_tile(Monitor *m) {
|
||||
my += c->geom.height + cur_gappiv * ie;
|
||||
} else {
|
||||
// 堆叠区域窗口
|
||||
uint32_t stack_index = i - nmasters;
|
||||
int32_t stack_index = i - nmasters;
|
||||
|
||||
if (n - nmasters == 1) {
|
||||
// 单个堆叠窗口
|
||||
@@ -719,7 +721,7 @@ void center_tile(Monitor *m) {
|
||||
c->master_mfact_per = mfact;
|
||||
}
|
||||
|
||||
int stack_x;
|
||||
int32_t stack_x;
|
||||
if (center_when_single_stack) {
|
||||
// 放在右侧(master居中时,stack在右边)
|
||||
stack_x = m->w.x + mx + mw + cur_gappih * ie;
|
||||
@@ -759,7 +761,7 @@ void center_tile(Monitor *m) {
|
||||
c->master_mfact_per = mfact;
|
||||
}
|
||||
|
||||
int stack_x = m->w.x + mx + mw + cur_gappih * ie;
|
||||
int32_t stack_x = m->w.x + mx + mw + cur_gappih * ie;
|
||||
|
||||
resize(c,
|
||||
(struct wlr_box){.x = stack_x,
|
||||
@@ -788,7 +790,7 @@ void center_tile(Monitor *m) {
|
||||
c->master_mfact_per = mfact;
|
||||
}
|
||||
|
||||
int stack_x = m->w.x + cur_gappoh;
|
||||
int32_t stack_x = m->w.x + cur_gappoh;
|
||||
resize(c,
|
||||
(struct wlr_box){.x = stack_x,
|
||||
.y = m->w.y + oty,
|
||||
@@ -804,12 +806,12 @@ void center_tile(Monitor *m) {
|
||||
}
|
||||
|
||||
void tile(Monitor *m) {
|
||||
uint32_t i, n = 0, h, r, ie = enablegaps, mw, my, ty;
|
||||
int32_t i, n = 0, h, r, ie = enablegaps, mw, my, ty;
|
||||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
double mfact = 0;
|
||||
int master_num = 0;
|
||||
int stack_num = 0;
|
||||
int32_t master_num = 0;
|
||||
int32_t stack_num = 0;
|
||||
|
||||
n = m->visible_tiling_clients;
|
||||
master_num = m->pertag->nmasters[m->pertag->curtag];
|
||||
@@ -819,10 +821,10 @@ void tile(Monitor *m) {
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
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;
|
||||
int32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
int32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
int32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
int32_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;
|
||||
@@ -847,11 +849,11 @@ void tile(Monitor *m) {
|
||||
i = 0;
|
||||
my = ty = cur_gappov;
|
||||
|
||||
uint32_t master_surplus_height =
|
||||
int32_t master_surplus_height =
|
||||
(m->w.height - 2 * cur_gappov - cur_gappiv * ie * (master_num - 1));
|
||||
float master_surplus_ratio = 1.0;
|
||||
|
||||
uint32_t slave_surplus_height =
|
||||
int32_t slave_surplus_height =
|
||||
(m->w.height - 2 * cur_gappov - cur_gappiv * ie * (stack_num - 1));
|
||||
float slave_surplus_ratio = 1.0;
|
||||
|
||||
@@ -914,12 +916,12 @@ void tile(Monitor *m) {
|
||||
}
|
||||
|
||||
void right_tile(Monitor *m) {
|
||||
uint32_t i, n = 0, h, r, ie = enablegaps, mw, my, ty;
|
||||
int32_t i, n = 0, h, r, ie = enablegaps, mw, my, ty;
|
||||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
double mfact = 0;
|
||||
int master_num = 0;
|
||||
int stack_num = 0;
|
||||
int32_t master_num = 0;
|
||||
int32_t stack_num = 0;
|
||||
|
||||
n = m->visible_tiling_clients;
|
||||
master_num = m->pertag->nmasters[m->pertag->curtag];
|
||||
@@ -929,10 +931,10 @@ void right_tile(Monitor *m) {
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
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;
|
||||
int32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
int32_t cur_gappih = enablegaps ? m->gappih : 0;
|
||||
int32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
int32_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;
|
||||
@@ -957,11 +959,11 @@ void right_tile(Monitor *m) {
|
||||
i = 0;
|
||||
my = ty = cur_gappov;
|
||||
|
||||
uint32_t master_surplus_height =
|
||||
int32_t master_surplus_height =
|
||||
(m->w.height - 2 * cur_gappov - cur_gappiv * ie * (master_num - 1));
|
||||
float master_surplus_ratio = 1.0;
|
||||
|
||||
uint32_t slave_surplus_height =
|
||||
int32_t slave_surplus_height =
|
||||
(m->w.height - 2 * cur_gappov - cur_gappiv * ie * (stack_num - 1));
|
||||
float slave_surplus_ratio = 1.0;
|
||||
|
||||
@@ -1029,8 +1031,8 @@ monocle(Monitor *m) {
|
||||
Client *c = NULL;
|
||||
struct wlr_box geom;
|
||||
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
int32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
int32_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;
|
||||
@@ -1049,7 +1051,7 @@ monocle(Monitor *m) {
|
||||
}
|
||||
|
||||
void tgmix(Monitor *m) {
|
||||
uint32_t n = m->visible_tiling_clients;
|
||||
int32_t n = m->visible_tiling_clients;
|
||||
if (n <= 3) {
|
||||
tile(m);
|
||||
return;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
void vertical_tile(Monitor *m) {
|
||||
uint32_t i, n = 0, w, r, ie = enablegaps, mh, mx, tx;
|
||||
int32_t i, n = 0, w, r, ie = enablegaps, mh, mx, tx;
|
||||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
double mfact = 0;
|
||||
int master_num = 0;
|
||||
int stack_num = 0;
|
||||
int32_t master_num = 0;
|
||||
int32_t stack_num = 0;
|
||||
|
||||
n = m->visible_tiling_clients;
|
||||
master_num = m->pertag->nmasters[m->pertag->curtag];
|
||||
@@ -14,10 +14,10 @@ void vertical_tile(Monitor *m) {
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
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;
|
||||
int32_t cur_gapih = enablegaps ? m->gappih : 0;
|
||||
int32_t cur_gapiv = enablegaps ? m->gappiv : 0;
|
||||
int32_t cur_gapoh = enablegaps ? m->gappoh : 0;
|
||||
int32_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;
|
||||
@@ -40,14 +40,14 @@ void vertical_tile(Monitor *m) {
|
||||
mh = m->w.height - 2 * cur_gapov + cur_gapiv * ie;
|
||||
|
||||
i = 0;
|
||||
mx = tx = cur_gapih;
|
||||
mx = tx = cur_gapoh;
|
||||
|
||||
uint32_t master_surplus_width =
|
||||
(m->w.width - 2 * cur_gapih - cur_gapih * ie * (master_num - 1));
|
||||
int32_t master_surplus_width =
|
||||
(m->w.width - 2 * cur_gapoh - cur_gapih * ie * (master_num - 1));
|
||||
float master_surplus_ratio = 1.0;
|
||||
|
||||
uint32_t slave_surplus_width =
|
||||
(m->w.width - 2 * cur_gapih - cur_gapih * ie * (stack_num - 1));
|
||||
int32_t slave_surplus_width =
|
||||
(m->w.width - 2 * cur_gapoh - cur_gapih * ie * (stack_num - 1));
|
||||
float slave_surplus_ratio = 1.0;
|
||||
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
@@ -105,15 +105,15 @@ void vertical_tile(Monitor *m) {
|
||||
}
|
||||
|
||||
void vertical_deck(Monitor *m) {
|
||||
uint32_t mh, mx;
|
||||
int i, n = 0;
|
||||
int32_t mh, mx;
|
||||
int32_t i, n = 0;
|
||||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
float mfact;
|
||||
|
||||
uint32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
int32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
int32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
int32_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;
|
||||
@@ -170,9 +170,9 @@ void vertical_deck(Monitor *m) {
|
||||
|
||||
void vertical_scroll_adjust_fullandmax(Client *c, struct wlr_box *target_geom) {
|
||||
Monitor *m = c->mon;
|
||||
uint32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
int32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
int32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
int32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
|
||||
cur_gappiv =
|
||||
smartgaps && m->visible_scroll_tiling_clients == 1 ? 0 : cur_gappiv;
|
||||
@@ -201,17 +201,17 @@ void vertical_scroll_adjust_fullandmax(Client *c, struct wlr_box *target_geom) {
|
||||
|
||||
// 竖屏滚动布局
|
||||
void vertical_scroller(Monitor *m) {
|
||||
uint32_t i, n, j;
|
||||
int32_t i, n, j;
|
||||
float single_proportion = 1.0;
|
||||
|
||||
Client *c = NULL, *root_client = NULL;
|
||||
Client **tempClients = NULL;
|
||||
struct wlr_box target_geom;
|
||||
int focus_client_index = 0;
|
||||
int32_t focus_client_index = 0;
|
||||
bool need_scroller = false;
|
||||
uint32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
uint32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
uint32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
int32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
int32_t cur_gappov = enablegaps ? m->gappov : 0;
|
||||
int32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
|
||||
cur_gappiv =
|
||||
smartgaps && m->visible_scroll_tiling_clients == 1 ? 0 : cur_gappiv;
|
||||
@@ -220,8 +220,7 @@ void vertical_scroller(Monitor *m) {
|
||||
cur_gappoh =
|
||||
smartgaps && m->visible_scroll_tiling_clients == 1 ? 0 : cur_gappoh;
|
||||
|
||||
uint32_t max_client_height =
|
||||
m->w.height - 2 * scroller_structs - cur_gappiv;
|
||||
int32_t max_client_height = m->w.height - 2 * scroller_structs - cur_gappiv;
|
||||
|
||||
n = m->visible_scroll_tiling_clients;
|
||||
|
||||
@@ -354,13 +353,15 @@ void vertical_scroller(Monitor *m) {
|
||||
}
|
||||
|
||||
void vertical_grid(Monitor *m) {
|
||||
uint32_t i, n;
|
||||
uint32_t cx, cy, cw, ch;
|
||||
uint32_t dy;
|
||||
uint32_t rows, cols, overrows;
|
||||
int32_t i, n;
|
||||
int32_t cx, cy, cw, ch;
|
||||
int32_t dy;
|
||||
int32_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;
|
||||
int32_t target_gappo =
|
||||
enablegaps ? m->isoverview ? overviewgappo : gappov : 0;
|
||||
int32_t target_gappi =
|
||||
enablegaps ? m->isoverview ? overviewgappi : gappiv : 0;
|
||||
float single_width_ratio = m->isoverview ? 0.7 : 0.9;
|
||||
float single_height_ratio = m->isoverview ? 0.8 : 0.9;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user