opt: only use custom-mode in headless monitor in monitorrule
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user