Skip to content

Commit

Permalink
input: Fix input position with more than one wayland backend output (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
soreau authored Nov 23, 2022
1 parent 207b2b3 commit 7c6d439
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/core/seat/input-manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,18 @@ void wf::input_manager_t::refresh_device_mappings()
auto mapped_output = section->get_option("output")->get_value_str();
if (mapped_output.empty())
{
mapped_output = nonull(dev->name);
if (dev->type == WLR_INPUT_DEVICE_POINTER)
{
mapped_output = nonull(wlr_pointer_from_input_device(
dev)->output_name);
} else if (dev->type == WLR_INPUT_DEVICE_TOUCH)
{
mapped_output =
nonull(wlr_touch_from_input_device(dev)->output_name);
} else
{
mapped_output = nonull(dev->name);
}
}

auto wo = wf::get_core().output_layout->find_output(mapped_output);
Expand Down

0 comments on commit 7c6d439

Please sign in to comment.