mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-05 21:15:59 +01:00
rootston: map input devices with wlr_input_device.output_name
This commit is contained in:
parent
9f8a7c8fc4
commit
9e7a997433
1 changed files with 12 additions and 4 deletions
|
@ -141,10 +141,18 @@ static void seat_set_device_output_mappings(struct roots_seat *seat,
|
|||
struct wlr_input_device *device, struct wlr_output *output) {
|
||||
struct wlr_cursor *cursor = seat->cursor->cursor;
|
||||
struct roots_config *config = seat->input->config;
|
||||
struct roots_device_config *dconfig;
|
||||
dconfig = roots_config_get_device(config, device);
|
||||
if (dconfig && dconfig->mapped_output &&
|
||||
strcmp(dconfig->mapped_output, output->name) == 0) {
|
||||
struct roots_device_config *dconfig =
|
||||
roots_config_get_device(config, device);
|
||||
|
||||
const char *mapped_output = NULL;
|
||||
if (dconfig != NULL) {
|
||||
mapped_output = dconfig->mapped_output;
|
||||
}
|
||||
if (mapped_output == NULL) {
|
||||
mapped_output = device->output_name;
|
||||
}
|
||||
|
||||
if (mapped_output && strcmp(mapped_output, output->name) == 0) {
|
||||
wlr_cursor_map_input_to_output(cursor, device, output);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue