Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mode option to mirror #1716

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TRPB
Copy link

@TRPB TRPB commented Feb 10, 2023

This follows the wf-config update needed to support this: WayfireWM/wf-config#59

This adds support for a config option like:

[option:DP-2]
mode = mirror DP-1 1920x1080@60000

Reason

Currently Mirroring works like this:

          case output_config::MODE_MIRROR:
            state.source = OUTPUT_IMAGE_SOURCE_MIRROR;
            state.mode   = select_default_mode();
            state.mirror_from = mode.get_mirror_from();
            break;

This sets the monitors default mode and mirrors another output. This can have side effects and unexpected behaviour when the mirrors resolution and refresh rate don't match the outputs. For example, if you mirror a 60hz screen on a 144hz screen the frames don't sync up neatly and it looks strangely jerky, by forcing the output to 120hz or 60hz there are fewer display issues.

There are also times when we might not want to use the default mode. I might prefer my monitor to run at the same resolution of the display being mirrored to scale in the hardware rather than software.

While we could just copy the source's mode here, we might try to copy a monitor that runs at 60hz to a monitor that runs at 59.9hz, not solving the problem. Rather than trying to guess at a best match, let's let the user decide.

Copy link
Member

@ammen99 ammen99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on the idea and implementation here, we can merge once the wf-config PR is also merged.

Thanks for the work so far :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants