mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-08 13:29:56 -05:00
opt: monitor rule fallback to custom mode
This commit is contained in:
parent
d6ddd9311e
commit
15fc158dc4
2 changed files with 8 additions and 0 deletions
|
|
@ -2494,6 +2494,10 @@ void reapply_monitor_rules(void) {
|
||||||
mr->height, mr->refresh);
|
mr->height, mr->refresh);
|
||||||
if (internal_mode) {
|
if (internal_mode) {
|
||||||
wlr_output_state_set_mode(&state, internal_mode);
|
wlr_output_state_set_mode(&state, internal_mode);
|
||||||
|
} else {
|
||||||
|
wlr_output_state_set_custom_mode(
|
||||||
|
&state, mr->width, mr->height,
|
||||||
|
(int)roundf(mr->refresh * 1000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2490,6 +2490,10 @@ void createmon(struct wl_listener *listener, void *data) {
|
||||||
r->height, r->refresh);
|
r->height, r->refresh);
|
||||||
if (internal_mode) {
|
if (internal_mode) {
|
||||||
wlr_output_state_set_mode(&state, internal_mode);
|
wlr_output_state_set_mode(&state, internal_mode);
|
||||||
|
} else {
|
||||||
|
wlr_output_state_set_custom_mode(
|
||||||
|
&state, r->width, r->height,
|
||||||
|
(int)roundf(r->refresh * 1000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wlr_output_state_set_scale(&state, r->scale);
|
wlr_output_state_set_scale(&state, r->scale);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue