mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-04-08 08:21:12 -04:00
Merge c88aa04cf0 into d1367b1c46
This commit is contained in:
commit
d2aca83b0a
3 changed files with 19 additions and 5 deletions
15
seat.c
15
seat.c
|
|
@ -129,12 +129,21 @@ update_capabilities(struct cg_seat *seat)
|
|||
static void
|
||||
map_input_device_to_output(struct cg_seat *seat, struct wlr_input_device *device)
|
||||
{
|
||||
struct cg_output *output;
|
||||
if (!device->output_name) {
|
||||
wlr_log(WLR_INFO, "Input device %s cannot be mapped to an output device\n", device->name);
|
||||
return;
|
||||
if (wl_list_length(&seat->server->outputs) == 1 && seat->server->auto_map_output) {
|
||||
wl_list_for_each (output, &seat->server->outputs, link) {
|
||||
wlr_log(WLR_INFO, "Input device %s does not have an output name, mapping to only output %s\n", device->name,
|
||||
output->wlr_output->name);
|
||||
wlr_cursor_map_input_to_output(seat->cursor, device, output->wlr_output);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
wlr_log(WLR_INFO, "Input device %s cannot be mapped to an output device\n", device->name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
struct cg_output *output;
|
||||
wl_list_for_each (output, &seat->server->outputs, link) {
|
||||
if (strcmp(device->output_name, output->wlr_output->name) == 0) {
|
||||
wlr_log(WLR_INFO, "Mapping input device %s to output device %s\n", device->name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue