mirror of
https://github.com/swaywm/sway.git
synced 2024-11-29 19:31:29 +00:00
seat: use default output mapping if there is no input config
This commit is contained in:
parent
d6ac30753d
commit
5bcbc0b4a9
|
@ -660,17 +660,16 @@ static void seat_apply_input_config(struct sway_seat *seat,
|
||||||
struct sway_seat_device *sway_device) {
|
struct sway_seat_device *sway_device) {
|
||||||
struct input_config *ic =
|
struct input_config *ic =
|
||||||
input_device_get_config(sway_device->input_device);
|
input_device_get_config(sway_device->input_device);
|
||||||
if (ic == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
sway_log(SWAY_DEBUG, "Applying input config to %s",
|
sway_log(SWAY_DEBUG, "Applying input config to %s",
|
||||||
sway_device->input_device->identifier);
|
sway_device->input_device->identifier);
|
||||||
|
|
||||||
const char *mapped_to_output = ic->mapped_to_output;
|
const char *mapped_to_output = ic == NULL ? NULL : ic->mapped_to_output;
|
||||||
struct wlr_box *mapped_to_region = ic->mapped_to_region;
|
struct wlr_box *mapped_to_region = ic == NULL ? NULL : ic->mapped_to_region;
|
||||||
|
enum input_config_mapped_to mapped_to =
|
||||||
|
ic == NULL ? MAPPED_TO_DEFAULT : ic->mapped_to;
|
||||||
|
|
||||||
switch (ic->mapped_to) {
|
switch (mapped_to) {
|
||||||
case MAPPED_TO_DEFAULT:
|
case MAPPED_TO_DEFAULT:
|
||||||
mapped_to_output = sway_device->input_device->wlr_device->output_name;
|
mapped_to_output = sway_device->input_device->wlr_device->output_name;
|
||||||
if (mapped_to_output == NULL) {
|
if (mapped_to_output == NULL) {
|
||||||
|
|
Loading…
Reference in a new issue