mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
opt: only use custom-mode in headless monitor in monitorrule
This commit is contained in:
parent
7114757b7a
commit
d05c2755c3
2 changed files with 4 additions and 3 deletions
|
|
@ -2741,7 +2741,7 @@ void reapply_monitor_rules(void) {
|
|||
mr->height, mr->refresh);
|
||||
if (internal_mode) {
|
||||
wlr_output_state_set_mode(&state, internal_mode);
|
||||
} else {
|
||||
} else if (wlr_output_is_headless(m->wlr_output)) {
|
||||
wlr_output_state_set_custom_mode(
|
||||
&state, mr->width, mr->height,
|
||||
(int)roundf(mr->refresh * 1000));
|
||||
|
|
|
|||
|
|
@ -2579,12 +2579,13 @@ void createmon(struct wl_listener *listener, void *data) {
|
|||
rr = r->rr;
|
||||
|
||||
if (r->width > 0 && r->height > 0 && r->refresh > 0) {
|
||||
custom_monitor_mode = true;
|
||||
internal_mode = get_output_mode(m->wlr_output, r->width,
|
||||
r->height, r->refresh);
|
||||
if (internal_mode) {
|
||||
custom_monitor_mode = true;
|
||||
wlr_output_state_set_mode(&state, internal_mode);
|
||||
} else {
|
||||
} else if (wlr_output_is_headless(m->wlr_output)) {
|
||||
custom_monitor_mode = true;
|
||||
wlr_output_state_set_custom_mode(
|
||||
&state, r->width, r->height,
|
||||
(int)roundf(r->refresh * 1000));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue