mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 23:21:57 -07:00
input: Add map to region options for tablets (#3425)
* Add region remap for tablets * Fix code style
This commit is contained in:
committed by
GitHub
parent
ffacd2efd1
commit
6d7dc70f66
@@ -1444,6 +1444,12 @@ void CInputManager::setTabletConfigs() {
|
||||
wlr_cursor_map_input_to_output(g_pCompositor->m_sWLRCursor, t.wlrDevice, PMONITOR->output);
|
||||
wlr_cursor_map_input_to_region(g_pCompositor->m_sWLRCursor, t.wlrDevice, nullptr);
|
||||
}
|
||||
|
||||
const auto REGION_POS = g_pConfigManager->getDeviceVec(t.name, "region_position", "input:tablet:region_position");
|
||||
const auto REGION_SIZE = g_pConfigManager->getDeviceVec(t.name, "region_size", "input:tablet:region_size");
|
||||
const auto REGION = wlr_box{REGION_POS.x, REGION_POS.y, REGION_SIZE.x, REGION_SIZE.y};
|
||||
if (!wlr_box_empty(®ION))
|
||||
wlr_cursor_map_input_to_region(g_pCompositor->m_sWLRCursor, t.wlrDevice, ®ION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user