mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-15 08:21:41 -04:00
修复默认的mfact为0
This commit is contained in:
parent
5fb7342844
commit
d10ceab48c
2 changed files with 17 additions and 4 deletions
19
maomao.c
19
maomao.c
|
|
@ -1121,6 +1121,8 @@ applyrulesgeom(Client *c) {
|
||||||
title = broken;
|
title = broken;
|
||||||
|
|
||||||
for (ji = 0; ji < config.window_rules_count; ji++) {
|
for (ji = 0; ji < config.window_rules_count; ji++) {
|
||||||
|
if(config.window_rules_count < 1)
|
||||||
|
break;
|
||||||
r = &config.window_rules[ji];
|
r = &config.window_rules[ji];
|
||||||
if ( (r->title && strstr(title, r->title)) || (r->id && strstr(appid, r->id))) {
|
if ( (r->title && strstr(title, r->title)) || (r->id && strstr(appid, r->id))) {
|
||||||
c->geom.width = r->width > 0 ? r->width : c->geom.width;
|
c->geom.width = r->width > 0 ? r->width : c->geom.width;
|
||||||
|
|
@ -1149,6 +1151,8 @@ applyrules(Client *c) {
|
||||||
title = broken;
|
title = broken;
|
||||||
|
|
||||||
for (ji = 0; ji < config.window_rules_count; ji++) {
|
for (ji = 0; ji < config.window_rules_count; ji++) {
|
||||||
|
if(config.window_rules_count < 1)
|
||||||
|
break;
|
||||||
r = &config.window_rules[ji];
|
r = &config.window_rules[ji];
|
||||||
|
|
||||||
if ( (r->title && strstr(title, r->title)) || (r->id && strstr(appid, r->id))) {
|
if ( (r->title && strstr(title, r->title)) || (r->id && strstr(appid, r->id))) {
|
||||||
|
|
@ -1549,6 +1553,8 @@ axisnotify(struct wl_listener *listener, void *data) {
|
||||||
adir = event->delta > 0 ? AxisRight : AxisLeft;
|
adir = event->delta > 0 ? AxisRight : AxisLeft;
|
||||||
|
|
||||||
for (ji = 0; ji < config.axis_bindings_count; ji++) {
|
for (ji = 0; ji < config.axis_bindings_count; ji++) {
|
||||||
|
if(config.axis_bindings_count < 1)
|
||||||
|
break;
|
||||||
a = &config.axis_bindings[ji];
|
a = &config.axis_bindings[ji];
|
||||||
if (CLEANMASK(mods) == CLEANMASK(a->mod) && // 按键一致
|
if (CLEANMASK(mods) == CLEANMASK(a->mod) && // 按键一致
|
||||||
adir == a->dir && a->func) { // 滚轮方向判断一致且处理函数存在
|
adir == a->dir && a->func) { // 滚轮方向判断一致且处理函数存在
|
||||||
|
|
@ -1602,6 +1608,8 @@ buttonpress(struct wl_listener *listener, void *data) {
|
||||||
keyboard = wlr_seat_get_keyboard(seat);
|
keyboard = wlr_seat_get_keyboard(seat);
|
||||||
mods = keyboard ? wlr_keyboard_get_modifiers(keyboard) : 0;
|
mods = keyboard ? wlr_keyboard_get_modifiers(keyboard) : 0;
|
||||||
for (ji = 0; ji < config.mouse_bindings_count; ji++) {
|
for (ji = 0; ji < config.mouse_bindings_count; ji++) {
|
||||||
|
if(config.mouse_bindings_count < 1)
|
||||||
|
break;
|
||||||
b = &config.mouse_bindings[ji];
|
b = &config.mouse_bindings[ji];
|
||||||
if (CLEANMASK(mods) == CLEANMASK(b->mod) && event->button == b->button &&
|
if (CLEANMASK(mods) == CLEANMASK(b->mod) && event->button == b->button &&
|
||||||
b->func && (selmon->isoverview == 1 || b->button == BTN_MIDDLE) &&
|
b->func && (selmon->isoverview == 1 || b->button == BTN_MIDDLE) &&
|
||||||
|
|
@ -2025,6 +2033,9 @@ createmon(struct wl_listener *listener, void *data) {
|
||||||
m->lt = &layouts[0];
|
m->lt = &layouts[0];
|
||||||
|
|
||||||
for (ji = 0; ji < config.monitor_rules_count; ji++) {
|
for (ji = 0; ji < config.monitor_rules_count; ji++) {
|
||||||
|
if (config.monitor_rules_count < 1)
|
||||||
|
break;
|
||||||
|
|
||||||
r = &config.monitor_rules[ji];
|
r = &config.monitor_rules[ji];
|
||||||
if (!r->name || strstr(wlr_output->name, r->name)) {
|
if (!r->name || strstr(wlr_output->name, r->name)) {
|
||||||
m->mfact = r->mfact;
|
m->mfact = r->mfact;
|
||||||
|
|
@ -2892,9 +2903,11 @@ keybinding(uint32_t mods, xkb_keysym_t sym) {
|
||||||
*/
|
*/
|
||||||
int handled = 0;
|
int handled = 0;
|
||||||
const KeyBinding *k;
|
const KeyBinding *k;
|
||||||
int i;
|
int ji;
|
||||||
for (i =0; i < config.key_bindings_count; i++) {
|
for (ji =0; ji < config.key_bindings_count; ji++) {
|
||||||
k = &config.key_bindings[i];
|
if(config.key_bindings_count < 1)
|
||||||
|
break;
|
||||||
|
k = &config.key_bindings[ji];
|
||||||
if (CLEANMASK(mods) == CLEANMASK(k->mod) && sym == k->keysym && k->func) {
|
if (CLEANMASK(mods) == CLEANMASK(k->mod) && sym == k->keysym && k->func) {
|
||||||
k->func(&k->arg);
|
k->func(&k->arg);
|
||||||
handled = 1;
|
handled = 1;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ double animation_curve[4] = {0.46,1.0,0.29,0.99}; //动画曲线
|
||||||
unsigned int axis_bind_apply_timeout = 100; //滚轮绑定动作的触发的时间间隔
|
unsigned int axis_bind_apply_timeout = 100; //滚轮绑定动作的触发的时间间隔
|
||||||
unsigned int focus_on_activate = 1; //收到窗口激活请求是否自动跳转聚焦
|
unsigned int focus_on_activate = 1; //收到窗口激活请求是否自动跳转聚焦
|
||||||
unsigned int new_is_master = 1; //新窗口是否插在头部
|
unsigned int new_is_master = 1; //新窗口是否插在头部
|
||||||
unsigned int default_mfact = 0.55f; // master 窗口比例
|
double default_mfact = 0.55f; // master 窗口比例
|
||||||
unsigned int default_nmaster = 1; //默认master数量
|
unsigned int default_nmaster = 1; //默认master数量
|
||||||
/* logging */
|
/* logging */
|
||||||
int log_level = WLR_ERROR;
|
int log_level = WLR_ERROR;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue