-
Notifications
You must be signed in to change notification settings - Fork 81
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
Use only output if no output_name #167
base: master
Are you sure you want to change the base?
Conversation
If we don’t have an output_name, but we have only one output, just use that. This makes things easier to handle so that plug-and-play just works. For multiple output setups, we fail, showing the old log message.
I don't think I'll accept this, as this risks breaking in non-obvious ways if the input device is actually not supposed to be mapped to this output device. It also ultimately works around a broken configuration. What made you add this feature? |
I was actually seeing an unrelated bug first where no pointer / keyboard would focus on my GTK app. That ended up being fixed by updating to wlroots 0.11. I was seeing the But, I wanted to restore the old behavior where pointers mapped to output automatically without WL_OUTPUT: https://github.com/Hjdskes/cage/blob/0aeba8085cc023e42aedc7e2d54cb3fd23bafdbf/seat.c#L195 I'm using qemu with the "virtio-tablet-pci" device, so there's not a clear way to set up the mapping correctly. It looks like not having |
I was just looking into implementing this feature myself, so I'm glad I found this PR first. @Hjdskes |
Something like this perhaps. |
I'm not exactly following why explicitly mapping to the single output is necessary. If an input device isn't mapped to a specific output, wlroots maps it to the whole layout, which only contains the one output. So that should be strictly equivalent to explicitly mapping the input device to the output. What am I missing here? |
So this is about plugging an output later on, and still have the input device mapped to a single output? The behavior in this PR sounds inconsistent and fragile. If the external output is plugged in at startup time then the mapping will be broken. There is no guarantee that the user wants to map the input device to the output. Sway has some heuristics to detect internal touchscreens, maybe that could be ported over. In any case, would be nice to have a proper way to configure the mappings (the heuristic doesn't catch all cases). |
If we don’t have an output_name, but we have only one output, just use
that. This makes things easier to handle so that plug-and-play just
works. For multiple output setups, we fail, showing the old log
message.
/cc @Hjdskes